Announcements
We've implemented an invoice import process that using Transaction Import. Currently, the process is passing in 2 line items, 1 for the sales item and 1 for sales tax that was calculated by the source system. We are also passing the OrigDocAmt as the sum of the item and tax. The result is a balanced invoice. We are trying to replace the tax item with a call to AvaTax to perform the Tax calculation. We have installed a connector for AvaTax and it is successfully calculating sales tax and storing it on the invoice, however the OrigDocAmt is not updated.
We are importing over 500 invoices and it is not possible to touch each invoice to update the OrigDocAmt manually. Is there a way to get the import process to update the OrigDocAmt after the tax call is completed? We took out passing the OrigDocAmt in the file and control file, but that just results in an amount of zero.
The Avatax call is made upon Save. After the save is complete, the DocBal and CuryDocBal includes the sales tax. It would seem that the control file needs to set the OrigDocAmt to the DocBal and initiate another save.
Can someone explain how I might do this in the intelligent control file?
*This post is locked for comments
Hi,
I don't know how works the Avatax connector, but after that the avatax calculates the taxes you could try to update the CuryDocBal with code. You could try on the distinct levels LEVEL0, Finished, etc.
Private Sub Update1_UpdateEvent(Level As Short, InsertFlg As Short, LevelsDone As Short, LevelsLeft As Short, ByRef RetVal As Short) Handles Update1.UpdateEvent
If IS_TI = True Then
If Level = Finished Then
Call SetBufferValue("bAPDoc.CuryDocBal", vNewCuryDocBal)
Call Edit_Save()
End If
End If
End Sub
André Arnaud de Cal...
294,095
Super User 2025 Season 1
Martin Dráb
232,866
Most Valuable Professional
nmaenpaa
101,158
Moderator