protected override decimal CalcLineTotal(PXCache sender, object row) { decimal CuryLineTotal = 0m; object document = PXParentAttribute.SelectParent(sender, row, _ParentType); object[] progressiveDetails = PXParentAttribute.SelectChildren(sender.Graph.Caches[typeof(PMProformaProgressLine)], document, _ParentType); object[] transactionDetails = PXParentAttribute.SelectChildren(sender.Graph.Caches[typeof(PMProformaTransactLine)], document, _ParentType); if (progressiveDetails != null) { foreach (object detrow in progressiveDetails) { CuryLineTotal += GetCuryTranAmt(sender.Graph.Caches[typeof(PMProformaProgressLine)], sender.Graph.Caches[typeof(PMProformaProgressLine)].ObjectsEqual(detrow, row) ? row : detrow) ?? 0m; } } if (transactionDetails != null) { foreach (object detrow in transactionDetails) { CuryLineTotal += GetCuryTranAmt(sender.Graph.Caches[typeof(PMProformaTransactLine)], sender.Graph.Caches[typeof(PMProformaTransactLine)].ObjectsEqual(detrow, row) ? row : detrow) ?? 0m; } } return(CuryLineTotal); }
protected virtual void _(Events.RowDeleted <APTran> e) { if (e.Row.TranType != APDocType.Prepayment || string.IsNullOrEmpty(e.Row.POOrderType) || string.IsNullOrEmpty(e.Row.PONbr)) { return; } var prepaidOrder = PXParentAttribute.SelectParent <POOrderPrepayment>(Base.Transactions.Cache, e.Row); if (prepaidOrder != null && !PXParentAttribute.SelectChildren(Base.Transactions.Cache, prepaidOrder, typeof(POOrderPrepayment)).Any()) { PrepaidOrders.Delete(prepaidOrder); } }