payment bill added and origami bug fixed

This commit is contained in:
Yan
2017-06-14 19:41:32 +06:30
15 changed files with 155 additions and 185 deletions

View File

@@ -13,10 +13,10 @@ class Origami::PaymentsController < BaseOrigamiController
sale_payment.process_payment(saleObj, @user, cash, "cash")
unique_code = "ReceiptBillPdf"
customer= Customer.where('customer_id=' + saleObj.customer_id)
customer= Customer.find(saleObj.customer_id)
# get member information
response = get_member_information(customer, "get_all_member_account")
member_info = Customer.get_member_account(customer)
# get printer info
print_settings=PrintSetting.find_by_unique_code(unique_code)
@@ -25,7 +25,7 @@ class Origami::PaymentsController < BaseOrigamiController
food_total, beverage_total = SaleItem.calculate_food_beverage(saleObj.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,saleObj.sale_items,saleObj,customer.name, food_total, beverage_total, member_info)
end
end
@@ -38,10 +38,10 @@ class Origami::PaymentsController < BaseOrigamiController
@sale_data = Sale.find_by_sale_id(sale_id)
#get customer amount
@customer = Customer.find(@sale_data.customer_id)
@customer = Customer.find(@sale_data.customer_id)
# get member information
response = get_member_information(@customer, "get_all_member_account")
response = Customer.get_member_account(@customer)
@balance = 0.00
@accountable_type = ''