MYS: add disabled buttons & show name for pro mystery, WIP staging e-receipt

This commit is contained in:
Pakin 2025-06-13 10:47:30 +07:00
parent ccbd8f8071
commit cfb19451ad
27 changed files with 2051 additions and 1238 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View file

@ -0,0 +1,135 @@
<Popup>
<Cache> "Enable" </Cache>
<Width> 1080 </Width>
<Height> 1920 </Height>
<Background> "0xeae6e1" </Background>
<Volume> SoundVolume </Volume>
;<Refresh> "Partial" </Refresh>
<EventOpen>
SAVELOG "Prompt E-Receipt v1"
; init-default
Var Seeker.e_receipt = "false"
Var Timeout = 0
Var ShowCaution = "Invisible"
; check-case-pay-with-code
DEBUGVAR Seeker.CodeChannel
If Seeker.CodeChannel = 1 Then
DEBUGVAR "Pay with code, nah-ah no e receipt"
Open "ROOT/taobin_project/xml/page_lid_straw.xml"
EndIf
Var EReceiptImgDir = CountryRootPath + "/image/page_e_receipt/"
; prompt-Popup
Var PromptImg = EReceiptImgDir + "img_popup_eReceiptPrompt.png"
Var PromptImgIfYes = EReceiptImgDir + "img_popup_eReceiptPrompt_yes.png"
Var bn_yes = EReceiptImgDir + "bn_yes.png"
Var bn_no = EReceiptImgDir + "bn_no.png"
Var bp_yes = EReceiptImgDir + "bp_yes.png"
Var bp_no = EReceiptImgDir + "bp_no.png"
DEBUGVAR EReceiptImgDir
DEBUGVAR PromptImg
DEBUGVAR bn_yes
DEBUGVAR bn_no
DEBUGVAR bp_yes
DEBUGVAR bp_no
</EventOpen>
<Timeout> 1000 </Timeout>
<EventTimeout>
Var Timeout = Timeout + 1
; auto-no
If Timeout > 15 Then
If TestReceiptPage = 1 Then
Var TestReceiptPage = 0
Open "ROOT/taobin_project/xml/page_board.xml"
Else
Open "ROOT/taobin_project/xml/page_lid_straw.xml"
EndIf
EndIf
Refresh
TimerReset
</EventTimeout>
; dim-bg
<Image>
<X> 0 </X>
<Y> 380 </Y>
<Filename> "ROOT/taobin_project/image/collectiing/alpha.png" </Filename>
</Image>
; prompt-Popup
<Image>
<X> 178 </X>
<Y> 665 </Y>
<Filename> PromptImg </Filename>
</Image>
<Button>
<X> 288 </X>
<Y> 971 </Y>
<Filename> bn_yes </Filename>
<FilenamePress> bp_yes </FilenamePress>
<Sound> "ROOT/sounds/codebuttom.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
Var Seeker.e_receipt = "true"
; Open "ROOT/taobin_project/xml/page_lid_straw.xml"
Var SelectMenuBetweenBrewEnable1Blink = "Invisible"
Var SelectMenuBetweenBrewEnable1 = "Invisible"
Var ShowCaution = "Enable"
Var Timeout = 10
</EventClick>
</Button>
<Button>
<X> 288 </X>
<Y> 1171 </Y>
<Filename> bn_no </Filename>
<FilenamePress> bp_no </FilenamePress>
<Sound> "ROOT/sounds/codebuttom.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
Var Seeker.e_receipt = "false"
Open "ROOT/taobin_project/xml/page_lid_straw.xml"
</EventClick>
</Button>
<Image>
<X> 178 </X>
<Y> 665 </Y>
<State> ShowCaution </State>
<Filename> PromptImgIfYes </Filename>
</Image>
</Popup>

View file

@ -0,0 +1,138 @@
<Popup>
<Width> 1080 </Width>
<Height> 1920 </Height>
<Background> BackgroundColor </Background>
<Volume> SoundVolume </Volume>
<EventOpen>
Var Timeout = 0
Var service = "eInvoice.mys"
If Seeker.VendingTSID = "" Then
DEBUGVAR Seeker.VendingTSID
DEBUGVAR VendingTSID
If VendingTSID = "" Then
Else
Var Seeker.VendingTSID = VendingTSID
EndIf
EndIf
DEBUGVAR Seeker.VendingTSID
DEBUGVAR Seeker.PriceDrinkTmpShow
DEBUGVAR Seeker.showname
DEBUGVAR Seeker.PictureDrink
Var EReceiptImgDir = CountryRootPath + "/image/page_e_receipt/"
Var EReceiptQRDialog = EReceiptImgDir + "img_popup_eReceiptPrompt_result.png"
TRY "ROOT/taobin_project/inter/mys/xml/process/e_receipt.ev"
</EventOpen>
<Timeout> 1000 </Timeout>
<EventTimeout>
Var Timeout = Timeout + 1
If Timeout > 10 Then
Open "ROOT/taobin_project/xml/page_drinkok.xml"
EndIf
Refresh
TimerReset
</EventTimeout>
; dim-bg
<Image>
<X> 0 </X>
<Y> 380 </Y>
<Filename> "ROOT/taobin_project/image/collectiing/alpha.png" </Filename>
</Image>
; show-qr-Popup
<Image>
<X> 178 </X>
<Y> 665 </Y>
<Filename> EReceiptQRDialog </Filename>
</Image>
; need-change-position
<QRCode>
<X> 415 </X>
<Y> 875 </Y>
<Width> 250 </Width>
<Height> 250 </Height>
<State> "Enable" </State>
<Service> service </Service>
</QRCode>
; menu-name
<Image>
<X> 175 </X>
<Y> 1100 </Y>
<Height> 300 </Height>
<Width> 320 </Width>
<Filename> Seeker.PictureDrink </Filename>
</Image>
<Text>
<X> 300 </X>
<Y> 1200 </Y>
<Width> 1080 </Width>
<Align> Center </Align>
<Font> KanitLightTTF </Font>
<Size> 48 </Size>
<Color> HeadlineColor </Color>
<Value>
eval(
STRCONTAIN "size" Seeker.showname SizeFromSheet
If SizeFromSheet = "true" Then
SPLIT Seeker.showname "###" 1 PureName
Var return = PureName
Else
Var return = Seeker.showname
EndIf
)
</Value>
</Text>
; show-price
<Text>
<X> 450 </X>
<Y> 1300 </Y>
<Font> KanitTTF </Font>
<Size> 48 </Size>
<Width> 1080 </Width>
<Color> HeadlineColor </Color>
<Value> Seeker.PriceDrinkTmpShow </Value>
</Text>
</Popup>

