THAI: Update All Payment cash
This commit is contained in:
parent
ccadb410d7
commit
e9bc7f2544
11 changed files with 429 additions and 885 deletions
|
|
@ -38,9 +38,7 @@
|
|||
Var alphaState2 = "Enable"
|
||||
|
||||
Var alphaState3 = "Invisible"
|
||||
|
||||
|
||||
INT AmountNumber
|
||||
Var confirmButtonState = "Invisible"
|
||||
|
||||
Var img_popup11 = "/img_popup11.png"
|
||||
Var img_popup15 = "/img_popup15.png"
|
||||
|
|
@ -49,7 +47,6 @@
|
|||
If CountryName = "Malaysia" Then
|
||||
Var img_popup11 = "/img_popup11-MYR.png"
|
||||
Var img_popup15 = "/img_popup15-MYR.png"
|
||||
Var AmountNumber = AmountNumber * 100
|
||||
EndIf
|
||||
|
||||
;inter-image
|
||||
|
|
@ -62,20 +59,13 @@
|
|||
If CountryName = "Singapore" Then
|
||||
Var img_popup11 = "/img_popup11-SGP.png"
|
||||
Var img_popup15 = "/img_popup15-SGP.png"
|
||||
Var AmountNumber = AmountNumber * 100
|
||||
EndIf
|
||||
|
||||
|
||||
|
||||
Var CreditAmount = AmountNumber
|
||||
Var RemainAmount = CreditAmount - CoinAmount
|
||||
|
||||
|
||||
|
||||
Var RemainAmountStr = "" + RemainAmount
|
||||
|
||||
Var RemainAmountStr !assigned StringFmt( RemainAmount, DisplayFormat, PreScaleConvertShow )
|
||||
|
||||
Var CreditAmount = SumCreditAmount
|
||||
Var RemainAmountStr !assigned StringFmt( CreditAmount, DisplayFormat, PreScaleConvertShow )
|
||||
Var showRemaining = charOfBaht + RemainAmountStr
|
||||
|
||||
|
||||
Var CoinInFlag = 0
|
||||
|
|
@ -85,14 +75,11 @@
|
|||
Var CancelFlag = 0
|
||||
Var ChangeFlag2 = 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Var ChangeTimeout = 0
|
||||
Var CancelCounter = 0
|
||||
|
||||
CoinVending XBILL
|
||||
|
||||
|
||||
Var ServiceAmount2 = CreditAmount
|
||||
Var ServiceCharge = 0
|
||||
|
|
@ -106,60 +93,7 @@
|
|||
Var NamePriceShow = showname + " "
|
||||
Var NamePriceShow = NamePriceShow + DrinkAmountStr
|
||||
|
||||
If CoinInOK = 0 Then
|
||||
|
||||
Var RemainAmount = CreditAmount - CoinAmount
|
||||
|
||||
|
||||
Var SumCoinAmount = CoinAmount
|
||||
|
||||
If SumCoinAmount >= CreditAmount Then
|
||||
CoinVending OFF
|
||||
Var Canout = SumCoinAmount - CreditAmount
|
||||
If Canout = 0 Then
|
||||
Var RemainAmountStr = 0
|
||||
Var RemainAmountStr !assigned StringFmt( 0, DisplayFormat, PreScaleConvertShow )
|
||||
Else
|
||||
If show_eng = "true" Then
|
||||
Var RemainAmountStr !assigned StringFmt( Canout, DisplayFormat, PreScaleConvertShow )
|
||||
Var RemainAmountStr = "Change " + RemainAmountStr
|
||||
Var RemainAmountStr = RemainAmountStr + "###size=90"
|
||||
Else
|
||||
Var RemainAmountStr = "ทอน " + Canout
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
|
||||
If Seeker.StoreCreditFlag = 1 Then
|
||||
Var RemainAmountStr = 0
|
||||
Var RemainAmountStr !assigned StringFmt( 0, DisplayFormat, PreScaleConvertShow )
|
||||
EndIf
|
||||
|
||||
|
||||
Var CancleState = "Disable"
|
||||
Var CoinInOK = 1
|
||||
Var CoinInCounter = 0
|
||||
|
||||
Var TxRef1 = ""
|
||||
CreateTxRef1 TxRef1
|
||||
|
||||
|
||||
|
||||
Else
|
||||
Var RemainAmountStr = "" + RemainAmount
|
||||
Var RemainAmountStr !assigned StringFmt( RemainAmount, DisplayFormat, PreScaleConvertShow )
|
||||
EndIf
|
||||
|
||||
Var Timeout = 0
|
||||
|
||||
|
||||
Var showRemaining = charOfBaht + RemainAmountStr
|
||||
|
||||
|
||||
|
||||
EndIf
|
||||
|
||||
|
||||
Var warning_price_state = "Enable"
|
||||
|
||||
|
||||
</EventOpen>
|
||||
|
|
@ -178,19 +112,23 @@
|
|||
AddData 24 TelephoneNumber BmiYear PointCrm GetScore
|
||||
EndIf
|
||||
|
||||
CoinVending OFF
|
||||
Var CancelFlag = 1
|
||||
Var CancelCounter = 0
|
||||
Var RemainAmountStr = "คืนเงิน"
|
||||
If CoinAmount = 0 Then
|
||||
Var RemainAmountStr = "ยกเลิก"
|
||||
Else
|
||||
CoinVending OFF
|
||||
EndIf
|
||||
If Seeker.StoreCreditFlag = 1 Then
|
||||
Var RemainAmountStr = "เก็บเครดิต"
|
||||
EndIf
|
||||
If ViewBill > 0 Then
|
||||
CoinVending BILLREJECT
|
||||
If show_eng = "true" Then
|
||||
Var RemainAmountStr = "Cancelled"
|
||||
Else
|
||||
Var RemainAmountStr = "ยกเลิก"
|
||||
EndIf
|
||||
Else
|
||||
If show_eng = "true" Then
|
||||
Var RemainAmountStr = "Keep credit"
|
||||
Else
|
||||
Var RemainAmountStr = "เก็บเครดิต"
|
||||
EndIf
|
||||
|
||||
CoinVending BILLSTACKALL
|
||||
EndIf
|
||||
EndIf
|
||||
EndIf
|
||||
|
|
@ -199,6 +137,8 @@
|
|||
If ChangeOK = 1 Then
|
||||
|
||||
If CancelFlag = 0 Then
|
||||
Var CreditAmount = CreditAmount + CoinAmount
|
||||
Var ServiceAmount2 = CreditAmount
|
||||
Open "ROOT/taobin_project/xml/page_payment_credit3-TopupSuccess.xml"
|
||||
Else
|
||||
|
||||
|
|
@ -252,19 +192,8 @@
|
|||
If CoinInCounter = 1 Then
|
||||
Var PayOK = 1
|
||||
|
||||
Var SumCoinAmount = CoinAmount
|
||||
If SumCoinAmount >= CreditAmount Then
|
||||
Var Canout = SumCoinAmount - CreditAmount
|
||||
If Canout > 0 Then
|
||||
If Seeker.StoreCreditFlag = 0 Then
|
||||
Change Canout
|
||||
Var ChangeFlag2 = 1
|
||||
Else
|
||||
Var ChangeOK = 1
|
||||
EndIf
|
||||
Else
|
||||
Var ChangeOK = 1
|
||||
EndIf
|
||||
If CoinAmount > 0 Then
|
||||
Var ChangeOK = 1
|
||||
EndIf
|
||||
EndIf
|
||||
EndIf
|
||||
|
|
@ -273,17 +202,7 @@
|
|||
|
||||
Var CancelCounter = CancelCounter + 1
|
||||
If CancelCounter = 2 Then
|
||||
|
||||
If CoinAmount > 0 Then
|
||||
If Seeker.StoreCreditFlag = 0 Then
|
||||
Change CoinAmount
|
||||
Var ChangeFlag2 = 1
|
||||
Else
|
||||
Var ChangeOK = 1
|
||||
EndIf
|
||||
Else
|
||||
Var ChangeOK = 1
|
||||
EndIf
|
||||
Var ChangeOK = 1
|
||||
EndIf
|
||||
|
||||
Var ChangeTimeout = ChangeTimeout + 1
|
||||
|
|
@ -314,100 +233,39 @@
|
|||
</EventChangeStatus>
|
||||
|
||||
<EventCoin>
|
||||
TimerReset
|
||||
TimerReset
|
||||
|
||||
Var CoinInFlag = 1
|
||||
|
||||
DEBUGVAR ViewBill
|
||||
|
||||
Var SumAmount = CreditAmount + CoinAmount
|
||||
If SumAmount >= PayAmountSubDiscount Then
|
||||
Var confirmButtonState = "Enable"
|
||||
Var alphaState2 = "Invisible"
|
||||
Var warning_price_state = "Invisible"
|
||||
Else
|
||||
Var warning_price_state = "Enable"
|
||||
EndIf
|
||||
|
||||
If ViewBill > 0 Then
|
||||
|
||||
Var RemainAmount = CreditAmount - CoinAmount
|
||||
|
||||
|
||||
If ViewBill > RemainAmount Then
|
||||
Var RemainAmountKeep = ViewBill - RemainAmount
|
||||
Var RemainAmountKeepStr !assigned StringFmt( RemainAmountKeep, DisplayFormat, PreScaleConvertShow )
|
||||
Var alphaState3 = "Enable"
|
||||
Var alphaState2 = "Disable"
|
||||
Else
|
||||
;CoinVending BILLSTACKALL
|
||||
If ViewBill = RemainAmount Then
|
||||
CoinVending BILLSTACKALL
|
||||
Else
|
||||
Var RemainAmountKeep = 0
|
||||
Var RemainAmountKeepStr !assigned StringFmt( RemainAmountKeep, DisplayFormat, PreScaleConvertShow )
|
||||
Var alphaState3 = "Enable"
|
||||
Var alphaState2 = "Disable"
|
||||
EndIf
|
||||
EndIf
|
||||
CoinVending BILLSTACKALL
|
||||
|
||||
Var Timeout = 0
|
||||
Var RemainAmountStr = "" + RemainAmount
|
||||
|
||||
Var RemainAmountStr !assigned StringFmt( SumAmount, DisplayFormat, PreScaleConvertShow )
|
||||
Var showRemaining = charOfBaht + RemainAmountStr
|
||||
|
||||
Var RemainAmountStr !assigned StringFmt( RemainAmount, DisplayFormat, PreScaleConvertShow )
|
||||
|
||||
|
||||
|
||||
Else
|
||||
|
||||
|
||||
Var alphaState2 = "Enable"
|
||||
|
||||
|
||||
If CoinInOK = 0 Then
|
||||
|
||||
Var RemainAmount = CreditAmount - CoinAmount
|
||||
|
||||
|
||||
Var SumCoinAmount = CoinAmount
|
||||
|
||||
If SumCoinAmount >= CreditAmount Then
|
||||
CoinVending OFF
|
||||
Var Canout = SumCoinAmount - CreditAmount
|
||||
If Canout = 0 Then
|
||||
Var RemainAmountStr = 0
|
||||
Var RemainAmountStr !assigned StringFmt( 0, DisplayFormat, PreScaleConvertShow )
|
||||
Else
|
||||
If show_eng = "true" Then
|
||||
Var RemainAmountStr !assigned StringFmt( Canout, DisplayFormat, PreScaleConvertShow )
|
||||
Var RemainAmountStr = "Change " + RemainAmountStr
|
||||
Var RemainAmountStr = RemainAmountStr + "###size=90"
|
||||
Else
|
||||
Var RemainAmountStr = "ทอน " + Canout
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
|
||||
If Seeker.StoreCreditFlag = 1 Then
|
||||
Var RemainAmountStr = 0
|
||||
Var RemainAmountStr !assigned StringFmt( 0, DisplayFormat, PreScaleConvertShow )
|
||||
EndIf
|
||||
|
||||
|
||||
Var CancleState = "Disable"
|
||||
Var CoinInOK = 1
|
||||
Var CoinInCounter = 0
|
||||
|
||||
Var TxRef1 = ""
|
||||
CreateTxRef1 TxRef1
|
||||
|
||||
|
||||
|
||||
Else
|
||||
Var RemainAmountStr = "" + RemainAmount
|
||||
Var RemainAmountStr !assigned StringFmt( RemainAmount, DisplayFormat, PreScaleConvertShow )
|
||||
EndIf
|
||||
|
||||
Var Timeout = 0
|
||||
|
||||
|
||||
Var RemainAmountStr !assigned StringFmt( SumAmount, DisplayFormat, PreScaleConvertShow )
|
||||
Var showRemaining = charOfBaht + RemainAmountStr
|
||||
|
||||
|
||||
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
|
|
@ -468,35 +326,47 @@ TimerReset
|
|||
<Align> Center </Align>
|
||||
<Width> 1080 </Width>
|
||||
<Font> KanitRegularTTF </Font>
|
||||
<State> alphaState2 </State>
|
||||
<Color> 0xDE794E </Color>
|
||||
<Value> RemainAmountStr </Value>
|
||||
</Text>
|
||||
|
||||
|
||||
<Text>
|
||||
<X> 253 </X>
|
||||
<Y> 1254 </Y>
|
||||
<Size> 20 </Size>
|
||||
<Width> 375 </Width>
|
||||
<Font> KanitRegularTTF </Font>
|
||||
<State> warning_price_state </State>
|
||||
<Color> 0xE4202B </Color>
|
||||
<Value>
|
||||
eval(
|
||||
If show_eng = "true" Then
|
||||
Var return = "*Amount must equal or exceed price."
|
||||
Else
|
||||
Var return = "*จำนวนเงินต้องเท่ากับหรือมากกว่าราคาสินค้า"
|
||||
EndIf
|
||||
)
|
||||
</Value>
|
||||
</Text>
|
||||
|
||||
<Text>
|
||||
<X> 253 </X>
|
||||
<Y> 1271 </Y>
|
||||
<Y> 1295 </Y>
|
||||
<Size> 25 </Size>
|
||||
<Align> Right </Align>
|
||||
<Width> 500 </Width>
|
||||
<Font> KanitRegularTTF </Font>
|
||||
<State> alphaState2 </State>
|
||||
<Color> 0x746253 </Color>
|
||||
<Value> NamePriceShow </Value>
|
||||
</Text>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Button>
|
||||
<X> 397 </X>
|
||||
<Y> 1380 </Y>
|
||||
|
||||
<Filename> Var( DirImage + "/bn_cancel2.png" )</Filename>
|
||||
<FilenamePress> Var( DirImage + "/bn_cancel2.png" )</FilenamePress>
|
||||
<X> 330 </X>
|
||||
<Y> 1355 </Y>
|
||||
<Filename> Var( DirImage + "/bn_cancel3.png" )</Filename>
|
||||
<FilenamePress> Var( DirImage + "/bn_cancel3.png" )</FilenamePress>
|
||||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
|
|
@ -504,39 +374,35 @@ TimerReset
|
|||
If CoinInOK = 0 Then
|
||||
If CancelFlag = 0 Then
|
||||
SAVELOG "ButtonCancleAlpha2 > Cancle Order."
|
||||
|
||||
|
||||
If ReqPayWithCash = 1 Then
|
||||
Var BmiYear = useCreditAmount
|
||||
Var GetScore = "useCredit"
|
||||
AddData 24 TelephoneNumber BmiYear PointCrm GetScore
|
||||
EndIf
|
||||
|
||||
Var CancelFlag = 1
|
||||
CoinVending OFF
|
||||
Var CancelCounter = 0
|
||||
If show_eng = "true" Then
|
||||
Var RemainAmountStr = "Refund"
|
||||
Else
|
||||
Var RemainAmountStr = "คืนเงิน"
|
||||
EndIf
|
||||
Var CancelFlag = 1
|
||||
If CoinAmount = 0 Then
|
||||
If show_eng = "true" Then
|
||||
Var RemainAmountStr = "Cancelled"
|
||||
Else
|
||||
Var RemainAmountStr = "ยกเลิก"
|
||||
EndIf
|
||||
Else
|
||||
CoinVending OFF
|
||||
EndIf
|
||||
If Seeker.StoreCreditFlag = 1 Then
|
||||
Else
|
||||
If show_eng = "true" Then
|
||||
Var RemainAmountStr = "Keep credit"
|
||||
Else
|
||||
Var RemainAmountStr = "เก็บเครดิต"
|
||||
EndIf
|
||||
|
||||
CoinVending BILLSTACKALL
|
||||
EndIf
|
||||
If ViewBill > 0 Then
|
||||
CoinVending BILLREJECT
|
||||
EndIf
|
||||
|
||||
|
||||
|
||||
Refresh
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
|
|
@ -546,77 +412,24 @@ TimerReset
|
|||
</EventClick>
|
||||
</Button>
|
||||
|
||||
<Image>
|
||||
<X> 181 </X>
|
||||
<Y> 658 </Y>
|
||||
<State> alphaState3 </State>
|
||||
<Filename> Var( DirImage2 + img_popup15 )</Filename>
|
||||
</Image>
|
||||
|
||||
<Text>
|
||||
<X> 0 </X>
|
||||
<Y> 1010 </Y>
|
||||
<Size> 120 </Size>
|
||||
<Align> Center </Align>
|
||||
<Width> 1080 </Width>
|
||||
<Font> KanitRegularTTF </Font>
|
||||
<State> alphaState3 </State>
|
||||
<Color> 0xDE794E </Color>
|
||||
<Value> RemainAmountKeepStr </Value>
|
||||
</Text>
|
||||
|
||||
|
||||
<Button>
|
||||
<X> 330 </X>
|
||||
<Y> 1303 </Y>
|
||||
<State> alphaState3 </State>
|
||||
<Filename> Var( DirImage + "/bn_confirm2.png" )</Filename>
|
||||
<FilenamePress> Var( DirImage + "/bp_confirm2.png" )</FilenamePress>
|
||||
<Y> 1355 </Y>
|
||||
<State> confirmButtonState </State>
|
||||
<Filename> Var( DirImage + "/bn_confirm2.png" ) </Filename>
|
||||
<FilenamePress> Var( DirImage + "bp_confirm2.png" ) </FilenamePress>
|
||||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
|
||||
CoinVending BILLSTACKALL
|
||||
Var Seeker.StoreCreditFlag = 1
|
||||
|
||||
Var alphaState3 = "Invisible"
|
||||
|
||||
Refresh
|
||||
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
|
||||
<Button>
|
||||
<X> 330 </X>
|
||||
<Y> 1419 </Y>
|
||||
<State> alphaState3 </State>
|
||||
<Filename> Var( DirImage + "/bn_cancel3.png" )</Filename>
|
||||
<FilenamePress> Var( DirImage + "/bp_cancel3.png" )</FilenamePress>
|
||||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
|
||||
If ViewBill > 0 Then
|
||||
CoinVending BILLREJECT
|
||||
If CoinInOK = 0 Then
|
||||
SAVELOG "ButtonConfirm"
|
||||
CoinVending OFF
|
||||
Var CoinInOK = 1
|
||||
Var CoinInCounter = 0
|
||||
EndIf
|
||||
|
||||
Var alphaState3 = "Invisible"
|
||||
|
||||
Refresh
|
||||
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
<Image>
|
||||
<X> 145 </X>
|
||||
<Y> 820 </Y>
|
||||
<State> ShowErrorText </State>
|
||||
<Refresh> "Enable" </Refresh>
|
||||
<Filename> Var( DirImage + text_show_error ) </Filename>
|
||||
</Image>
|
||||
|
||||
|
||||
;include="ROOT/taobin_project/inc/video.inc"
|
||||
|
||||
<EventSecurity>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue