NAV 2016 calculating tax everytime you change the quantity

jwilderjwilder Member Posts: 263
We are having performance issues related to entering quantities on the sales line. There more lines you add the slower it gets. Not very noticeable for small orders but once you get over 10 to 20 (we have some orders with 200 lines) lines it pauses a little more each time you validate the quantity. It has tripled the time it takes to enter an order for some of our bigger orders. For now I have had to create a special screen to enter the items which then gets inserted into the sales lines.

The problem is that OnValidate of Quantity is calling Codeunit 57 Document Totals, Function SalesRedistributeInvoiceDiscountAmounts. This is turn ends up calling SalesLine.CalcSalesTaxLines. This is not good. CalcSalesTaxLines modifies every sales line so the more you have the slower it gets.

I am hoping this has been fixed in a future version or someone has come up with a fix for this. Any thoughts?

Answers

  • KishormKishorm Member Posts: 921
    Document totals is a fairly new thing and although it's nice for the user, there are performance considerations as you have discovered. I guess Microsoft are aware of this which is why the totals are not calculated if there are more that 100 lines. This limit is hardcoded in Codeunit 57 in functions SalesCheckNumberOfLinesLimit and PurchaseCheckNumberOfLinesLimit.

    One option you have is to reduce this limit from 100 to say 10 / 20 or whatever value gives you reasonable performance.
Sign In or Register to comment.