View file

@ -8,12 +8,21 @@ For RandomCoffeeCheckIdx < 5 Loop
Var CurrentPd = RandMystCoffee[RandomCoffeeCheckIdx]
Var CurrentState !assigned @AutoVar ${CurrentPd}.Button
If CurrentState = "Enable" Then
DEBUGVAR CurrentPd
DEBUGVAR CurrentState
DEBUGVAR RandomCoffeeCheckIdx
If CurrentState = "Enable" Then
Var RandMystCoffeeEnabled[RandomCoffeeCheckOkIdx] = CurrentPd
Var RandMystCoffeeNameEnabled[RandomCoffeeCheckOkIdx][0] = RandMystCoffeeName[RandomCoffeeCheckIdx][0]
Var RandMystCoffeeNameEnabled[RandomCoffeeCheckOkIdx][1] = RandMystCoffeeName[RandomCoffeeCheckIdx][1]
Var RandMystCoffeeNameEnabled[RandomCoffeeCheckOkIdx][2] = RandMystCoffeeName[RandomCoffeeCheckIdx][2]
Var RandMystCoffeeNameEnabled[RandomCoffeeCheckOkIdx][3] = RandMystCoffeeName[RandomCoffeeCheckIdx][3]
Var RandMystCoffeeNameEnabled[RandomCoffeeCheckOkIdx][4] = RandMystCoffeeName[RandomCoffeeCheckIdx][4]
Var RandomCoffeeCheckOkIdx = RandomCoffeeCheckOkIdx + 1
EndIf
@ -35,6 +44,13 @@ For RandomTeaCheckIdx < 7 Loop
If CurrentState = "Enable" Then
Var RandMystTeaEnabled[RandomTeaCheckOkIdx] = CurrentPd
Var RandMystTeaNameEnabled[RandomTeaCheckOkIdx][0] = RandMystTeaName[RandomTeaCheckIdx][0]
Var RandMystTeaNameEnabled[RandomTeaCheckOkIdx][1] = RandMystTeaName[RandomTeaCheckIdx][1]
Var RandMystTeaNameEnabled[RandomTeaCheckOkIdx][2] = RandMystTeaName[RandomTeaCheckIdx][2]
Var RandMystTeaNameEnabled[RandomTeaCheckOkIdx][3] = RandMystTeaName[RandomTeaCheckIdx][3]
Var RandMystTeaNameEnabled[RandomTeaCheckOkIdx][4] = RandMystTeaName[RandomTeaCheckIdx][4]
Var RandomTeaCheckOkIdx = RandomTeaCheckOkIdx + 1
EndIf
@ -56,6 +72,13 @@ For RandomMilkCheckIdx < 7 Loop
If CurrentState = "Enable" Then
Var RandMystMilkEnabled[RandomMilkCheckOkIdx] = CurrentPd
Var RandMystMilkNameEnabled[RandomMilkCheckOkIdx][0] = RandMystMilkName[RandomMilkCheckIdx][0]
Var RandMystMilkNameEnabled[RandomMilkCheckOkIdx][1] = RandMystMilkName[RandomMilkCheckIdx][1]
Var RandMystMilkNameEnabled[RandomMilkCheckOkIdx][2] = RandMystMilkName[RandomMilkCheckIdx][2]
Var RandMystMilkNameEnabled[RandomMilkCheckOkIdx][3] = RandMystMilkName[RandomMilkCheckIdx][3]
Var RandMystMilkNameEnabled[RandomMilkCheckOkIdx][4] = RandMystMilkName[RandomMilkCheckIdx][4]
Var RandomMilkCheckOkIdx = RandomMilkCheckOkIdx + 1
EndIf

View file

@ -64,6 +64,26 @@ Var ProductCodeRandomTea = RandMystTeaEnabled[ResultRandomIndexTea]
Var ProductCodeRandomMilk = RandMystMilkEnabled[ResultRandomIndexMilk]
Var ResultRandomIndexOther = RandMystOtherEnabled[ResultRandomIndexOtherTemp]
; Get_Random_Name
Var ProductCodeRandomCoffeeName[0] = RandMystCoffeeNameEnabled[ResultRandomIndexCofee][0]
Var ProductCodeRandomCoffeeName[1] = RandMystCoffeeNameEnabled[ResultRandomIndexCofee][1]
Var ProductCodeRandomCoffeeName[2] = RandMystCoffeeNameEnabled[ResultRandomIndexCofee][2]
Var ProductCodeRandomCoffeeName[3] = RandMystCoffeeNameEnabled[ResultRandomIndexCofee][3]
Var ProductCodeRandomCoffeeName[4] = RandMystCoffeeNameEnabled[ResultRandomIndexCofee][4]
Var ProductCodeRandomTeaName[0] = RandMystTeaNameEnabled[ResultRandomIndexTea][0]
Var ProductCodeRandomTeaName[1] = RandMystTeaNameEnabled[ResultRandomIndexTea][1]
Var ProductCodeRandomTeaName[2] = RandMystTeaNameEnabled[ResultRandomIndexTea][2]
Var ProductCodeRandomTeaName[3] = RandMystTeaNameEnabled[ResultRandomIndexTea][3]
Var ProductCodeRandomTeaName[4] = RandMystTeaNameEnabled[ResultRandomIndexTea][4]
Var ProductCodeRandomMilkName[0] = RandMystMilkNameEnabled[ResultRandomIndexMilk][0]
Var ProductCodeRandomMilkName[1] = RandMystMilkNameEnabled[ResultRandomIndexMilk][1]
Var ProductCodeRandomMilkName[2] = RandMystMilkNameEnabled[ResultRandomIndexMilk][2]
Var ProductCodeRandomMilkName[3] = RandMystMilkNameEnabled[ResultRandomIndexMilk][3]
Var ProductCodeRandomMilkName[4] = RandMystMilkNameEnabled[ResultRandomIndexMilk][4]
; ProductCodeRandom -> ProductCodeRandomCoffee
DEBUGVAR ProductCodeRandomCoffee

