I need to modify the native behavior of tax calculation in BC. I am developing on BC16 OnPremise and "VAT calculation type" is "Sales Tax".
Basically I need to be able to add or remove tax codes at runtime and not by setup. In the same way, also modify the VAT % (percentage applied to the tax code).
I've been reviewing and debugging the source code on the following objects, but I can't determine where to extend my code.
- codeunit 80 Sales-Post -> procedure onrun() -> checktotalincoiceamount()
- tabla 37 Sales Line -> procedure CalcVATAmountLines()
- tabla 290 VAT Amount Line. procedure updatelines()
- codeunit 398 Sales Tax Calculate -> procedure CalcualteTax()
Is it possible to modify the native tax behavior in BC?
Thanks.
Kindest regards.