diff --git a/image/pos/bn_close_en.png b/image/pos/bn_close_en.png new file mode 100644 index 00000000..74a26717 Binary files /dev/null and b/image/pos/bn_close_en.png differ diff --git a/image/pos/bn_close_th.png b/image/pos/bn_close_th.png new file mode 100644 index 00000000..582eddcb Binary files /dev/null and b/image/pos/bn_close_th.png differ diff --git a/image/pos/bp_close_en.png b/image/pos/bp_close_en.png new file mode 100644 index 00000000..60a3529a Binary files /dev/null and b/image/pos/bp_close_en.png differ diff --git a/image/pos/bp_close_th.png b/image/pos/bp_close_th.png new file mode 100644 index 00000000..92966e14 Binary files /dev/null and b/image/pos/bp_close_th.png differ diff --git a/image/pos/pos_fail_en.png b/image/pos/pos_fail_en.png new file mode 100644 index 00000000..0ad2bc6e Binary files /dev/null and b/image/pos/pos_fail_en.png differ diff --git a/image/pos/pos_fail_th.png b/image/pos/pos_fail_th.png new file mode 100644 index 00000000..0f11be18 Binary files /dev/null and b/image/pos/pos_fail_th.png differ diff --git a/xml/event/tricker.ev b/xml/event/tricker.ev index 5b39d92c..86f815be 100644 --- a/xml/event/tricker.ev +++ b/xml/event/tricker.ev @@ -423,6 +423,11 @@ DEBUGVAR JemilaRewardOutOfStock Var New_Payment = 0 Var NewFlowPaymentCode = 0 +If BoxID = 105005 Then + Var New_Payment = 1 + Var NewFlowPaymentCode = 1 +EndIf + If BoxID = 173149 Then Var New_Payment = 1 Var NewFlowPaymentCode = 1 @@ -469,3 +474,10 @@ If BoxID = 176757 Then Var SaveOrderNameAndPictureEnable = 1 EndIf +; Check POS machine flag +Var ConnectWithPOSMachine = 0 + +READ_FILE "/mnt/sdcard/coffeevending/POS_MACHINE" POSMachineFlag +If POSMachineFlag = 1 Then + Var ConnectWithPOSMachine = 1 +EndIf diff --git a/xml/page_payment.xml b/xml/page_payment.xml index 9e64d1ae..7b8188f0 100644 --- a/xml/page_payment.xml +++ b/xml/page_payment.xml @@ -8,7 +8,7 @@ ;world-class OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_blank.xml" - + ;Open "ROOT/taobin_project/xml/page_display_ExclusiveGift.xml" @@ -33,7 +33,7 @@ Var ServiceCharge = 0 - Var AdultFlag = 0 + Var AdultFlag = 0 If Only18 = "true" Then DEBUGVAR AdultState1 @@ -68,7 +68,7 @@ DEBUGVAR CustomerFilterType EndIf - If NightTime = 1 Then + If NightTime = 1 Then If SelectDrink = "12-99-03-0066" Then Var PriceDrink = 60 EndIf @@ -110,10 +110,10 @@ Var QRCODE3 = "VDGN" Var QRCODE4 = BoxID Var QRCODE5 = SelectSlot - Var QRCODE6 = SelectDrink - Var QRCODE7 = PriceDrink + Var QRCODE6 = SelectDrink + Var QRCODE7 = PriceDrink Var QRCODE8 = "" - + Var CountStepPackPayment = 0 Var CountStepForCupFlagDelay = 0 @@ -121,13 +121,13 @@ Var ReqPayInfoFromCashOther = 0 - + Var Seeker.PromotionIDCurrentOrder = 0 Var Seeker.TxRef1 = "" Var Seeker.OrderChanel = "Normal" - + Var Seeker.CurrCreditAmount = 0 Var Seeker.CurrCreditUse = 0 Var Seeker.CurrCreditTelNum = "" @@ -141,26 +141,26 @@ Var Seeker.IntVendingCampaign = 0 Var Seeker.FreeVendingCampaign = 0 Var Seeker.CodeChannel = 0 - Var CoinVendingOnFlag = 0 + Var CoinVendingOnFlag = 0 Var Seeker.CreditCard = 0 Var Seeker.CreditCardRef = "" Var Seeker.UseCreditPayFullDrinkPrice = 0 Var Seeker.IntVendingCredit = 0 - + Var Seeker.StoreCreditFlag = 0 Var Seeker.pageStoreCredit0 = 0 Var Seeker.TNumberTaobinCredit = "" Var Seeker.TNumberTaobinMember = "" Var Seeker.CoffeePinNumber = "" - + Var Seeker.VendingDiscount = 0 Var Seeker.VendingCampaign = 0 Var Seeker.VendingTSID = "" Var Seeker.CreditNotEnoughRefID = "" - + Var PayType = "" Var CART_INDEX = 0 @@ -169,7 +169,7 @@ Var LOADING_STATE = "Invisible" Var QR_POPUP = "/img_popup2.png" - If show_eng = "true" Then + If show_eng = "true" Then Var DirImage = "ROOT/taobin_project/image/page_payment_en/page_payment" Var PlaySoundLag = "ROOT/taobin_project/sound_eng/How_would_you_like_to_pay.mp3" Var PlaySoundCodeLang = "ROOT/taobin_project/sound_eng/Code8digit.mp3" @@ -178,24 +178,24 @@ Else Var DirImage = "ROOT/taobin_project/image/page_payment" Var PlaySoundLag = "ROOT/taobin_project/sound_thai/payment.mp3" - + If FromJemilaPro = 1 Then Var PlaySoundLag = "/mnt/sdcard/coffeevending/taobin_project/sound_thai/jemila/payment.m4a" EndIf - + ; Play Sound #zone If SoundBackToSchoolEnable = 1 Then - - If SoundBackToSchoolType = 1 Then + + If SoundBackToSchoolType = 1 Then Var RootPathSoundBackToSchool = "/mnt/sdcard/coffeevending/taobin_project/sound_thai/boy/" EndIf - If SoundBackToSchoolType = 2 Then + If SoundBackToSchoolType = 2 Then Var RootPathSoundBackToSchool = "/mnt/sdcard/coffeevending/taobin_project/sound_thai/girl/" EndIf Var PlaySoundLag = RootPathSoundBackToSchool + "payment.wav" EndIf - - + + Var PlaySoundCodeLang = "ROOT/sounds/Code8digit.m4a" EndIf @@ -203,7 +203,7 @@ SAVELOG MachineStage - + If AdultFlag = 1 Then If CameraCount = 1 Then CameraSetting "usbfront" "default" "Rotate=90,Resolution=1280x720,scaleX=1.0,scaleY=1.0" @@ -222,7 +222,7 @@ EndIf - + ; Test ;Var MachineStage = "-" @@ -242,7 +242,7 @@ Var ServiceType = "coffee" Var VendingCreditRemain = "" - + DEBUGVAR Seeker.thankLidFlag @@ -275,7 +275,7 @@ EndIf - ; + ; DEBUGVAR PromotionIDCurrentOrder @@ -306,23 +306,45 @@ DEBUGVAR TOPPING_PRICE TRY "ROOT/taobin_project/xml/process/discount_from_promotion.ev" - + DEBUGVAR PromotionIDCurrentOrder Var CoundDownStillOnPage = 240 __CMD "CLEAR_TIME_BLINK_DISPLAY" 0 "-" "-" + Var WaitPOSStatus = 0 + ;new payment coffee-payment - If New_Payment = 1 Then + If New_Payment = 1 Then SAVELOG "NEW-PAYMENT NEW-PAYMENT NEW-PAYMENT NEW-PAYMENT NEW-PAYMENT NEW-PAYMENT " Var Seeker.ORDER_ID = "" GenHashWithTimeStamp Seeker.ORDER_ID + + DEBUGVAR Seeker.NameDrinkTH + DEBUGVAR Seeker.NameDrinkEN + + Var param1 = Seeker.ORDER_ID + Var param2 = Seeker.NameDrinkEN + + STRCONTAIN "size" Seeker.NameDrinkEN SizeFromSheet + If SizeFromSheet = "true" Then + SPLIT Seeker.NameDrinkEN "###" 1 PureName + Var param2 = PureName + EndIf + + If ConnectWithPOSMachine = 1 Then + Var WaitPOSStatus = 1 + Var TimeWaitPOSStatus = 0 + Var POS_SELL_STATUS = "-" + GetPOSStatus param1 param2 + EndIf + EndIf - + 900 - + If stop_now = "true" Then SAVELOG "stop_now is true page_payment" @@ -349,7 +371,7 @@ EndIf EndIf - + If CupChecking = "true" Then If HaveCup = "true" Then SAVELOG "Have cup" @@ -369,7 +391,7 @@ EndIf - + If ReadyForBrew = "false" Then Open "ROOT/taobin_project/xml/page_back_to_main.xml" Var ReadyForBrew = "false" @@ -382,7 +404,7 @@ EndIf EndIf - + ;If CupChecking = "false" Then ; Var CountStepPackPayment = CountStepPackPayment + 1 ;EndIf @@ -395,96 +417,118 @@ DEBUGVAR ToppingDetailCurr DEBUGVAR ToppingDetailNext - - - If CountStepPackPayment = CountStepForCupFlagDelay Then - If Seeker = "curr" Then - Var Seeker.ExtendData = ExtendDataCurr - Var Seeker.PayDetail2 = ToppingDetailCurr - Else - Var Seeker.ExtendData = ExtendDataNext - Var Seeker.PayDetail2 = ToppingDetailNext - EndIf - DEBUGVAR Seeker - DEBUGVAR Seeker.ExtendData - - If GetPayInfoFlag = 0 Then - SaveLog "RoadShow test" - If RoadShow = "false" Then - ;CoinVending ON - If AdultFlag = 1 Then - Var CoinAmount = 0 - Else - If NOCashFlag = 0 Then - SAVELOG "CoinVending XBILL from page_payment" - CoinVending XBILL - Else - Var CoinAmount = 0 - EndIf - EndIf - ;Var CoinAmount = 0 - Var Delay = 1 - Else - Var Delay = 1 - EndIf + If WaitPOSStatus = 1 Then - - Var RemainAmount = 0 + If TimeWaitPOSStatus < 10 Then + Var TimeWaitPOSStatus = TimeWaitPOSStatus + 1 + + If POS_SELL_STATUS = "READY" Then + Var WaitPOSStatus = 0 + EndIf + + Else + If POS_SELL_STATUS = "READY" Then + Var WaitPOSStatus = 0 + Else + Open "ROOT/taobin_project/xml/pos_fail.xml" + EndIf + EndIf + + Else + If CountStepPackPayment = CountStepForCupFlagDelay Then + If Seeker = "curr" Then + Var Seeker.ExtendData = ExtendDataCurr + Var Seeker.PayDetail2 = ToppingDetailCurr + Else + Var Seeker.ExtendData = ExtendDataNext + Var Seeker.PayDetail2 = ToppingDetailNext + EndIf + DEBUGVAR Seeker + DEBUGVAR Seeker.ExtendData + + If GetPayInfoFlag = 0 Then + SaveLog "RoadShow test" + If RoadShow = "false" Then + ;CoinVending ON + + + If AdultFlag = 1 Then + Var CoinAmount = 0 + Else + If NOCashFlag = 0 Then + SAVELOG "CoinVending XBILL from page_payment" + CoinVending XBILL + Else + Var CoinAmount = 0 + EndIf + EndIf + ;Var CoinAmount = 0 + Var Delay = 1 + Else + Var Delay = 1 + EndIf + + + Var RemainAmount = 0 - Var SessionID2 = SelectSlot + ":" - Var SessionID2 = SessionID2 + Seeker.ExtendData + Var SessionID2 = SelectSlot + ":" + Var SessionID2 = SessionID2 + Seeker.ExtendData - EndIf + EndIf - ; Reset - Var MachineState_Result = 0 + ; Reset + Var MachineState_Result = 0 - DEBUGVAR Seeker - DEBUGVAR Seeker.ExtendData + DEBUGVAR Seeker + DEBUGVAR Seeker.ExtendData - Var CountStepPackPayment = 1 + Var CountStepPackPayment = 1 + EndIf + + If Delay = 1 Then + Var DelayCount = DelayCount + 1 + + If DelayCount >= 2 Then + If web_readyOK = "true" Then + + Var Seeker.OrderChanel = "WebApp" + + Var Seeker.selected_a_drink = SelectDrink + Var Seeker.ServiceAmount2 = PriceDrink + Var PayAmount = PriceDrink + + If web_payment = "CODE" Then + Open "ROOT/taobin_project/xml/page_payment_code.xml" + EndIf + + If web_payment = "CREDIT" Then + Open "ROOT/taobin_project/xml/page_payment_credit.xml" + EndIf + + EndIf + + + If Only18 = "true" Then + Var AdultFlag = 0 + EndIf + + Open "ROOT/taobin_project/xml/page_payment_cash.xml" + EndIf + EndIf EndIf - If Delay = 1 Then - Var DelayCount = DelayCount + 1 - - If DelayCount >= 2 Then - If web_readyOK = "true" Then - - Var Seeker.OrderChanel = "WebApp" - - Var Seeker.selected_a_drink = SelectDrink - Var Seeker.ServiceAmount2 = PriceDrink - Var PayAmount = PriceDrink - - If web_payment = "CODE" Then - Open "ROOT/taobin_project/xml/page_payment_code.xml" - EndIf - - If web_payment = "CREDIT" Then - Open "ROOT/taobin_project/xml/page_payment_credit.xml" - EndIf - - EndIf - If Only18 = "true" Then - Var AdultFlag = 0 - EndIf - - Open "ROOT/taobin_project/xml/page_payment_cash.xml" - EndIf - EndIf TimerReset Refresh - +