View file

@ -2,53 +2,175 @@ DEBUGVAR "Random Pool Setup"
Var PriceProMystRandom = 0
Var RandMystCoffeePrice = 550
If Discount50 = "true" Then
Var RandMystCoffeePrice = 275
EndIf
; Thai Espresso Smoothie
Var RandMystCoffee[0] = "12-31-03-0001"
Var RandMystCoffeeName[0][0] = "THAI Iced ESPRESSO SMOOTHIE"
Var RandMystCoffeeName[0][1] = "-"
Var RandMystCoffeeName[0][2] = "-"
Var RandMystCoffeeName[0][3] = "-"
Var RandMystCoffeeName[0][4] = "SMOOTHIE ESPRESSO THAI"
; Peach Cafe Latte Smoothie
Var RandMystCoffee[1] = "12-21-03-0060"
Var RandMystCoffeeName[1][0] = "PEACH CAFE LATTE SMOOTHIE"
Var RandMystCoffeeName[1][1] = "-"
Var RandMystCoffeeName[1][2] = "-"
Var RandMystCoffeeName[1][3] = "-"
Var RandMystCoffeeName[1][4] = "PEACH CAFE LATTE SMOOTHIE"
; Cafe Latte Smoothie
Var RandMystCoffee[2] = "12-21-03-0002"
Var RandMystCoffeeName[2][0] = "CAFE LATTE SMOOTHIE"
Var RandMystCoffeeName[2][1] = "-"
Var RandMystCoffeeName[2][2] = "-"
Var RandMystCoffeeName[2][3] = "-"
Var RandMystCoffeeName[2][4] = "SMOOTHIE KAFÉ LATTE"
; Mint Cafe Latte Smoothie
Var RandMystCoffee[3] = "12-21-03-0057"
Var RandMystCoffeeName[3][0] = "MINT CAFE LATTE\nSMOOTHIE"
Var RandMystCoffeeName[3][1] = "-"
Var RandMystCoffeeName[3][2] = "-"
Var RandMystCoffeeName[3][3] = "-"
Var RandMystCoffeeName[3][4] = "KOPI LATTE MINT\nSMOOTHIE"
; Taiwanese Tea Cafe Latte Smoothie
Var RandMystCoffee[4] = "12-21-03-0030"
Var RandMystCoffeeName[4][0] = "TAIWANESE TEA CAFÉ SMOOTHIE"
Var RandMystCoffeeName[4][1] = "-"
Var RandMystCoffeeName[4][2] = "-"
Var RandMystCoffeeName[4][3] = "-"
Var RandMystCoffeeName[4][4] = "SMOOTHIE CHAM TAIWAN"
Var RandMystTeaPrice = 450
If Discount50 = "true" Then
Var RandMystTeaPrice = 225
EndIf
; JASMINE MILK TEA\nOREO SMOOTHIE ----- Secret Rare
Var RandMystTea[0] = "12-02-03-0048"
Var RandMystTeaName[0][0] = "JASMINE MILK TEA\nOREO SMOOTHIE###size=58"
Var RandMystTeaName[0][1] = "-"
Var RandMystTeaName[0][2] = "-"
Var RandMystTeaName[0][3] = "-"
Var RandMystTeaName[0][4] = "TEH SUSU JASMINE\nOREO SMOOTHIE###size=58"
; Thai Milk Tea Smoothie
Var RandMystTea[1] = "12-02-02-0039"
Var RandMystTea[1] = "12-02-03-0039"
Var RandMystTeaName[1][0] = "THAI MILK TEA SMOOTHIE"
Var RandMystTeaName[1][1] = "-"
Var RandMystTeaName[1][2] = "-"
Var RandMystTeaName[1][3] = "-"
Var RandMystTeaName[1][4] = "SMOOTHIE TEH SUSU THAI"
; Taiwanese Milk Tea Smoothie
Var RandMystTea[2] = "12-02-03-0025"
Var RandMystTeaName[2][0] = "TAIWANESE TEA SMOOTHIE"
Var RandMystTeaName[2][1] = "-"
Var RandMystTeaName[2][2] = "-"
Var RandMystTeaName[2][3] = "-"
Var RandMystTeaName[2][4] = "SMOOTHIE TEH SUSU TAIWAN"
; Matcha Latte Smootie
Var RandMystTea[3] = "12-02-03-0026"
Var RandMystTeaName[3][0] = "MATCHA LATTE SMOOTHIE"
Var RandMystTeaName[3][1] = "-"
Var RandMystTeaName[3][2] = "-"
Var RandMystTeaName[3][3] = "-"
Var RandMystTeaName[3][4] = "SMOOTHIE MATCHA LATTE"
; Coconut Thai Milk Tea Smoothie
Var RandMystTea[4] = "12-02-03-0062"
Var RandMystTeaName[4][0] = "Coconut Thai Milk \nTea SMOOTHIE###size=58"
Var RandMystTeaName[4][1] = "-"
Var RandMystTeaName[4][2] = "-"
Var RandMystTeaName[4][3] = "-"
Var RandMystTeaName[4][4] = "SMOOTHIE TEH SUSU THAI KELAPA###size=58"
; Coconut Matcha Latte Smoothie
Var RandMystTea[5] = "12-02-03-0060"
Var RandMystTeaName[5][0] = "Coconut Matcha \nlatte SMOOTHIE###size=58"
Var RandMystTeaName[5][1] = "-"
Var RandMystTeaName[5][2] = "-"
Var RandMystTeaName[5][3] = "-"
Var RandMystTeaName[5][4] = "SMOOTHIE MACTHA \nLATTE KELAPA###size=58"
; Coconut Jasmine Milk Tea Smoothie
Var RandMystTea[6] = "12-02-03-0064"
Var RandMystTeaName[6][0] = "Coconut Jasmine milk \ntea SMOOTHIE###size=58"
Var RandMystTeaName[6][1] = "-"
Var RandMystTeaName[6][2] = "-"
Var RandMystTeaName[6][3] = "-"
Var RandMystTeaName[6][4] = "SMOOTHIE TEH SUSU \nJASMINE KELAPA###size=58"
Var RandMystMilkPrice = 350
If Discount50 = "true" Then
Var RandMystMilkPrice = 175
EndIf
; Oreo Volcano Smoothie ----- Secret Rare
Var RandMystMilk[0] = "12-03-03-0009"
Var RandMystMilkName[0][0] = "OREO SMOOTHIE VOLCANO"
Var RandMystMilkName[0][1] = "-"
Var RandMystMilkName[0][2] = "-"
Var RandMystMilkName[0][3] = "-"
Var RandMystMilkName[0][4] = "SMOOTHIE OREO VOLCANO"
; Strawberry Mint Milk Smoothie
Var RandMystMilk[1] = "12-03-03-0037"
Var RandMystMilkName[1][0] = "STRAWBERRY MINT MILK\nSMOOTHIE"
Var RandMystMilkName[1][1] = "-"
Var RandMystMilkName[1][2] = "-"
Var RandMystMilkName[1][3] = "-"
Var RandMystMilkName[1][4] = "SUSU STRAWBERI MINT\nSMOOTHIE"
; Melon Milk Smoothie
Var RandMystMilk[2] = "12-03-03-0022"
Var RandMystMilkName[2][0] = "MELON MILK SMOOTHIE"
Var RandMystMilkName[2][1] = "-"
Var RandMystMilkName[2][2] = "-"
Var RandMystMilkName[2][3] = "-"
Var RandMystMilkName[2][4] = "SMOOTHIE SUSU MELON"
; Coconut Milk Smoothie
Var RandMystMilk[3] = "12-03-03-0058"
Var RandMystMilkName[3][0] = "Coconut milk SMOOTHIE"
Var RandMystMilkName[3][1] = "-"
Var RandMystMilkName[3][2] = "-"
Var RandMystMilkName[3][3] = "-"
Var RandMystMilkName[3][4] = "SMOOTHIE SUSU KELAPA"
; Peach Milk Smoothie
Var RandMystMilk[4] = "12-03-03-0038"
Var RandMystMilkName[4][0] = "PEACH MILK SMOOTHIE"
Var RandMystMilkName[4][1] = "-"
Var RandMystMilkName[4][2] = "-"
Var RandMystMilkName[4][3] = "-"
Var RandMystMilkName[4][4] = "PEACH MILK SMOOTHIE"
; Straw Milk Smoothie
Var RandMystMilk[5] = "12-03-03-0011"
Var RandMystMilkName[5][0] = "STRAWMILK SMOOTHIE"
Var RandMystMilkName[5][1] = "-"
Var RandMystMilkName[5][2] = "-"
Var RandMystMilkName[5][3] = "-"
Var RandMystMilkName[5][4] = "SMOOTHIE SUSU STRAWBERI"
; Mint Milk Smoothie
Var RandMystMilk[6] = "12-03-03-0036"
Var RandMystMilkName[6][0] = "MINT MILK\nSMOOTHIE"
Var RandMystMilkName[6][1] = "-"
Var RandMystMilkName[6][2] = "-"
Var RandMystMilkName[6][3] = "-"
Var RandMystMilkName[6][4] = "SUSU MINT\nSMOOTHIE"

