diff --git a/xml/page_topping_select8.xml b/xml/page_topping_select8.xml index 628a8266..e3d07f8f 100644 --- a/xml/page_topping_select8.xml +++ b/xml/page_topping_select8.xml @@ -9,7 +9,7 @@ Var UserSeletedSugar = 0 - SAVELOG "Event Open Select 7" + SAVELOG "Event Open Select 8" If NoWaitMachineEnable = 1 Then Var ConfirmDrinkButtonState = "Enable" @@ -919,30 +919,6 @@ DEBUGVAR SubMenuGroupIDSlot6_1 - If TOPPING6 = "Topping-Volcano" Then - If toppingID6price2 > 0 Then - Var testFormat !assigned StringFmt( toppingID6price2 , "%.0f฿", PreScaleConvertShow) - - Var CustomCoffeeQuantityAdditionalPrice[0] = "(+" + testFormat - Var CustomCoffeeQuantityAdditionalPrice[1] = "(+" + testFormat - - Var CustomCoffeeQuantityAdditionalPrice[0] = CustomCoffeeQuantityAdditionalPrice[0] + ")" - Var CustomCoffeeQuantityAdditionalPrice[1] = CustomCoffeeQuantityAdditionalPrice[1] + ")" - - Var CustomCoffeeLevelAdditionalPrice[0] = "(+" + testFormat - Var CustomCoffeeLevelAdditionalPrice[1] = "(+" + testFormat - - Var CustomCoffeeLevelAdditionalPrice[0] = CustomCoffeeLevelAdditionalPrice[0] + ")" - Var CustomCoffeeLevelAdditionalPrice[1] = CustomCoffeeLevelAdditionalPrice[1] + ")" - Else - Var CustomCoffeeQuantityAdditionalPrice[0] = "" - Var CustomCoffeeQuantityAdditionalPrice[1] = "" - - Var CustomCoffeeLevelAdditionalPrice[0] = "" - Var CustomCoffeeLevelAdditionalPrice[1] = "" - EndIf - EndIf - Var PriceCustomCoffeeFormat = "%.0f฿" If TOPPING7 = "water-level" Then @@ -954,29 +930,54 @@ Else If toppingID7index1 = toppingID7Default Then + Var CurrentCoffeeWaterId = toppingID7index1 Var CustomCoffeeWaterState[0] = "PressForever" + Var CustomCoffeeWaterState[1] = "Enable" + Var CustomCoffeeWaterState[2] = "Enable" + Var CustomCoffeeWaterState[3] = "Enable" + Var CustomCoffeeWaterState[4] = "Enable" EndIf If toppingID7index2 = toppingID7Default Then + Var CurrentCoffeeWaterId = toppingID7index2 + Var CustomCoffeeWaterState[0] = "Enable" Var CustomCoffeeWaterState[1] = "PressForever" + Var CustomCoffeeWaterState[2] = "Enable" + Var CustomCoffeeWaterState[3] = "Enable" + Var CustomCoffeeWaterState[4] = "Enable" EndIf If toppingID7index3 = toppingID7Default Then + Var CurrentCoffeeWaterId = toppingID7index3 + Var CustomCoffeeWaterState[0] = "Enable" + Var CustomCoffeeWaterState[1] = "Enable" Var CustomCoffeeWaterState[2] = "PressForever" + Var CustomCoffeeWaterState[3] = "Enable" + Var CustomCoffeeWaterState[4] = "Enable" EndIf If toppingID7index4 = toppingID7Default Then + Var CurrentCoffeeWaterId = toppingID7index4 + Var CustomCoffeeWaterState[0] = "Enable" + Var CustomCoffeeWaterState[1] = "Enable" + Var CustomCoffeeWaterState[2] = "Enable" Var CustomCoffeeWaterState[3] = "PressForever" + Var CustomCoffeeWaterState[4] = "Enable" EndIf If toppingID7index5 = toppingID7Default Then + Var CurrentCoffeeWaterId = toppingID7index5 + Var CustomCoffeeWaterState[0] = "Enable" + Var CustomCoffeeWaterState[1] = "Enable" + Var CustomCoffeeWaterState[2] = "Enable" + Var CustomCoffeeWaterState[3] = "Enable" Var CustomCoffeeWaterState[4] = "PressForever" EndIf EndIf EndIf - If TOPPING8 = "single-shot-espv2" Then + If TOPPING8 = "coffee-quantity" Then Var showCustomCoffee = "Enable" Var showCoffeeQuantity = "Enable" @@ -985,14 +986,24 @@ Else If toppingID8index1 = toppingID8Default Then + Var CurrentCoffeeQuantityId = toppingID8index1 Var CustomCoffeeQuantityState[0] = "PressForever" + Var CustomCoffeeQuantityState[1] = "Enable" + Var CustomCoffeeQuantityState[2] = "Enable" + EndIf If toppingID8index2 = toppingID8Default Then + Var CurrentCoffeeQuantityId = toppingID8index2 + Var CustomCoffeeQuantityState[0] = "Enable" Var CustomCoffeeQuantityState[1] = "PressForever" + Var CustomCoffeeQuantityState[2] = "Enable" EndIf If toppingID8index3 = toppingID8Default Then + Var CurrentCoffeeQuantityId = toppingID8index3 + Var CustomCoffeeQuantityState[0] = "Enable" + Var CustomCoffeeQuantityState[1] = "Enable" Var CustomCoffeeQuantityState[2] = "PressForever" EndIf EndIf @@ -1024,7 +1035,7 @@ EndIf - If TOPPING9 = "coffee-level" Then + If TOPPING9 = "single-shot-espv2" Then Var showCustomCoffee = "Enable" var showCoffeeLevel = "Enable" @@ -1033,14 +1044,24 @@ Else If toppingID9index1 = toppingID9Default Then + Var CurrentCoffeeLevelId = toppingID9index1 Var CustomCoffeeLevelState[0] = "PressForever" + Var CustomCoffeeLevelState[1] = "Enable" + Var CustomCoffeeLevelState[2] = "Enable" + EndIf If toppingID9index2 = toppingID9Default Then + Var CurrentCoffeeLevelId = toppingID9index2 + Var CustomCoffeeLevelState[0] = "Enable" Var CustomCoffeeLevelState[1] = "PressForever" + Var CustomCoffeeLevelState[2] = "Enable" EndIf If toppingID9index3 = toppingID9Default Then + Var CurrentCoffeeLevelId = toppingID9index3 + Var CustomCoffeeLevelState[0] = "Enable" + Var CustomCoffeeLevelState[1] = "Enable" Var CustomCoffeeLevelState[2] = "PressForever" EndIf @@ -1082,14 +1103,24 @@ Else If toppingID10index1 = toppingID10Default Then + Var CurrentCoffeeTampingId = toppingID10index1 Var CustomCoffeeTampingState[0] = "PressForever" + Var CustomCoffeeTampingState[1] = "Enable" + Var CustomCoffeeTampingState[2] = "Enable" + EndIf If toppingID10index2 = toppingID10Default Then + Var CurrentCoffeeTampingId = toppingID10index2 + Var CustomCoffeeTampingState[0] = "Enable" Var CustomCoffeeTampingState[1] = "PressForever" + Var CustomCoffeeTampingState[2] = "Enable" EndIf If toppingID10index3 = toppingID10Default Then + Var CurrentCoffeeTampingId = toppingID10index3 + Var CustomCoffeeTampingState[0] = "Enable" + Var CustomCoffeeTampingState[1] = "Enable" Var CustomCoffeeTampingState[2] = "PressForever" EndIf @@ -3338,8 +3369,28 @@ If showShotEnable = "Press" Then Var showShotEnable = "Enable" + + If TOPPING7 = "water-level" Then + Var showCustomCoffee = "Enable" + EndIf + + If TOPPING8 = "coffee-quantity" Then + Var showCustomCoffee = "Enable" + EndIf + + If TOPPING9 = "single-shot-espv2" Then + Var showCustomCoffee = "Enable" + EndIf + + If TOPPING10 = "tampping-espv2" Then + Var showCustomCoffee = "Enable" + EndIf + Else Var showShotEnable = "Press" + + ; Invisible showCustomCoffee + Var showCustomCoffee = "Invisible" EndIf Function 2 @@ -3370,8 +3421,28 @@ If showShotEnable = "Press" Then Var showShotEnable = "Enable" + + If TOPPING7 = "water-level" Then + Var showCustomCoffee = "Enable" + EndIf + + If TOPPING8 = "coffee-quantity" Then + Var showCustomCoffee = "Enable" + EndIf + + If TOPPING9 = "single-shot-espv2" Then + Var showCustomCoffee = "Enable" + EndIf + + If TOPPING10 = "tampping-espv2" Then + Var showCustomCoffee = "Enable" + EndIf + Else Var showShotEnable = "Press" + + ; Invisible showCustomCoffee + Var showCustomCoffee = "Invisible" EndIf Function 2 @@ -3597,8 +3668,12 @@ Var CustomCoffeeWaterState[0] = "PressForever" Var CustomCoffeeWaterState[1] = "Enable" Var CustomCoffeeWaterState[2] = "Enable" - Var CustomCoffeeWaterState[4] = "Enable" Var CustomCoffeeWaterState[3] = "Enable" + Var CustomCoffeeWaterState[4] = "Enable" + + Var CurrentCoffeeWaterId = toppingID7index1 + + Function 2 @@ -3617,8 +3692,14 @@ Var CustomCoffeeWaterState[0] = "Enable" Var CustomCoffeeWaterState[1] = "PressForever" Var CustomCoffeeWaterState[2] = "Enable" - Var CustomCoffeeWaterState[4] = "Enable" Var CustomCoffeeWaterState[3] = "Enable" + Var CustomCoffeeWaterState[4] = "Enable" + + Var CurrentCoffeeWaterId = toppingID7index2 + + + Function 2 + @@ -3637,8 +3718,14 @@ Var CustomCoffeeWaterState[0] = "Enable" Var CustomCoffeeWaterState[1] = "Enable" Var CustomCoffeeWaterState[2] = "PressForever" - Var CustomCoffeeWaterState[4] = "Enable" Var CustomCoffeeWaterState[3] = "Enable" + Var CustomCoffeeWaterState[4] = "Enable" + + Var CurrentCoffeeWaterId = toppingID7index3 + + + Function 2 + @@ -3660,6 +3747,12 @@ Var CustomCoffeeWaterState[3] = "PressForever" Var CustomCoffeeWaterState[4] = "Enable" + Var CurrentCoffeeWaterId = toppingID7index4 + + + Function 2 + + @@ -3680,6 +3773,11 @@ Var CustomCoffeeWaterState[3] = "Enable" Var CustomCoffeeWaterState[4] = "PressForever" + Var CurrentCoffeeWaterId = toppingID7index5 + + Function 2 + + @@ -3763,8 +3861,12 @@ Var CustomCoffeeQuantityState[1] = "Enable" Var CustomCoffeeQuantityState[2] = "Enable" + Var CurrentCoffeeQuantityId = toppingID8index1 + + Function 2 + @@ -3783,8 +3885,12 @@ Var CustomCoffeeQuantityState[1] = "PressForever" Var CustomCoffeeQuantityState[2] = "Enable" + Var CurrentCoffeeQuantityId = toppingID8index2 + + Function 2 + @@ -3803,8 +3909,11 @@ Var CustomCoffeeQuantityState[1] = "Enable" Var CustomCoffeeQuantityState[2] = "PressForever" + Var CurrentCoffeeQuantityId = toppingID8index3 + Function 2 + @@ -3886,8 +3995,12 @@ Var CustomCoffeeLevelState[1] = "Enable" Var CustomCoffeeLevelState[2] = "Enable" + Var CurrentCoffeeLevelId = toppingID9index1 + + Function 2 + @@ -3906,6 +4019,9 @@ Var CustomCoffeeLevelState[1] = "PressForever" Var CustomCoffeeLevelState[2] = "Enable" + Var CurrentCoffeeLevelId = toppingID9index2 + + Function 2 @@ -3927,9 +4043,13 @@ Var CustomCoffeeLevelState[1] = "Enable" Var CustomCoffeeLevelState[2] = "PressForever" + Var CurrentCoffeeLevelId = toppingID9index3 + + Function 2 + @@ -4025,6 +4145,11 @@ Var CustomCoffeeTampingState[1] = "Enable" Var CustomCoffeeTampingState[2] = "Enable" + Var CurrentCoffeeTampingId = toppingID10index1 + + Function 2 + + @@ -4043,6 +4168,12 @@ Var CustomCoffeeTampingState[1] = "PressForever" Var CustomCoffeeTampingState[2] = "Enable" + Var CurrentCoffeeTampingId = toppingID10index2 + + Function 2 + + + @@ -4061,6 +4192,12 @@ Var CustomCoffeeTampingState[1] = "Enable" Var CustomCoffeeTampingState[2] = "PressForever" + Var CurrentCoffeeTampingId = toppingID10index3 + + + Function 2 + + @@ -5052,7 +5189,15 @@ Var UserSelectProductCode = PD_CODE1 If showShotEnable = "Disable" Then - Var showShotEnable = "Enable" + If showCustomCoffee = "Invisible" Then + Var showShotEnable = "Enable" + EndIf + EndIf + + If showCustomCoffee = "Invisible" Then + If showShotEnable = "Enable" Then + Var showCustomCoffee = "Enable" + EndIf EndIf Var showText4 = "Invisible" @@ -5080,6 +5225,11 @@ If showShotEnable = "Disable" Then Var showShotEnable = "Enable" EndIf + + If showCustomCoffee = "Enable" Then + Var showCustomCoffee = "Invisible" + EndIf + Var showText4 = "Invisible" If show_eng = "true" Then @@ -5108,6 +5258,11 @@ Else Var showShotEnable = "Disable" EndIf + + If showCustomCoffee = "Enable" Then + Var showCustomCoffee = "Invisible" + EndIf + Var showText4 = "Enable" If show_eng = "true" Then @@ -5233,8 +5388,47 @@ Else EndIf + Var CustomCoffeeDefault = "true" + DEBUGVAR showCustomCoffee + DEBUGVAR CustomCoffeeDefault If showCustomCoffee = "Enable" Then + + If showCoffeeWater = "Enable" Then + If CurrentCoffeeWaterId = toppingID7Default Then + Else + Var CustomCoffeeDefault = "false" + EndIf + EndIf + + If showCoffeeQuantity = "Enable" Then + If CurrentCoffeeQuantityId = toppingID8Default Then + Else + Var CustomCoffeeDefault = "false" + EndIf + EndIf + + If showCoffeeLevel = "Enable" Then + If CurrentCoffeeLevelId = toppingID9Default Then + Else + Var CustomCoffeeDefault = "false" + EndIf + EndIf + + If showCoffeeTamping = "Enable" Then + If CurrentCoffeeTampingId = toppingID10Default Then + Else + Var CustomCoffeeDefault = "false" + EndIf + EndIf + + DEBUGVAR CustomCoffeeDefault + If CustomCoffeeDefault = "false" Then + Var showShotEnable = "Disable" + Else + Var showShotEnable = "Enable" + EndIf + If CustomCoffeeQuantityState[0] = "PressForever" Then Var TOPPING_PRICE = TOPPING_PRICE + toppingID8index1price @@ -5738,7 +5932,7 @@ 1080 end 0xFF0000 - "#7" + "#8"