taobin_project/xml/page_thankyouConti.xml

595 lines
12 KiB
XML

<Popup>
<Cache> "Enable" </Cache>
<Width> 1080 </Width>
<Height> 1920 </Height>
<Background> BackgroundColor </Background>
<Sound> "ROOT/taobin_project/sounds/chaching.mp3" </Sound>
<Volume> SoundVolume </Volume>
<EventOpen>
; This page Seeker must curr
; On open
Var CountDownThankyou = 4
Var CountDownBrewing = BrewTime
Var CountUpBrewing = 0
SAVELOG BrewTime
Var ShowCountDownBrewing = CountDownBrewing
Var Timeout = 0
Var ChangeFlag = 0
Var ErrTimeout = 0
Var ActionOKCase = 0
Var ChangeTimeout = 0
Var ChangeOK = 0
Var buttonRemoveCup = "Invisible"
Var MachineState_Result = 0
Var FailedCount = 0
Var ChangeAmountSum = 0
Var Tel_Confirm_Flag = 0
Var LastMakeDrinkResult = "-"
DEBUGVAR MachineStage
DEBUGVAR NextOrderStatus
Var text_id_001525 = 001525
Var text_id_001526 = 001526
Var TEXT_ID_STRING_001525 !assigned GetLanguageID(text_id_001525, LanguageShowByIndex)
Var TEXT_ID_STRING_001526 !assigned GetLanguageID(text_id_001526, LanguageShowByIndex)
If show_eng = "true" Then
Var ImageDoing = "ROOT/taobin_project/image/page_doing/img2_eng.png"
Var show_btp = "ROOT/taobin_project/image/bn_thai_lang_press.png"
Var show_btn = "ROOT/taobin_project/image/bn_thai_lang.png"
Var BottomText = PicturePath + "text_bottom_eng.png"
Else
Var ImageDoing = "ROOT/taobin_project/image/page_doing/img2.png"
Var show_btp = "ROOT/taobin_project/image/bn_eng_lang_press.png"
Var show_btn = "ROOT/taobin_project/image/bn_eng_lang.png"
Var BottomText = PicturePath + "text_bottom_thai2.png"
EndIf
;inter-image
If LanguageShow = "MYANMAR" Then
Var BottomText = PicturePath + "text_bottom_eng.png"
Var DirImage = "ROOT/taobin_project/image/page_thankyou_mmr"
EndIf
If LanguageShow = "MSC" Then
Var BottomText = PicturePath + "text_bottom_eng.png"
Var DirImage = "ROOT/taobin_project/image/page_thankyou_msc"
EndIf
;DEBUGVAR StarwState
;DEBUGVAR LidState
DEBUGVAR BottomText
DEBUGVAR Seeker.TNumberTaobinCredit
DEBUGVAR TelephoneNumber
DEBUGVAR Seeker.StoreCreditFlag
Var SaveTheWorldST = "Invisible"
Var SaveTheWorldCount = 0
If Seeker = "curr" Then
SAVELOG "Call from thankyou Conti"
If Seeker.get_a_straw = "Press" Then
Machine StrawOrder
Var LedLidBlink = "true"
Var SaveTheWorldCount = SaveTheWorldCount + 1
Var bg_lidProblem_ST = "Invisible"
EndIf
If Seeker.get_a_lid = "Press" Then
Machine LidOrder
Var LedLidBlink = "true"
Var SaveTheWorldCount = SaveTheWorldCount + 1
Var bg_lidProblem_ST = "Enable"
EndIf
;include="ROOT/taobin_project/inc/select_drink_current_multi_topping.inc"
Topping "ClearNextOrder" "-"
EndIf
DEBUGVAR LastMakeDrinkResult
DEBUGVAR MachineStage
DEBUGVAR NextOrderStatus
Var DirImage = "ROOT/taobin_project/image/complete/"
If LanguageShow = "ENG" Then
Var DirImage = "ROOT/taobin_project/image/complete_en/"
EndIf
;inter-image
If LanguageShow = "MYANMAR" Then
Var DirImage2 = "ROOT/taobin_project/image/complete_mmr/"
EndIf
If LanguageShow = "MSC" Then
Var DirImage2 = "ROOT/taobin_project/inter/hkg/image/complete_msc/"
EndIf
If LanguageShow = "MTC" Then
Var DirImage2 = "ROOT/taobin_project/inter/hkg/image/complete_mtc/"
EndIf
Var txtDrinkOKState = "Invisible"
Var buttonRemoveCup = "Invisible"
Var CountUpDoorCupOpen = 0
Machine DoorClose
Var Timeout2 = 0
Var SlientRefreshEnable = 0
;include=ROOT/taobin_project/inc/remove_cup_event_open.inc
Var buttonRemoveCup = "Invisible"
SAVELOG "Thank you conti version TCT7"
SAVELOG "Support NextSmoothie"
DEBUGVAR NextSmoothie
DEBUGVAR Seeker.SmoothieToPayment
;PendingFlag InternationalEnable
;PendingFlag New_Payment
;PendingFlag
Var CupErrorCodeForNextOrder = 0
Var CountDownForShowMenuNextOrderToBrew = 4
</EventOpen>
<Timeout> 1000 </Timeout>
<EventTimeout>
Var CountDownBrewing = CountDownBrewing - 1
DEBUGVAR MachineStage
DEBUGVAR HaveCup
DEBUGVAR CHECKCUP
DEBUGVAR CupChecking
DEBUGVAR MaybeHaveCup
DEBUGVAR DoorCupPosition
DEBUGVAR CountUpDoorCupOpen
DEBUGVAR Timeout
DEBUGVAR Timeout2
Var Timeout2 = Timeout2 + 1
; Timeout2 10*60*2
; To be obsolete
If Timeout2 > 900 Then
SAVELOG "Timeout2 900"
SAVELOG "Make next order by take-cup with close-maintenance 2"
Var error_code_stop_now = 1221
If DoorCupPosition = "bottom" Then
Else
Var error_code_stop_now = 1296
__CMD "error-code-1296" 0 "-" "-"
EndIf
Var LastMakeDrinkResult = "fail"
If New_Payment = 1 Then
__CMD "SetPay" "coffee-payment" Seeker.VendingTSID Seeker.ORDER_ID
EndIf
Open "ROOT/taobin_project/xml/page_cannotConti.xml "
EndIf
If Timeout2 > 898 Then
SAVELOG "Timeout2 898"
SAVELOG "Make next order by take-cup with close-maintenance 3"
Var error_code_stop_now = CupErrorCodeForNextOrder
If DoorCupPosition = "bottom" Then
Else
Var error_code_stop_now = 1296
__CMD "error-code-1296" 0 "-" "-"
EndIf
If New_Payment = 1 Then
__CMD "SetPay" "coffee-payment" Seeker.VendingTSID Seeker.ORDER_ID
EndIf
Var LastMakeDrinkResult = "fail"
Open "ROOT/taobin_project/xml/page_cannotConti.xml"
EndIf
; setvarint Timeout2 888
If Timeout2 > 890 Then
__CMD "cup-error-code" "-" "-" "-"
DEBUGVAR CupErrorCodeForNextOrder
EndIf
If MachineStage = "close-maintenance" Then
If stop_now = "true" Then
Var LastMakeDrinkResult = "fail"
If New_Payment = 1 Then
__CMD "SetPay" "coffee-payment" Seeker.VendingTSID Seeker.ORDER_ID
EndIf
Open "ROOT/taobin_project/xml/page_cannotConti.xml"
EndIf
EndIf
__CMD "check-cup" Seeker.selected_a_drink "-" "-"
; old condition
If HaveCup = "false" Then
If MachineStage = "show-menu" Then
Var VideoPlayFile = VideoPath
Var VideoPlayFile = VideoPlayFile + VideoFileBegin
Var VideoPlayFile = VideoPlayFile + "1"
Var VideoPlayFile = VideoPlayFile + VideoFileEnd
Var PictureFile = PicturePath
Var PictureFile = PictureFile + PictureBegin
Var PictureFile = PictureFile + "1"
Var PictureFile = PictureFile + PictureEnd
DEBUGVAR Seeker.selected_a_drink
If NextOrderStatus = "Disable" Then
Var LastMakeDrinkResult = "fail"
Else
Var CountDownThankyou = 0
EndIf
EndIf
EndIf
DEBUGVAR CountDownThankyou
; obsolete
If CountDownThankyou = 99 Then
; reset all var
DEBUGVAR MachineStage
SAVELOG "CountDownThankyou = 0"
Var CountDownBrewing = BrewTime
Var CountUpBrewing = 0
SAVELOG BrewTime
Var ShowCountDownBrewing = CountDownBrewing
Var MachineState_Result = 0
If MachineStage = "show-menu" Then
If HaveCup = "false" Then
Var LastMakeDrinkResult = "-"
If New_Payment = 1 Then
__CMD "SetPay" "coffee-payment" Seeker.VendingTSID Seeker.ORDER_ID
EndIf
MakeDrinkV1 Seeker.selected_a_drink SelectSugarID
If CountryName = "Thailand" Then
If New_Payment = 1 Then
Open "ROOT/taobin_project/xml/page_NewBrewing3.xml"
Else
Open "ROOT/taobin_project/xml/page_brewing3.xml"
EndIf
Else
If InternationalEnable = 1 Then
Var Brew3Inter = CountryRootPath + "/xml/page_brewing3.lxml"
Open Brew3Inter
Else
;obsolete
If New_Payment = 1 Then
Open "ROOT/taobin_project/xml/page_NewBrewing3.xml"
Else
Open "ROOT/taobin_project/xml/page_brewing3.xml"
EndIf
EndIf
EndIf
EndIf
EndIf
EndIf
; run test;
If CountDownThankyou = 0 Then
; reset all var
DEBUGVAR MachineStage
SAVELOG "CountDownThankyou = 0"
Var CountDownBrewing = BrewTime
Var CountUpBrewing = 0
SAVELOG BrewTime
Var ShowCountDownBrewing = CountDownBrewing
Var MachineState_Result = 0
If MenuReadyForCup = "YES" Then
; smoothie next
If NextSmoothie = 1 Then
DEBUGVAR Seeker
DEBUGVAR Seeker.SmoothieToPayment
Var NextSmoothie = 0
If Seeker.SmoothieToPayment = 1 Then
Var TimeOutSmoothiesProcess = 120
Var Seeker.SmoothieToPayment = 0
OpenInst 3 "ROOT/taobin_project/xml/topview2.xml"
Open "ROOT/taobin_project/inter/tha/xml/page_smoothie_suggest_and_process.xml"
EndIf
EndIf
Var LastMakeDrinkResult = "-"
If New_Payment = 1 Then
__CMD "SetPay" "coffee-payment" Seeker.VendingTSID Seeker.ORDER_ID
EndIf
MakeDrinkV1 Seeker.selected_a_drink SelectSugarID
If CountryName = "Thailand" Then
If New_Payment = 1 Then
Open "ROOT/taobin_project/xml/page_NewBrewing3.xml"
Else
Open "ROOT/taobin_project/xml/page_brewing3.xml"
EndIf
Else
If InternationalEnable = 1 Then
Var Brew3Inter = CountryRootPath + "/xml/page_brewing3.lxml"
Open Brew3Inter
Else
;obsolete
If New_Payment = 1 Then
Open "ROOT/taobin_project/xml/page_NewBrewing3.xml"
Else
Open "ROOT/taobin_project/xml/page_brewing3.xml"
EndIf
EndIf
EndIf
EndIf
EndIf
If IceCleanStatus = "wait" Then
Var MachineMessageEnable = "Enable"
If IceCleanCount > 0 Then
Var MachineMessageValue = "กำลังเตรียมเครื่อง " + IceCleanCount
Else
Var MachineMessageValue = "กำลังเตรียมเครื่อง "
EndIf
Else
Var MachineMessageEnable = "Invisible"
EndIf
Var ShowCountDownBrewing = CountDownBrewing
;include=ROOT/taobin_project/inc/remove_cup_step.inc
If Timeout2 < 3 Then
Var buttonRemoveCup = "Invisible"
EndIf
If buttonRemoveCup = "Invisible" Then
Var MachineErrorDetailAll = TEXT_ID_STRING_001525
Else
If CupChecking = "true" Then
Var MachineErrorDetailAll = TEXT_ID_STRING_001525
Else
Var MachineErrorDetailAll = TEXT_ID_STRING_001526
EndIf
EndIf
If Timeout2 < 3 Then
Var MachineErrorDetailAll = "..."
EndIf
DEBUGVAR MenuReadyForCup
If MenuReadyForCup = "YES" Then
If DoorCupPosition = "bottom" Then
Var VideoPlayFile = VideoPath
Var VideoPlayFile = VideoPlayFile + VideoFileBegin
Var VideoPlayFile = VideoPlayFile + "1"
Var VideoPlayFile = VideoPlayFile + VideoFileEnd
Var PictureFile = PicturePath
Var PictureFile = PictureFile + PictureBegin
Var PictureFile = PictureFile + "1"
Var PictureFile = PictureFile + PictureEnd
DEBUGVAR CountDownForShowMenuNextOrderToBrew
DEBUGVAR Seeker.selected_a_drink
If CountDownForShowMenuNextOrderToBrew = 3 Then
EndIf
If CountDownForShowMenuNextOrderToBrew = 0 Then
Var CountDownThankyou = 0
Else
Var CountDownForShowMenuNextOrderToBrew = CountDownForShowMenuNextOrderToBrew - 1
EndIf
Else
Machine DoorClose
EndIf
Var buttonRemoveCup = "Invisible"
Else
EndIf
Refresh
TimerReset
</EventTimeout>
;__CMD "error-code-clear-all" "-" "-" "-"
;include=ROOT/taobin_project/inc/remove_cup_tag_event.inc
<Image>
<X> 375 </X>
<Y> 623 </Y>
<Width> 331 </Width>
<Height> 435 </Height>
<Filename> Seeker.PictureDrink </Filename>
</Image>
<Text>
<X> 0 </X>
<Y> 938 </Y>
<Width> 1080</Width>
<Align> Center </Align>
<Size> 72 </Size>
<Font> KanitMediumTTF </Font>
<Color> HeadlineColor </Color>
<Value> Seeker.showname </Value>
</Text>
<EventChangeStatus>
If ChangeStatus = "payout-end" Then
EndIf
</EventChangeStatus>
<Image>
<X> 77 </X>
<Y> 1378 </Y>
<State> txtDrinkOKState </State>
<Filename> Var( DirImage2 + "/txtDrinkOK.png" ) </Filename>
</Image>
<Button>
<X> 160 </X>
<Y> 1673 </Y>
<State> buttonRemoveCup </State>
<Interval> 500 </Interval>
<Filename> Var( DirImage2 + "/bn_open_door.png" ) </Filename>
<FilenamePress> Var( DirImage2 + "/bp_open_door.png" ) </FilenamePress>
<EventClick>
;include=ROOT/taobin_project/inc/remove_cup_button.inc
</EventClick>
</Button>
<Text>
<X> 5 </X>
<Y> 1868 </Y>
<State> MachineMessageEnable</State>
<Size> 24 </Size>
<Align> Center </Align>
<Width> 1080 </Width>
<Font> RobotoRegular </Font>
<Color> 0xDE794E </Color>
<Value> MachineMessageValue </Value>
</Text>
<Text>
<X> 1 </X>
<Y> 1 </Y>
<Font> KanitTTF </Font>
<Size> 22 </Size>
<Width> 1080 </Width>
<Align> end </Align>
<Color> 0xFF0000 </Color>
<Value> "TCT6 "</Value>
</Text>
<Text>
<X> 5 </X>
<Y> 1868 </Y>
<Size> 24 </Size>
<Align> Center </Align>
<Width> 1080 </Width>
<Font> RobotoRegular </Font>
<Color> 0xDE794E </Color>
<Value> MachineErrorDetailAll </Value>
</Text>
<EventUnitTest1>
Var Timeout2 = 0
__CMD "UpdateCupOnArm" UserSelectProductCode "-" "-"
</EventUnitTest1>
<EventUnitTest2>
Open "ROOT/taoin_project/xml/page_thankyouConti.xml"
</EventUnitTest2>
<EventUnitTest3>
</EventUnitTest3>
<EventUnitTest4>
</EventUnitTest4>
</Popup>