foodcourt

This commit is contained in:
Myat Zin Wai Maw
2019-12-10 13:37:06 +06:30
parent 5b3a62917d
commit c606ca73db
8 changed files with 29 additions and 36 deletions

View File

@@ -20,7 +20,7 @@ if (@booking)
@total_tax = 0.00
# For YGN BBQ
adult_count = 0
adult_count = 0
child_count = 0
adult_spent = 0
child_spent = 0
@@ -33,18 +33,18 @@ if (@booking)
if (order.status == "new")
order_items = order_items + order.order_items
end
end
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
adult_spent += (item.price * item.qty)
adult_count += item.qty
adult_spent += (item.price * item.qty)
end
if item.item_code.include? ("PSC_")
child_count += item.qty
child_spent += (item.price * item.qty)
child_spent += (item.price * item.qty)
end
# End YGN BBQ
@@ -115,7 +115,7 @@ if (@booking)
end
@total_tax_amount = @service_charges + @commercial_tax
end
#total tax calculation
json.sub_total @total_amount
if @service_rate.to_i > 0