HKG: Added default blend load topping & return from topping to catalog of menus
This commit is contained in:
parent
572008172a
commit
e25b6d6d48
11 changed files with 1007 additions and 964 deletions
|
|
@ -1,5 +1,5 @@
|
|||
if "v2" in param:
|
||||
def GenMenuProductCodeBlock( str_hot_product_code, str_cold_product_code, str_blend_product_code):
|
||||
def GenMenuProductCodeBlock( str_hot_product_code, str_cold_product_code, str_blend_product_code, present):
|
||||
print(" size " + str( len(spl)) + " img=" + spl[ idx_img][1] )
|
||||
out_xml( '\t; ==================> Len = ' + str(len(spl)) + '\r\n')
|
||||
menu_img = spl[ idx_img][1]
|
||||
|
|
@ -141,19 +141,29 @@
|
|||
out_xml( '\t\tEndIf\r\n')
|
||||
|
||||
|
||||
|
||||
out_xml( '\t\tIf PD_STAGE_2 = "Enable" Then\r\n')
|
||||
#out_xml( '\t\t\tVar PD_STAGE_2 = "Enable"\r\n')
|
||||
out_xml( '\t\t\tTopping "Load" "'+ str_cold_product_code +'"\r\n')
|
||||
out_xml( '\t\tElse\r\n')
|
||||
out_xml( '\t\t\tIf PD_STAGE_1 = "Enable" Then\r\n')
|
||||
#out_xml( '\t\t\t\tVar PD_STAGE_1 = "Enable"\r\n')
|
||||
out_xml( '\t\t\tTopping "Load" "'+ str_hot_product_code +'"\r\n')
|
||||
out_xml( '\t\t\tElse\r\n')
|
||||
#out_xml( '\t\t\t\tVar PD_STAGE_3 = "Enable"\r\n')
|
||||
out_xml( '\t\t\tTopping "Load" "'+ str_blend_product_code +'"\r\n')
|
||||
out_xml( '\t\t\tEndIf\r\n')
|
||||
out_xml( '\t\tEndIf\r\n')
|
||||
if present == 3:
|
||||
out_xml( '\t\tIf PD_STAGE_3 = "Enable" Then\r\n')
|
||||
out_xml( '\t\t\tTopping "Load" "'+ str_blend_product_code +'"\r\n')
|
||||
out_xml( '\t\tElse\r\n')
|
||||
out_xml( '\t\t\tIf PD_STAGE_2 = "Enable" Then\r\n')
|
||||
out_xml( '\t\t\tTopping "Load" "'+ str_cold_product_code +'"\r\n')
|
||||
out_xml( '\t\t\tElse\r\n')
|
||||
out_xml( '\t\t\tTopping "Load" "'+ str_hot_product_code +'"\r\n')
|
||||
out_xml( '\t\t\tEndIf\r\n')
|
||||
out_xml( '\t\tEndIf\r\n')
|
||||
else:
|
||||
out_xml( '\t\tIf PD_STAGE_2 = "Enable" Then\r\n')
|
||||
#out_xml( '\t\t\tVar PD_STAGE_2 = "Enable"\r\n')
|
||||
out_xml( '\t\t\tTopping "Load" "'+ str_cold_product_code +'"\r\n')
|
||||
out_xml( '\t\tElse\r\n')
|
||||
out_xml( '\t\t\tIf PD_STAGE_1 = "Enable" Then\r\n')
|
||||
#out_xml( '\t\t\t\tVar PD_STAGE_1 = "Enable"\r\n')
|
||||
out_xml( '\t\t\tTopping "Load" "'+ str_hot_product_code +'"\r\n')
|
||||
out_xml( '\t\t\tElse\r\n')
|
||||
#out_xml( '\t\t\t\tVar PD_STAGE_3 = "Enable"\r\n')
|
||||
out_xml( '\t\t\tTopping "Load" "'+ str_blend_product_code +'"\r\n')
|
||||
out_xml( '\t\t\tEndIf\r\n')
|
||||
out_xml( '\t\tEndIf\r\n')
|
||||
|
||||
|
||||
|
||||
|
|
@ -452,8 +462,8 @@
|
|||
|
||||
out_xml( '</Block>\r\n')
|
||||
|
||||
def GenMenuBlock( idx_hot_product_code, idx_cold_product_code, idx_blend_product_code):
|
||||
GenMenuProductCodeBlock( spl[ idx_name][ idx_hot_product_code], spl[ idx_name][ idx_cold_product_code] , spl[ idx_name][ idx_blend_product_code] )
|
||||
def GenMenuBlock( idx_hot_product_code, idx_cold_product_code, idx_blend_product_code, present):
|
||||
GenMenuProductCodeBlock( spl[ idx_name][ idx_hot_product_code], spl[ idx_name][ idx_cold_product_code] , spl[ idx_name][ idx_blend_product_code], present)
|
||||
|
||||
|
||||
idx_lang_malay = 5
|
||||
|
|
@ -471,6 +481,7 @@
|
|||
idx_hot_product_code = 7
|
||||
idx_cold_product_code = idx_hot_product_code + 1
|
||||
idx_blend_product_code = idx_cold_product_code + 1
|
||||
idx_default_load_topping = idx_blend_product_code + 2
|
||||
|
||||
#
|
||||
idx_hot_product_code2 = idx_blend_product_code + 1
|
||||
|
|
@ -577,6 +588,11 @@
|
|||
hot_pd = spl[ idx_name][ idx_hot_product_code].split(',')
|
||||
cold_pd = spl[ idx_name][ idx_cold_product_code].split(',')
|
||||
blend_pd = spl[ idx_name][ idx_blend_product_code].split(',')
|
||||
|
||||
try:
|
||||
present = int(spl[idx_name][idx_default_load_topping])
|
||||
except:
|
||||
present = 0
|
||||
|
||||
#print(' size = ' + str( len( hot_pd)) + ' size = ' + str( len( cold_pd)) + ' size = ' + str( len( blend_pd)) + '\r\n')
|
||||
list_size = len( hot_pd)
|
||||
|
|
@ -586,9 +602,9 @@
|
|||
print("\t\t==> ignore ")
|
||||
else:
|
||||
print("\t\t==> gen ")
|
||||
GenMenuProductCodeBlock( hot_pd[ idx], cold_pd[ idx], blend_pd[ idx] )
|
||||
GenMenuProductCodeBlock( hot_pd[ idx], cold_pd[ idx], blend_pd[ idx], present)
|
||||
else:
|
||||
GenMenuBlock( idx_hot_product_code, idx_cold_product_code, idx_blend_product_code)
|
||||
GenMenuBlock( idx_hot_product_code, idx_cold_product_code, idx_blend_product_code, 0)
|
||||
#out_xml( '\t; parallel '+ spl[ idx_name][ idx_hot_product_code2] + ' ' + spl[ idx_name][ idx_cold_product_code2] + ' ' + spl[ idx_name][ idx_blend_product_code2] + ' \r\n')
|
||||
#print("++++++++++++++++++++++++++++++ " + str( count_test) )
|
||||
#count_test = count_test + 1
|
||||
|
|
@ -596,7 +612,7 @@
|
|||
# break
|
||||
if len( spl[idx_name] ) >= 11:
|
||||
if spl[ idx_name][ idx_hot_product_code2] != "-" or spl[ idx_name][ idx_cold_product_code2] != "-" or spl[ idx_name][ idx_blend_product_code2] != "-":
|
||||
GenMenuBlock( idx_hot_product_code2, idx_cold_product_code2, idx_blend_product_code2)
|
||||
GenMenuBlock( idx_hot_product_code2, idx_cold_product_code2, idx_blend_product_code2, 0)
|
||||
|
||||
out_xml('</FrameScroll>\r\n')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue