private decimal?GetControlAmountToPay(JointPayeePayment jointPayeePayment)
        {
            var jointPayee       = JointPayeeDataProvider.GetJointPayee(Graph, jointPayeePayment);
            var reversedPayments = GetReversedJointPayeePayments(jointPayeePayment.JointPayeeId).ToList();

            return(reversedPayments.Any()
                ? -reversedPayments.Sum(jpp => jpp.JointAmountToPay)
                : jointPayee.JointBalance);
        }
Ejemplo n.º 2
0
 public static bool IsRelatedToSameInvoice(this JointPayeePayment jointPayeePayment,
                                           JointPayeePayment jointPayeePaymentToCompare)
 {
     return(jointPayeePayment.InvoiceRefNbr == jointPayeePaymentToCompare.InvoiceRefNbr &&
            jointPayeePayment.InvoiceDocType == jointPayeePaymentToCompare.InvoiceDocType);
 }
        private decimal?GetBillAmount(JointPayeePayment jointPayeePayment)
        {
            var adjustment = Adjustments.Single(adjust => adjust.IsRelatedJointPayeePayment(jointPayeePayment));

            return(InvoiceDataProvider.GetInvoice(Graph, adjustment.AdjdDocType, adjustment.AdjdRefNbr).CuryOrigDocAmt);
        }
Ejemplo n.º 4
0
 public static bool IsPaymentByline(this JointPayeePayment jointPayeePayment)
 {
     return(jointPayeePayment.BillLineNumber != null && jointPayeePayment.BillLineNumber != decimal.Zero);
 }