By using this website, you agree to our Terms of Use (click here)
It appears that in Acumatica, according to DAC, payment balance (ARPayment.CuryUnappliedBal) is Nonexistent in DB.
I need to present this value to a generic inquiry, in order to accurately calculate what part of the payment is NOT applied anywhere. It's part of a larger effort to Automate refund creation. I've been trying for months and I cannot figure out how to build this value myself. The building blocks seem to be:
SOAdjust
ARPayment
ARAdjust
ARAdjust2
Is this a fools errand? I've found in my years working with Acumatica that some things that are calculated values on a screen and Nonexistent in DB, can be pieced together with math, and quitting is not my MO. But there's a chance this one MAY be impossible.
Some of our payments are applied to multiple SOs and Invoices.
Try joining from ARAdjust to ARPayment on ARAdjust.AdjgDocType=ARPayment.DocType and ARAdjust.AdjgRefNbr=ARPayment.RefNbr, then group by ARPayment.DocType and ARPayment.RefNbr so you only get one record per payment. Then you can sum up the ARAdjust.CuryAdjgAmt amounts to know how much of the payment has been applied.
I think of the fields that start with "Adjd" as "Adjusted" fields since they pertain to the Invoice records that were "Adjusted" by the Payment.
I think of the fields that start with "Adjg" as "Adjusting" fields since they pertain to the Payment records that are doing the "Adjusting".