Quote from
Gaev on October 2, 2019, 8:21 pm
@neobook
THE PROBLEM IS THAT WHEN CHOOSING ANOTHER PRODUCT, I GOT THE CALCULATION OF THE TOTAL. quantity
Each time this code is invoked, this command ...
Math "[SUBTOTAL1]+[totalsumapresu]" "-2" "[totalsumapresu]"
... WILL keep adding the value of [SUBTOTAL1] to the current value of [totalsumpresu] ... so, where do you reset its value ?
In order to calculate the value of [totalsumpresu], you should (call a subroutine that will) loop through (and add) all 12 values of [SUBTOTALx].
@neobook
THE PROBLEM IS THAT WHEN CHOOSING ANOTHER PRODUCT, I GOT THE CALCULATION OF THE TOTAL. quantity
Each time this code is invoked, this command ...
Math "[SUBTOTAL1]+[totalsumapresu]" "-2" "[totalsumapresu]"
... WILL keep adding the value of [SUBTOTAL1] to the current value of [totalsumpresu] ... so, where do you reset its value ?
In order to calculate the value of [totalsumpresu], you should (call a subroutine that will) loop through (and add) all 12 values of [SUBTOTALx].
neobook has reacted to this post.