Beispiel #1
0
        private void RecalcFormulas(RUTROT rutrot, DocExt document)
        {
            if (document.IsRUTROTDeductible == true)
            {
                foreach (Tran tran in Transactions.Select())
                {
                    if (PXCache <Tran> .GetExtension <TranExt>(tran)?.IsRUTROTDeductible == true)
                    {
                        Transactions.Cache.RaiseFieldUpdated("IsRUTROTDeductible", tran, false);                        //this is required for updating formula on ARTranRUTROT.CuryRUTROTAvailableAmt
                    }
                }
                foreach (RUTROTDistribution distribution in RRDistribution.Select())
                {
                    RRDistribution.Cache.RaiseFieldUpdated <RUTROTDistribution.extra>(distribution, !distribution.Extra);                   //this is required for updating formula on RUTROTDistribution.curyAllowance
                }

                PXUnboundFormulaAttribute.CalcAggregate <ARTranRUTROT.curyRUTROTTotal>(Transactions.Cache, rutrot);
                PXFormulaAttribute.CalcAggregate <ARTranRUTROT.curyRUTROTAvailableAmt>(Transactions.Cache, rutrot);

                PXUnboundFormulaAttribute.CalcAggregate <SOLineRUTROT.curyRUTROTTotal>(Transactions.Cache, rutrot);
                PXFormulaAttribute.CalcAggregate <SOLineRUTROT.curyRUTROTAvailableAmt>(Transactions.Cache, rutrot);

                PXFormulaAttribute.CalcAggregate <RUTROTDistribution.curyAllowance>(RRDistribution.Cache, rutrot);
            }
        }
Beispiel #2
0
 public void RecalcFormulas(RUTROT rowRR, ARInvoiceRUTROT row)
 {
     if (row.IsRUTROTDeductible == true)
     {
         foreach (ARTran tran in Base.Transactions.Select())
         {
             if (PXCache <ARTran> .GetExtension <ARTranRUTROT>(tran).IsRUTROTDeductible == true)
             {
                 Base.Transactions.Cache.RaiseFieldUpdated <ARTranRUTROT.isRUTROTDeductible>(tran, false);                       //this is required for updating formula on ARTranRUTROT.CuryRUTROTAvailableAmt
                 Base.Transactions.Update(tran);
             }
         }
         PXUnboundFormulaAttribute.CalcAggregate <ARTranRUTROT.curyRUTROTTotal>(Base.Transactions.Cache, rowRR);
         PXFormulaAttribute.CalcAggregate <ARTranRUTROT.curyRUTROTAvailableAmt>(Base.Transactions.Cache, rowRR);
     }
 }