MYS: fix qr size & extend timeout e-invoice

This commit is contained in:
Pakin 2025-07-11 15:35:23 +07:00
parent 8aab43e5eb
commit db68244735
2 changed files with 39 additions and 22 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before After
Before After

View file

@ -15,6 +15,7 @@
Var ProductDesc = ""
Var Timeout = 0
Var TimeoutAfterShowQR = 0
Var service = "eInvoice.mys"
Var EReceiptQR = ""
@ -82,9 +83,13 @@
<Timeout> 1000 </Timeout>
<EventTimeout>
DEBUGVAR TimeoutAfterShowQR
DEBUGVAR VendingTSID
Var Seeker.VendingTSID = VendingTSID
If VendingTSID = "" Then
Else
Var Seeker.VendingTSID = VendingTSID
EndIf
DEBUGVAR Seeker.VendingTSID
DEBUGVAR LOADING_STATE
@ -93,31 +98,43 @@ DEBUGVAR QR_STATE
DEBUGVAR Seeker.e_receipt
Var Timeout = Timeout + 1
If Seeker.VendingTSID = "" Then
Var Timeout = Timeout + 1
Else
If TimeoutAfterShowQR = 0 Then
Var LOADING_STATE = "Invisible"
SAVELOG "TSID should be ready!"
TRY "ROOT/taobin_project/inter/mys/xml/process/e_receipt.ev"
Var TimeoutAfterShowQR = 1
Refresh
EndIf
EndIf
If Timeout = 5 Then
Var LOADING_STATE = "Invisible"
SAVELOG "TSID should be ready!"
TRY "ROOT/taobin_project/inter/mys/xml/process/e_receipt.ev"
If Seeker.VendingTSID = "" Then
Var QR_STATE = "Invisible"
Refresh
Else
If TimeoutAfterShowQR > 2 Then
Var QR_STATE = "Enable"
EndIf
If TimeoutAfterShowQR > 0 Then
Var TimeoutAfterShowQR = TimeoutAfterShowQR + 1
EndIf
Refresh
EndIf
If Timeout > 5 Then
If Timeout > 25 Then
Var QR_STATE = "Enable"
Refresh
EndIf
If Timeout > 15 Then
SAVELOG "Timeout after waiting .."
Open "ROOT/taobin_project/xml/page_drinkok.xml"
EndIf
If TimeoutAfterShowQR > 25 Then
SAVELOG "Timeout QR OK"
Open "ROOT/taobin_project/xml/page_drinkok.xml"
EndIf
Refresh
TimerReset
@ -143,10 +160,10 @@ TimerReset
; need-change-position
<QRCode>
<X> 415 </X>
<Y> 875 </Y>
<Width> 250 </Width>
<Height> 250 </Height>
<X> 350 </X>
<Y> 845 </Y>
<Width> 360 </Width>
<Height> 360 </Height>
<State> QR_STATE </State>
<Service> service </Service>
</QRCode>
@ -155,7 +172,7 @@ TimerReset
<Image>
<X> 175 </X>
<Y> 1200 </Y>
<Y> 1230 </Y>
<Height> 300 </Height>
<Width> 320 </Width>
<Filename> Seeker.PictureDrink </Filename>