File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -50,12 +50,9 @@ def process_price_with_order(menu_dict, order):
5050 if top == None :
5151 top = item
5252 else :
53- if top in chinese_char_dict :
53+ if top . isnumeric () :
5454 top = chinese_to_arabic (top )
55- try :
56- top = int (top )
57- except :
58- top = 0
55+ top = int (top )
5956 price_dict [item ] = {'amount' :top , 'price' :None }
6057 top = None
6158
@@ -84,7 +81,7 @@ def sum_up_total_line(total, none_list):
8481 return line
8582
8683# write_xlsx()
87- # data_dict = load_xlsx()
84+ # data_dict = load_xlsx('script/menu.xlsx' )
8885# menu_dict = process_data_to_menu(data_dict)
89- # print(process_price_with_order(menu_dict, '100個火腿和7000個蛋糕和兩個大雞雞 '))
90- # print(process_price_with_order(menu_dict, '一個火腿和7000個蛋糕和兩個大雞雞 '))
86+ # print(process_price_with_order(menu_dict, '100個火腿和7000個蛋糕 '))
87+ # print(process_price_with_order(menu_dict, '兩千萬個雞腿和兩個蛋糕 '))
You can’t perform that action at this time.
0 commit comments