Rebate balance in receipt

This commit is contained in:
Aung Myo
2017-06-20 11:31:02 +06:30
15 changed files with 266 additions and 103 deletions

View File

@@ -19,8 +19,11 @@ class Origami::RequestBillsController < BaseOrigamiController
end
unique_code = "ReceiptBillPdf"
customer= Customer.where('customer_id=' + @sale_data.customer_id)
# customer= Customer.where('customer_id=' +.customer_id)
customer= Customer.find( @sale_data.customer_id)
# get member information
member_info = Customer.get_member_account(customer)
# get printer info
print_settings=PrintSetting.find_by_unique_code(unique_code)
@@ -31,7 +34,7 @@ class Origami::RequestBillsController < BaseOrigamiController
food_total, beverage_total = SaleItem.calculate_food_beverage(@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, food_total, beverage_total,member_info)
redirect_to origami_path(@sale_data.sale_id)
end
end