Hi All,
I'm trying to build an integration to an external system to sync purchase orders and lines. There are small rounding differences between the two systems. Tried setting rounding on general ledger setup but the reality is it's never going match 100%. What are the options to set tax amount on document lines? Couldn't find code used in base app statistics based as this page allows the user to adjust tax from the front end so I'm thinking there must be a code unit somewhere that does the job?
0
Answers
Set Allow VAT difference in the Purchase & Payables Setup.
In the Code calculate the VAT difference on the Purchase Lines.
After creating all the purchase lines
Use
PurchaseLine.CalcVATAmountLines(0, PurchaseHeader, PurchaseLine, VATAmountLine);
PurchaseLine.UpdateVATOnLines(0, PurchaseHeader, PurchaseLine, VATAmountLine);
PurchaseLine.UpdateVATOnLines(1, PurchaseHeader, PurchaseLine, VATAmountLine)
VATAmountline is temporary record