View file

@ -1285,7 +1285,7 @@
<MarginTop> 22 </MarginTop>
<Width> 225 </Width>
<Height> 296 </Height>
<State> Flag( 12-03-03-0026.Button,Disable=Invisible,$Sum1203030026) </State>
<State> Flag( 12-03-03-0026.Button,Invisible=Disable,$Sum1203030026) </State>
<Button>
<State> $Sum1203030026 </State>
<Filename> "ROOT/taobin_project/inter/mys/image/page_drink_n//bn_PinkOreo_smoothie.png" </Filename>
@ -1555,7 +1555,7 @@
<MarginTop> 22 </MarginTop>
<Width> 225 </Width>
<Height> 296 </Height>
<State> Flag( 12-21-01-0001.Button,Disable=Invisible,$Sum1221010001) </State>
<State> Flag( 12-21-01-0001.Button,Invisible=Disable,$Sum1221010001) </State>
<Button>
<State> $Sum1221010001 </State>
<Filename> "ROOT/taobin_project/inter/mys/image/page_drink_n//bn_hot_espresso.png" </Filename>
@ -18083,7 +18083,7 @@
<State> SubRandMilkButtonEnable </State>
<Filename> "ROOT/taobin_project/inter/mys/image/event/pro_myst_cup/myst_milk.png" </Filename>
<FilenamePress> "ROOT/taobin_project/inter/mys/image/event/pro_myst_cup/myst_milk.png" </FilenamePress>
<FilenameDisable> "ROOT/taobin_project/inter/mys/image/event/pro_myst_cup/myst_milk.png" </FilenameDisable>
<FilenameDisable> "ROOT/taobin_project/inter/mys/image/event/pro_myst_cup/myst_milk_disable.png" </FilenameDisable>
<EventClick>
Var FromProMysteryCup = 1
@ -18091,6 +18091,12 @@
Var ProductCodeRandom = ProductCodeRandomMilk
Var PriceProMystRandom = RandMystMilkPrice
Var MysteryCupResultName[0] = ProductCodeRandomMilkName[0]
Var MysteryCupResultName[1] = ProductCodeRandomMilkName[1]
Var MysteryCupResultName[2] = ProductCodeRandomMilkName[2]
Var MysteryCupResultName[3] = ProductCodeRandomMilkName[3]
Var MysteryCupResultName[4] = ProductCodeRandomMilkName[4]
Topping "Load" ProductCodeRandom
Var OpenFromXML = CurrentXMLFileName2
Open "ROOT/taobin_project/xml/page_topping_select6.lxml"
@ -18118,7 +18124,7 @@
<State> SubRandTeaButtonEnable </State>
<Filename> "ROOT/taobin_project/inter/mys/image/event/pro_myst_cup/myst_tea.png" </Filename>
<FilenamePress> "ROOT/taobin_project/inter/mys/image/event/pro_myst_cup/myst_tea.png" </FilenamePress>
<FilenameDisable> "ROOT/taobin_project/inter/mys/image/event/pro_myst_cup/myst_tea.png" </FilenameDisable>
<FilenameDisable> "ROOT/taobin_project/inter/mys/image/event/pro_myst_cup/myst_tea_disable.png" </FilenameDisable>
<EventClick>
Var FromProMysteryCup = 1
@ -18126,6 +18132,12 @@
Var ProductCodeRandom = ProductCodeRandomTea
Var PriceProMystRandom = RandMystTeaPrice
Var MysteryCupResultName[0] = ProductCodeRandomTeaName[0]
Var MysteryCupResultName[1] = ProductCodeRandomTeaName[1]
Var MysteryCupResultName[2] = ProductCodeRandomTeaName[2]
Var MysteryCupResultName[3] = ProductCodeRandomTeaName[3]
Var MysteryCupResultName[4] = ProductCodeRandomTeaName[4]
Topping "Load" ProductCodeRandom
Var OpenFromXML = CurrentXMLFileName2
Open "ROOT/taobin_project/xml/page_topping_select6.lxml"
@ -18154,7 +18166,7 @@
<State> SubRandCoffButtonEnable </State>
<Filename> "ROOT/taobin_project/inter/mys/image/event/pro_myst_cup/myst_coffee.png" </Filename>
<FilenamePress> "ROOT/taobin_project/inter/mys/image/event/pro_myst_cup/myst_coffee.png" </FilenamePress>
<FilenameDisable> "ROOT/taobin_project/inter/mys/image/event/pro_myst_cup/myst_coffee.png" </FilenameDisable>
<FilenameDisable> "ROOT/taobin_project/inter/mys/image/event/pro_myst_cup/myst_coffee_disable.png" </FilenameDisable>
<EventClick>
Var FromProMysteryCup = 1
@ -18162,6 +18174,13 @@
Var ProductCodeRandom = ProductCodeRandomCoffee
Var PriceProMystRandom = RandMystCoffeePrice
Var MysteryCupResultName[0] = ProductCodeRandomCoffeeName[0]
Var MysteryCupResultName[1] = ProductCodeRandomCoffeeName[1]
Var MysteryCupResultName[2] = ProductCodeRandomCoffeeName[2]
Var MysteryCupResultName[3] = ProductCodeRandomCoffeeName[3]
Var MysteryCupResultName[4] = ProductCodeRandomCoffeeName[4]
Topping "Load" ProductCodeRandom
Var OpenFromXML = CurrentXMLFileName2
Open "ROOT/taobin_project/xml/page_topping_select6.lxml"

