web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

Transaction Import - How can we update OrigDocAmount after Tax is calculated

(0) ShareShare
ReportReport
Posted on by 4

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

I have the same question (0)
  • Suggested answer
    Apps Mexico Profile Picture
    1,090 on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans