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); }
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); }
public static bool IsPaymentByline(this JointPayeePayment jointPayeePayment) { return(jointPayeePayment.BillLineNumber != null && jointPayeePayment.BillLineNumber != decimal.Zero); }