Hello Everyone,
Sadly, I am back again with my bug in totals on sales documents.
I have a couple of automated lines where the quantity is automatically modified when input (like quantity) is changed on other lines. Simply put, those are handling fees that change based on the sales lines content.
A very helpful user here, suggested to validate my Quantities, which helped, slightly.
My problem is, my total excl vat is now correct, but my subtotal excl vat is not. Even when validating the quantities just after modifying those fee lines.
For some unknown reason, when the system calculates my sub total, it does not count those automated fee lines. It does count them when calculating the totals excl vat.
Any idea's of where I should be looking? Or ways to force those sub totals?
To give you an idea of code structure:
Sales line extension
- on modify : code that do some calculations on the current line and changes the quantity of the current line. at the end, i do a validate on the quantities to force recalculation
- on after modify, code that adds up all the existing lines (except fee lines) and take the total quantities and put them in the fee lines. at the end, i do a validate on the quantities to force recalculation
I hope you guys can help
Cheers

Report
All responses (
Answers (