Sage 100

 View Only
Expand all | Collapse all

How to Prevent Import to Sales Order Triggering a Pre-Totals Event for each record

  • 1.  How to Prevent Import to Sales Order Triggering a Pre-Totals Event for each record

    Posted 12-20-2022 19:28
    Edited by Dan Burleson 12-21-2022 02:36
    I've developed a script that discounts taxable ItemCode's to absorb their sales tax and present a invoice total including sales tax (but not freight) equal to the original net invoice, but when I import from an Excel file a pre-totals event is triggered for each record. The script works accurately, but since I have to trigger re-calulations of AvaTax (which is slow) this increases the run time by a factor based on the number of records. What could I do to avoid triggering the unnecessary  pre-total events?
    NOTE: Subject says "Sales Order" but should be "Invoice" (can't change the subject?)

    ------------------------------
    Dan Burleson
    Software Consultant
    Connex Software
    ------------------------------


  • 2.  RE: How to Prevent Import to Sales Order Triggering a Pre-Totals Event for each record

    Posted 02-18-2023 01:00
    Edited by Dan Burleson 02-19-2023 00:31

    This doesn't happen in a vanilla installation of 2021 or 2022, only if AvaTax is installed. It was tested w/AvaTax as the only enhancement.

    It turns out that the DSD AvaTax connector part of Sage 100 triggers a Pre-Totals event after each line of an invoice import. If a Pre-Totals event reads all lines of, for example, a 5 line invoice import then the event is triggered 5 times and scans 1 + 2 + 3 + 4 + 5 = 15 lines. If AvaTax invoice imports are slow this might be the reason. They've been notified.



    ------------------------------
    Dan Burleson
    Software Consultant
    Connex Software
    ------------------------------