problema con variable - problem with variable - Forum

Forum Navigation
You need to log in to create posts and topics.

problema con variable - problem with variable

ESTE ES MI CODIGO:

If "[RadioGroup5]" "=" "1"
Math "[currentPReCIO]*[CANTIDAD1]" "" "[SUBTOTAL1]"
Math "[SUBTOTAL1]+[totalsumapresu]" "-2" "[totalsumapresu]"
Else
EndIf

EL PROBLEMA ES QUE AL ELEGIR OTRO PRODUCTO, ME DA MAL EL CALCULO DEL TOTAL.

Uploaded files:
  • You need to login to have access to uploads.

@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.
neobook