View file

@ -1,6 +1,12 @@
; malaysia
; e-receipt-flag
Var eReceiptFlag = 0
DEBUGVAR eReceiptFlag
;DEBUGVAR SystemDateMonthInt
;DEBUGVAR SystemDateDayInt

View file

@ -614,6 +614,22 @@
EndIf
EndIf
DEBUGVAR Seeker.e_receipt
; e-receipt
If Seeker.e_receipt = "true" Then
Var SelectMenuBetweenBrewEnable1Blink = "Invisible"
Var SelectMenuBetweenBrewEnable1 = "Invisible"
Var SelectMenuBetweenBrewEnable2Blink = "Invisible"
Var SelectMenuBetweenBrewEnable2 = "Invisible"
EndIf
Var AppRunFlagState = ""
Var HasResumePreventFlag = "false"

View file

@ -82,6 +82,14 @@
Var EnableSelectMenuBetweenBrewBlink = "Invisible"
EndIf
; e-receipt
If Seeker.e_receipt = "true" Then
Var SelectMenuBetweenBrewEnable1Blink = "Invisible"
Var SelectMenuBetweenBrewEnable1 = "Invisible"
Var SelectMenuBetweenBrewEnable2Blink = "Invisible"
Var SelectMenuBetweenBrewEnable2 = "Invisible"
EndIf
Var bg_strawlid = DirImage2 + "/bg_strawlidSmall.png"
If Seeker.thankLidFlag = 1 Then

View file

@ -65,6 +65,11 @@
If waitAckPay = 1 Then
SAVELOG "waitAckPay = 1"
If Seeker.e_receipt = "true" Then
Open "ROOT/taobin_project/inter/mys/xml/e_receipt/page_show_e_receipt.lxml"
EndIf
Open "ROOT/taobin_project/xml/page_drinkok.xml"
EndIf
@ -185,6 +190,10 @@
Var VendingTSIDTmp1 = ""
SAVELOG "waitAckPay = 1 tineout > 60"
If Seeker.e_receipt = "true" Then
Open "ROOT/taobin_project/inter/mys/xml/e_receipt/page_show_e_receipt.lxml"
EndIf
Open "ROOT/taobin_project/xml/page_drinkok.xml"
EndIf
@ -565,6 +574,10 @@
SAVELOG "waitAckPay = 0 Timeout"
If Seeker.e_receipt = "true" Then
Open "ROOT/taobin_project/inter/mys/xml/e_receipt/page_show_e_receipt.lxml"
EndIf
Open "ROOT/taobin_project/xml/page_drinkok.xml"
EndIf
@ -842,6 +855,11 @@
If IgnoreNetCore = "true" Then
If CountDownBrewing = 0 Then
SAVELOG "CountDownBrewing = 0"
If Seeker.e_receipt = "true" Then
Open "ROOT/taobin_project/inter/mys/xml/e_receipt/page_show_e_receipt.lxml"
EndIf
Open "ROOT/taobin_project/xml/page_drinkok.xml"
EndIf
EndIf

