mobile bill updated
This commit is contained in:
@@ -29,7 +29,12 @@ 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
|
||||||
|
shop_details = Shop.find(1)
|
||||||
|
|
||||||
customer= Customer.where('customer_id=' + @sale_data.customer_id)
|
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)
|
||||||
@@ -38,7 +43,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)
|
printer.print_receipt_bill(print_settings,@sale_items,@sale_data,customer.name, item_price_by_accounts, member_info, shop_details)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user