Balance Due amount of AP Invoice
Is there a field which stores the Balance Due amount for an AP Invoice in either the OPCH table or the OJDT table?
If not, what calculation should I use in my SQL which will give me EXACTLY the same value as shown in the Balance Due field in the AP Invoice on screen?
Example, whether I should use: OPCH.DocTotal - OPCH.PaidSum, or OPCH.DocTotal - OPCH.PaidToDate or any other column?
Unnikrishnan Balan replied
You can use either (OPCH.DocTotal-OPCH.PaidToDate)
or JDT1.BalDueCred where JDT1.Account <>JDT1.ShortName and JDT1.TransType =18
PaidToDtae includes all types of adjusted document values whereas Paidsum only brings value from Payment.