public override void RecalculateTotalJointAmount() { var jointPayeesByLineGroups = JointPayees.SelectMain().GroupBy(jp => jp.BillLineNumber) .Where(jp => jp.Key != null); foreach (var jointPayeesByLine in jointPayeesByLineGroups) { var transaction = TransactionDataProvider.GetTransaction(Graph, CurrentBill.DocType, CurrentBill.RefNbr, jointPayeesByLine.Key); transactionExtension = PXCache <APTran> .GetExtension <ApTranExt>(transaction); transactionExtension.TotalJointAmountPerLine = jointPayeesByLine.Sum(jp => jp.JointAmountOwed); } }
public override void ValidateAmountOwed(JointPayee jointPayee) { if (jointPayee.BillLineNumber == null) { return; } var transaction = TransactionDataProvider.GetTransaction(Graph, CurrentBill.DocType, CurrentBill.RefNbr, jointPayee.BillLineNumber); transactionExtension = PXCache <APTran> .GetExtension <ApTranExt>(transaction); ValidateJointAmountOwedPerLine(jointPayee); base.ValidateAmountOwed(jointPayee); }