Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
@@ -29,12 +29,7 @@ class Api::BillController < Api::ApiController
|
|||||||
@sale_items = SaleItem.where("sale_id=?",@sale_id)
|
@sale_items = SaleItem.where("sale_id=?",@sale_id)
|
||||||
|
|
||||||
unique_code = "ReceiptBillPdf"
|
unique_code = "ReceiptBillPdf"
|
||||||
#shop detail
|
customer= Customer.find(@sale_data.customer_id)
|
||||||
shop_details = Shop.find(1)
|
|
||||||
|
|
||||||
customer= Customer.where('customer_id=' + @sale_data.customer_id)
|
|
||||||
# get member information
|
|
||||||
member_info = Customer.get_member_account(customer)
|
|
||||||
|
|
||||||
# get printer info
|
# get printer info
|
||||||
print_settings=PrintSetting.find_by_unique_code(unique_code)
|
print_settings=PrintSetting.find_by_unique_code(unique_code)
|
||||||
@@ -43,7 +38,7 @@ class Api::BillController < Api::ApiController
|
|||||||
item_price_by_accounts = SaleItem.calculate_price_by_accounts(@sale_items)
|
item_price_by_accounts = SaleItem.calculate_price_by_accounts(@sale_items)
|
||||||
|
|
||||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||||
printer.print_receipt_bill(print_settings,@sale_items,@sale_data,customer.name, item_price_by_accounts, member_info, shop_details)
|
printer.print_receipt_bill(print_settings,@sale_items,@sale_data,customer.name, item_price_by_accounts)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user