Hi,
I have spent a few hours trying to work out how to programmatically add lines to Bills and adjustments and get the totals and taxes to correctly calculate on the header. The below shows a bill where the single line for $150 has been added programmatically.
Note that the totals in the header are all Zero. The below is what a manually keyed bill looks like with the same record (ie the answer I’m trying to get to)
A few comments on the first screen shot where the line has been programmatically added:
- The totals in the header appear to be incrementally calculating. For example if I change the price on the line from $150 to $160, the total shows the net difference from the original line added
- There is no Tax detail
If I manually add a record here the taxes appear in the header correctly calculated (but the Detail Total and Balance is still incorrect)
I have tried programmatically adding record into APTaxTran before and after APTran but thus far have been unable to get the Bill to function properly.
In terms of my code, here is a cut down version of what I’m doing:
I have extended APInvoiceEntry. Note, that the A,B,C,...G are just place holders for values calculated in my non-cut down version.
The above method is being called from here:
Thanks in advance for any help.
JOhn
Best answer by Zoltan Febert
View original