free from problem,credit with cash qr

This commit is contained in:
miggaze 2021-07-23 17:27:25 +07:00
parent 6c68e86ca1
commit 0eb70b24f7
12 changed files with 212 additions and 26 deletions

View file

@ -43,6 +43,7 @@
Var PayAmount = PriceDrink
Var RemainAmount = PayAmount - IntVendingCampaign
Var RemainAmount = RemainAmount - CoinAmount
Var RemainAmount = RemainAmount - IntVendingCredit
Var RemainAmountStr = "" + RemainAmount
Var Timeout = 0
Var PayOK = 0
@ -149,6 +150,13 @@
Var PayState4 = "Disable"
Var CoinInFlag = 1
EndIf
If IntVendingCredit > 0 Then
Var PayState2 = "Disable"
Var PayState4 = "Disable"
EndIf
Var showRemaining = charOfBaht + RemainAmountStr
If show_eng = "true" Then
@ -183,6 +191,14 @@
EndIf
EndIf
If GetFreeFromError = 1 Then
Var FreeVendingCampaign = 1
CoinVending OFF
MakeDrinkV1 SelectDrink SelectSugarID
Open "ROOT/taobin_project/xml/page_thankyou.xml"
EndIf
If IntVendingCampaign >= PayAmount Then
Var RemainAmount = 0
Var RemainAmountStr = "" + RemainAmount
@ -196,6 +212,7 @@
Var RemainAmount = PayAmount - CoinAmount
Var RemainAmount = RemainAmount - IntVendingCampaign
Var RemainAmount = RemainAmount - IntVendingCredit
Var SumCoinAmount = CoinAmount + IntVendingCampaign
If SumCoinAmount >= PayAmount Then
;Var VendingQRCode = "ERROR"
@ -254,12 +271,27 @@
Var PayOfflineMode = 0
EndIf
Var pay_with_credit_image = DirImage + "/bp_pay_with_credit.png"
Var pay_with_chanel_text = DirImage + "/text_1.png"
If DisableUsingCode = "true" Then
SAVELOG "Diable code because using topping."
Var PayState2 = "Disable"
Var pay_with_code_image = DirImage + "/bp_pay_with_code_error.png"
Else
Var pay_with_code_image = DirImage + "/bp_pay_with_code.png"
If IntVendingCredit > 0 Then
Var pay_with_code_image = DirImage + "/bp_pay_with_code_error2.png"
Var pay_with_credit_image = DirImage + "/bp_pay_with_credit_error2.png"
Var pay_with_chanel_text = DirImage + "/text_2.png"
Else
Var pay_with_code_image = DirImage + "/bp_pay_with_code.png"
EndIf
EndIf
</EventOpen>
@ -318,6 +350,8 @@
EndIf
Var Timeout = Timeout + 1
@ -541,7 +575,7 @@
Var RemainAmount = PayAmount - CoinAmount
Var RemainAmount = RemainAmount - IntVendingCampaign
Var RemainAmount = RemainAmount - IntVendingCredit
If ViewBill > RemainAmount Then
Var RemainAmountKeep = ViewBill - RemainAmount
@ -569,7 +603,10 @@
Var RemainAmount = PayAmount - CoinAmount
Var RemainAmount = RemainAmount - IntVendingCampaign
Var RemainAmount = RemainAmount - IntVendingCredit
Var SumCoinAmount = CoinAmount + IntVendingCampaign
Var SumCoinAmount = CoinAmount + IntVendingCredit
If SumCoinAmount >= PayAmount Then
;Var VendingQRCode = "ERROR"
CoinVending OFF
@ -655,9 +692,9 @@
</Video>
<Image>
<X> 199 </X>
<X> 144 </X>
<Y> 413 </Y>
<Filename> Var( DirImage + "/text_1.png" ) </Filename>
<Filename> pay_with_chanel_text </Filename>
</Image>
@ -819,7 +856,7 @@
<State> PayState4</State>
<Filename> Var( DirImage + "/bn_pay_with_credit.png") </Filename>
<FilenamePress> Var( DirImage + "/bp_pay_with_credit.png") </FilenamePress>
<FilenameDisable> Var( DirImage + "/bp_pay_with_credit.png") </FilenameDisable>
<FilenameDisable> pay_with_credit_image </FilenameDisable>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
@ -1189,4 +1226,5 @@
</Popup>