View file

@ -66,6 +66,13 @@
EndIf
If waitAckPay = 1 Then
; temp:redirect-show-qr
If Seeker.e_receipt = "true" Then
Open "ROOT/taobin_project/inter/mys/xml/e_receipt/page_show_e_receipt.lxml"
EndIf
SAVELOG "waitAckPay = 1"
Open "ROOT/taobin_project/xml/page_drinkok.xml"
@ -265,6 +272,14 @@
If waitAckPay = 1 Then
If Timeout > 60 Then
; temp:redirect-show-qr
If Seeker.e_receipt = "true" Then
Open "ROOT/taobin_project/inter/mys/xml/e_receipt/page_show_e_receipt.lxml"
EndIf
Var VendingTSID = ""
SAVELOG "TIMEOUT=60"
Open "ROOT/taobin_project/xml/page_drinkok.xml"
@ -650,6 +665,14 @@
Var ServiceSuccess = "yes"
If waitAckPay = 0 Then
SAVELOG "waitAckPay=0"
; temp:redirect-show-qr
If Seeker.e_receipt = "true" Then
Open "ROOT/taobin_project/inter/mys/xml/e_receipt/page_show_e_receipt.lxml"
EndIf
Open "ROOT/taobin_project/xml/page_drinkok.xml"
EndIf
@ -1009,6 +1032,13 @@
If IgnoreNetCore = "true" Then
If CountDownBrewing = 0 Then
; temp:redirect-show-qr
If Seeker.e_receipt = "true" Then
Open "ROOT/taobin_project/inter/mys/xml/e_receipt/page_show_e_receipt.lxml"
EndIf
SAVELOG "CountDownBrewing=0"
Open "ROOT/taobin_project/xml/page_drinkok.xml"
EndIf

View file

@ -11,17 +11,48 @@
; jump
If IgnoreCollectPointByMe = 1 Then
Var IgnoreCollectPointByMe = 0
If eReceiptFlag = 1 Then
If CountryName = "Malaysia" Then
Var RecieptPromptPage = CountryRootPath + "/xml/e_receipt/page_prompt_e_receipt.lxml"
DEBUGVAR RecieptPromptPage
Open RecieptPromptPage
EndIf
EndIf
Open "ROOT/taobin_project/xml/page_lid_straw.xml"
EndIf
If Seeker.CodeChannel = 1 Then
If Seeker.CollectPointMain = 0 Then
SAVELOG "Seeker.CollectPointMain = 0 Jump!!!"
If eReceiptFlag = 1 Then
If CountryName = "Malaysia" Then
Var RecieptPromptPage = CountryRootPath + "/xml/e_receipt/page_prompt_e_receipt.lxml"
DEBUGVAR RecieptPromptPage
Open RecieptPromptPage
EndIf
EndIf
Open "ROOT/taobin_project/xml/page_lid_straw.xml"
EndIf
EndIf
If SettingIgnoreCollectPoint = 1 Then
If eReceiptFlag = 1 Then
If CountryName = "Malaysia" Then
Var RecieptPromptPage = CountryRootPath + "/xml/e_receipt/page_prompt_e_receipt.lxml"
DEBUGVAR RecieptPromptPage
Open RecieptPromptPage
EndIf
EndIf
Open "ROOT/taobin_project/xml/page_lid_straw.xml"
EndIf
@ -285,6 +316,15 @@
SAVELOG "collect_point1-p107."
;Open "ROOT/taobin_project/xml/page_catalog.xml"
If eReceiptFlag = 1 Then
If CountryName = "Malaysia" Then
Var RecieptPromptPage = CountryRootPath + "/xml/e_receipt/page_prompt_e_receipt.lxml"
DEBUGVAR RecieptPromptPage
Open RecieptPromptPage
EndIf
EndIf
Open "ROOT/taobin_project/xml/page_lid_straw.xml"
EndIf
@ -635,6 +675,16 @@
If LuckyDrawCampaign = 1 Then
Open "ROOT/taobin_project/xml/sometime/page_campaign_ads_lucky_draw.xml"
Else
If eReceiptFlag = 1 Then
If CountryName = "Malaysia" Then
Var RecieptPromptPage = CountryRootPath + "/xml/e_receipt/page_prompt_e_receipt.lxml"
DEBUGVAR RecieptPromptPage
Open RecieptPromptPage
EndIf
EndIf
Open "ROOT/taobin_project/xml/page_lid_straw.xml"
EndIf
</EventClick>
@ -690,6 +740,18 @@
If ChildrenFree = 1 Then
Var Seeker.TNumberTaobinMember = TelephoneNumber
If eReceiptFlag = 1 Then
If CountryName = "Malaysia" Then
Var RecieptPromptPage = CountryRootPath + "/xml/e_receipt/page_prompt_e_receipt.lxml"
DEBUGVAR RecieptPromptPage
Open RecieptPromptPage
EndIf
EndIf
Open "ROOT/taobin_project/xml/page_lid_straw.xml"
EndIf

View file

@ -691,7 +691,13 @@
Open "ROOT/taobin_project/xml/page_display_get_free.xml"
Else
If eReceiptFlag = 1 Then
If CountryName = "Malaysia" Then
Var RecieptPromptPage = CountryRootPath + "/xml/e_receipt/page_prompt_e_receipt.lxml"
DEBUGVAR RecieptPromptPage
Open RecieptPromptPage
EndIf
EndIf
Open "ROOT/taobin_project/xml/page_lid_straw.xml"
EndIf
@ -857,7 +863,13 @@
Open "ROOT/taobin_project/xml/page_display_get_free.xml"
EndIf
If eReceiptFlag = 1 Then
If CountryName = "Malaysia" Then
Var RecieptPromptPage = CountryRootPath + "/xml/e_receipt/page_prompt_e_receipt.lxml"
DEBUGVAR RecieptPromptPage
Open RecieptPromptPage
EndIf
EndIf
Open "ROOT/taobin_project/xml/page_lid_straw.xml"

