Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
superuser
2017-06-23 18:00:18 +06:30
49 changed files with 922 additions and 463 deletions

View File

@@ -34,12 +34,11 @@ class Api::BillController < Api::ApiController
# get printer info
print_settings=PrintSetting.find_by_unique_code(unique_code)
# Calculate Food and Beverage Total
food_total, beverage_total = SaleItem.calculate_food_beverage(@sale_items)
# Calculate Price by accounts
item_price_by_accounts = SaleItem.calculate_price_by_accounts(@sale_items)
printer = Printer::ReceiptPrinter.new(print_settings)
printer.print_receipt_bill(print_settings,@sale_items,@sale_data,customer.name, food_total, beverage_total)
printer.print_receipt_bill(print_settings,@sale_items,@sale_data,customer.name, item_price_by_accounts)
end