Pull from master
This commit is contained in:
@@ -36,6 +36,7 @@ if (@booking)
|
||||
end
|
||||
|
||||
json.order_items order_items do |item|
|
||||
total_set_menu = 0
|
||||
# For YGN BBQ
|
||||
if item.item_code.include? ("PSA_")
|
||||
adult_count += item.qty
|
||||
@@ -46,6 +47,7 @@ if (@booking)
|
||||
child_spent += (item.price * item.qty)
|
||||
end
|
||||
# End YGN BBQ
|
||||
|
||||
json.order_items_id item.order_items_id
|
||||
json.order_id item.order_id
|
||||
json.item_code item.item_code
|
||||
@@ -57,7 +59,16 @@ if (@booking)
|
||||
json.options item.options
|
||||
json.remark item.remark
|
||||
json.item_status item.order_item_status
|
||||
@total_amount = @total_amount + (item.price * item.qty)
|
||||
|
||||
#start set menu item price
|
||||
if !item.set_menu_items.nil? && item.set_menu_items != '[]'
|
||||
JSON.parse(item.set_menu_items).each do |item_instance|
|
||||
total_set_menu += (item_instance["quantity"].to_f * item_instance["price"].to_f).to_f
|
||||
end
|
||||
end
|
||||
#end set menu item price
|
||||
|
||||
@total_amount = @total_amount + (item.price * item.qty) + total_set_menu
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user