View file

@ -4000,6 +4000,12 @@
Var Seeker.PictureDrink = PictureDrink
Var Seeker.showname = showname
If FromProMysteryCup = 1 Then
Var Seeker.shownameMystery = MysteryCupResultName[LanguageShowByIndex]
DEBUGVAR Seeker.showname
EndIf
DEBUGVAR MenuCautionImageStage0
DEBUGVAR CustomerFilterEnable
DEBUGVAR CustomerFilterType
@ -4021,6 +4027,13 @@
Else
If SelectDrinkType = 1 Then
; save-for-e-receipt
If eReceiptFlag = 1 Then
Var Seeker.PriceDrinkTmpShow = PriceDrinkTmpShow
Var Seeker.PriceDrink = PriceDrinkTmp
EndIf
OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_blank.xml"
Open "ROOT/taobin_project/xml/page_payment.xml"
EndIf

View file

@ -50,8 +50,12 @@ EndIf
If FromProMysteryCup = 1 Then
Var Seeker.VendingCode = RandomVendingCode
Var Seeker.FromProMysteryCup = "true"
Var FromProMysteryCup = 0
Else
Var Seeker.FromProMysteryCup = "false"
Var FromProMysteryCup = 0
EndIf

View file

@ -0,0 +1,110 @@
Var EReceiptQR = ""
; build uri
Var INVOICE_URL = ""
Var Final_INVOICE_URL = ""
Var ProjectId = ""
; check test mode
READ_FILE "/mnt/sdcard/coffeevending/CURR_TEST" TEST_MODE_FLAG
STRCONTAIN "1" TEST_MODE_FLAG IS_TEST_MODE
If IS_TEST_MODE = "true" Then
Var INVOICE_URL = INVOICE_DEV_URL
Else
Var INVOICE_URL = INVOICE_PROD_URL
EndIf
DEBUGVAR IS_TEST_MODE
DEBUGVAR INVOICE_URL
Var documentNo = Seeker.VendingTSID
Var internalRemark = BoxID
Var dateTime = SystemISOTime
Var ProductItemClassification = "022"
Var ProductItemDescription = Seeker.showname
Var ProductItemQuantity = 1
Var ProductItemUnitPrice = Seeker.PriceDrink
Var ProductItemTaxType = "06"
Var ProductItemTaxRate = 0
Var ProductItemTaxAmount = 0
Var ProductItemDiscountAmount = 0
Var ProductItemSubTotalExcludingTax = Seeker.PriceDrink
Var ProductItemSubTotal = Seeker.PriceDrink
Var totalExcludingTax = Seeker.PriceDrink
Var totalDiscountAmount = 0
Var totalTaxAmount = 0
Var totalRoundingAmount = Seeker.PriceDrink
Var totalPayableAmount = Seeker.PriceDrink
Var PayloadEReceipt = "{'documentNo':'"
Var PayloadEReceipt = PayloadEReceipt + documentNo
Var PayloadEReceipt = PayloadEReceipt + "','internalRemark':'"
Var PayloadEReceipt = PayloadEReceipt + internalRemark
Var PayloadEReceipt = PayloadEReceipt + "','dateTime':'"
Var PayloadEReceipt = PayloadEReceipt + dateTime
; array-1-item
Var PayloadEReceipt = PayloadEReceipt + "','items':[{"
Var PayloadEReceipt = PayloadEReceipt + "'ProductItemClassification':'"
Var PayloadEReceipt = PayloadEReceipt + ProductItemClassification
Var PayloadEReceipt = PayloadEReceipt + "','ProductItemDescription':'"
Var PayloadEReceipt = PayloadEReceipt + ProductItemDescription
Var PayloadEReceipt = PayloadEReceipt + "','ProductItemQuantity':"
Var PayloadEReceipt = PayloadEReceipt + ProductItemQuantity
Var PayloadEReceipt = PayloadEReceipt + ",'ProductItemUnitPrice':"
Var PayloadEReceipt = PayloadEReceipt + ProductItemUnitPrice
Var PayloadEReceipt = PayloadEReceipt + ",'ProductItemTaxType':'"
Var PayloadEReceipt = PayloadEReceipt + ProductItemTaxType
Var PayloadEReceipt = PayloadEReceipt + "','ProductItemTaxRate':"
Var PayloadEReceipt = PayloadEReceipt + ProductItemTaxRate
Var PayloadEReceipt = PayloadEReceipt + ",'ProductItemTaxAmount':"
Var PayloadEReceipt = PayloadEReceipt + ProductItemTaxAmount
Var PayloadEReceipt = PayloadEReceipt + ",'ProductItemDiscountAmount':"
Var PayloadEReceipt = PayloadEReceipt + ProductItemDiscountAmount
Var PayloadEReceipt = PayloadEReceipt + ",'ProductItemSubTotalExcludingTax':"
Var PayloadEReceipt = PayloadEReceipt + ProductItemSubTotalExcludingTax
Var PayloadEReceipt = PayloadEReceipt + ",'ProductItemSubTotal':"
Var PayloadEReceipt = PayloadEReceipt + ProductItemSubTotal
Var PayloadEReceipt = PayloadEReceipt + "}]"
Var PayloadEReceipt = PayloadEReceipt + ",'totalExcludingTax':"
Var PayloadEReceipt = PayloadEReceipt + totalExcludingTax
Var PayloadEReceipt = PayloadEReceipt + ",'totalDiscountAmount':"
Var PayloadEReceipt = PayloadEReceipt + totalDiscountAmount
Var PayloadEReceipt = PayloadEReceipt + ",'totalTaxAmount':"
Var PayloadEReceipt = PayloadEReceipt + totalTaxAmount
Var PayloadEReceipt = PayloadEReceipt + ",'totalRoundingAmount':"
Var PayloadEReceipt = PayloadEReceipt + totalRoundingAmount
Var PayloadEReceipt = PayloadEReceipt + ",'totalPayableAmount':"
Var PayloadEReceipt = PayloadEReceipt + totalPayableAmount
Var PayloadEReceipt = PayloadEReceipt + "}"
DEBUGVAR PayloadEReceipt
HashSha256 PayloadEReceipt "HashData"
EncodeURIComponent PayloadEReceipt "PayloadEReceiptEncoded"
DEBUGVAR HashData
DEBUGVAR PayloadEReceiptEncoded
Var EQ_SIGN = "="
If IS_TEST_MODE = "true" Then
Var Final_INVOICE_URL !assigned @AutoVar "https://einvoice-stg.sernsoft.com/public-create-invoice?_id{EQ_SIGN}682d5a08f4fa421acbfd4102&data{EQ_SIGN}{PayloadEReceiptEncoded}&hash{EQ_SIGN}{HashData}"
Else
Var Final_INVOICE_URL !assigned @AutoVar "https://einvoice.sernsoft.com/public-create-invoice?_id{EQ_SIGN}{ProjectId}&data{EQ_SIGN}{PayloadEReceiptEncoded}&hash{EQ_SIGN}{HashData}"
EndIf
DEBUGVAR Final_INVOICE_URL

