mvelazquez
Technical User
In Micros 3700 anyone knows a global variable in memory where a value can be accumulated within a ticket.
The breakdown is as follows, can only receive up to 250 dlls per ticket and use the functionality currently TMED to limit them, but to go accumulating them, I have to write to a file and then consult it and think it's not the best way. This is because each time you use the TMED function all variables are cleared.
The breakdown is as follows, can only receive up to 250 dlls per ticket and use the functionality currently TMED to limit them, but to go accumulating them, I have to write to a file and then consult it and think it's not the best way. This is because each time you use the TMED function all variables are cleared.
Code:
event tmed:102
VAR ConfigFile : A50 // File Name
VAR Buffer : A256
VAR FilePosition : N8 // Data Pointer
VAR FileHandle : N5 = 0 // File handle
Call Procesa_Consulta_Tipo_Cambio
IF @WSTYPE = 3
FORMAT ConfigFile AS "\CF\MICROS\ETC\dlls.txt"
ELSE
FORMAT ConfigFile AS "dlls.txt"
ENDIF
FOPEN FileHandle, ConfigFile, READ
FREAD FileHandle, Total_dlls
FCLOSE FileHandle
//This is the variable that I want to accumulate
[b]//SOMETING LIKE: @SOME_VARIABLE = Total_dlls = Total_dlls + @TNDTTL/Tipo_Cambio[/b]
Total_dlls = Total_dlls + @TNDTTL/Tipo_Cambio
if Total_dlls > Tope_dlls
ExitWithError "Solo se pueden recibir $", Tope_dlls, " Dolares"
else
FOPEN FileHandle, ConfigFile, WRITE
FWRITE FileHandle, Total_dlls
FCLOSE FileHandle
endif
endevent