View file

@ -293,6 +293,16 @@
If CountDownThankyou = 0 Then
If IgnoreNetCore = "true" Then
If eReceiptFlag = 1 Then
If CountryName = "Malaysia" Then
Var RecieptPromptPage = CountryRootPath + "/xml/e_receipt/page_prompt_e_receipt.lxml"
DEBUGVAR RecieptPromptPage
Open RecieptPromptPage
EndIf
EndIf
Open "ROOT/taobin_project/xml/page_lid_straw.xml"
EndIf
@ -316,9 +326,27 @@
If LuckyDrawCampaign = 1 Then
Open "ROOT/taobin_project/xml/sometime/page_campaign_ads_lucky_draw.xml"
Else
If eReceiptFlag = 1 Then
If CountryName = "Malaysia" Then
Var RecieptPromptPage = CountryRootPath + "/xml/e_receipt/page_prompt_e_receipt.lxml"
DEBUGVAR RecieptPromptPage
Open RecieptPromptPage
EndIf
EndIf
Open "ROOT/taobin_project/xml/page_lid_straw.xml"
EndIf
Else
If eReceiptFlag = 1 Then
If CountryName = "Malaysia" Then
Var RecieptPromptPage = CountryRootPath + "/xml/e_receipt/page_prompt_e_receipt.lxml"
DEBUGVAR RecieptPromptPage
Open RecieptPromptPage
EndIf
EndIf
Open "ROOT/taobin_project/xml/page_lid_straw.xml"
EndIf
EndIf
@ -330,6 +358,15 @@
Var CleanFeedBackToCollectPoint = 0
Open "ROOT/taobin_project/xml/page_clean_feedback.xml"
Else
If eReceiptFlag = 1 Then
If CountryName = "Malaysia" Then
Var RecieptPromptPage = CountryRootPath + "/xml/e_receipt/page_prompt_e_receipt.lxml"
DEBUGVAR RecieptPromptPage
Open RecieptPromptPage
EndIf
EndIf
Open "ROOT/taobin_project/xml/page_lid_straw.xml"
EndIf
EndIf
@ -495,6 +532,15 @@
If LuckyDrawCampaign = 1 Then
Open "ROOT/taobin_project/xml/sometime/page_campaign_ads_lucky_draw.xml"
Else
If eReceiptFlag = 1 Then
If CountryName = "Malaysia" Then
Var RecieptPromptPage = CountryRootPath + "/xml/e_receipt/page_prompt_e_receipt.lxml"
DEBUGVAR RecieptPromptPage
Open RecieptPromptPage
EndIf
EndIf
Open "ROOT/taobin_project/xml/page_lid_straw.xml"
EndIf
EndIf
@ -503,6 +549,17 @@
Var CleanFeedBackToCollectPoint = 0
Open "ROOT/taobin_project/xml/page_clean_feedback.xml"
Else
If eReceiptFlag = 1 Then
If CountryName = "Malaysia" Then
Var RecieptPromptPage = CountryRootPath + "/xml/e_receipt/page_prompt_e_receipt.lxml"
DEBUGVAR RecieptPromptPage
Open RecieptPromptPage
EndIf
EndIf
Open "ROOT/taobin_project/xml/page_lid_straw.xml"
EndIf
EndIf
@ -557,6 +614,17 @@
If LuckyDrawCampaign = 1 Then
Open "ROOT/taobin_project/xml/sometime/page_campaign_ads_lucky_draw.xml"
Else
If eReceiptFlag = 1 Then
If CountryName = "Malaysia" Then
Var RecieptPromptPage = CountryRootPath + "/xml/e_receipt/page_prompt_e_receipt.lxml"
DEBUGVAR RecieptPromptPage
Open RecieptPromptPage
EndIf
EndIf
Open "ROOT/taobin_project/xml/page_lid_straw.xml"
EndIf
EndIf
@ -565,6 +633,15 @@
Var CleanFeedBackToCollectPoint = 0
Open "ROOT/taobin_project/xml/page_clean_feedback.xml"
Else
If eReceiptFlag = 1 Then
If CountryName = "Malaysia" Then
Var RecieptPromptPage = CountryRootPath + "/xml/e_receipt/page_prompt_e_receipt.lxml"
DEBUGVAR RecieptPromptPage
Open RecieptPromptPage
EndIf
EndIf
Open "ROOT/taobin_project/xml/page_lid_straw.xml"
EndIf
EndIf