From 158760abdbc36b72f0df38a05ed7542c09053dfb Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Tue, 10 Jul 2018 16:05:37 +0630 Subject: [PATCH] update vodi and pay foc waste and spoil for other paymtnt amount in receipt pdf --- app/controllers/origami/payments_controller.rb | 9 ++++++--- app/controllers/origami/void_controller.rb | 4 ++-- app/controllers/origami/waste_spoile_controller.rb | 4 ++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/app/controllers/origami/payments_controller.rb b/app/controllers/origami/payments_controller.rb index e420be17..cde70fa8 100755 --- a/app/controllers/origami/payments_controller.rb +++ b/app/controllers/origami/payments_controller.rb @@ -460,9 +460,10 @@ class Origami::PaymentsController < BaseOrigamiController # Calculate price_by_accounts item_price_by_accounts = SaleItem.calculate_price_by_accounts(saleObj.sale_items) discount_price_by_accounts = SaleItem.get_discount_price_by_accounts(saleObj.sale_items) - + other_amount = SaleItem.calculate_other_charges(sale_items) + printer = Printer::ReceiptPrinter.new(print_settings) - filename, receipt_no, cashier_printer = printer.print_receipt_bill(print_settings,cashier_terminal,saleObj.sale_items,saleObj,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_detail, "Re-print",current_balance,card_data) + filename, receipt_no, cashier_printer = printer.print_receipt_bill(print_settings,cashier_terminal,saleObj.sale_items,saleObj,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_detail, "Re-print",current_balance,card_data,other_amount) result = { :status => true, @@ -545,9 +546,11 @@ class Origami::PaymentsController < BaseOrigamiController item_price_by_accounts = SaleItem.calculate_price_by_accounts(saleObj.sale_items) discount_price_by_accounts = SaleItem.get_discount_price_by_accounts(saleObj.sale_items) + other_amount = SaleItem.calculate_other_charges(sale_items) + printer = Printer::ReceiptPrinter.new(print_settings) - filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings,cashier_terminal,saleObj.sale_items,saleObj,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_detail, "FOC",nil,nil) + filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings,cashier_terminal,saleObj.sale_items,saleObj,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_detail, "FOC",nil,nil,other_amount) result = { :status => true, :filepath => filename, diff --git a/app/controllers/origami/void_controller.rb b/app/controllers/origami/void_controller.rb index 891cd398..21ac822b 100755 --- a/app/controllers/origami/void_controller.rb +++ b/app/controllers/origami/void_controller.rb @@ -124,9 +124,9 @@ class Origami::VoidController < BaseOrigamiController # Calculate Food and Beverage Total item_price_by_accounts = SaleItem.calculate_price_by_accounts(sale.sale_items) discount_price_by_accounts = SaleItem.get_discount_price_by_accounts(sale.sale_items) - + other_amount = SaleItem.calculate_other_charges(sale_items) printer = Printer::ReceiptPrinter.new(print_settings) - filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings,cashier_terminal,sale.sale_items,sale,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details, "VOID",current_balance,nil) + filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings,cashier_terminal,sale.sale_items,sale,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details, "VOID",current_balance,nil,other_amount) result = { :filepath => filename, :printer_model => print_settings.brand_name, diff --git a/app/controllers/origami/waste_spoile_controller.rb b/app/controllers/origami/waste_spoile_controller.rb index d008a54d..7c005b87 100755 --- a/app/controllers/origami/waste_spoile_controller.rb +++ b/app/controllers/origami/waste_spoile_controller.rb @@ -105,9 +105,9 @@ class Origami::WasteSpoileController < BaseOrigamiController # Calculate Food and Beverage Total item_price_by_accounts = SaleItem.calculate_price_by_accounts(sale.sale_items) discount_price_by_accounts = SaleItem.get_discount_price_by_accounts(sale.sale_items) - + other_amount = SaleItem.calculate_other_charges(sale_items) printer = Printer::ReceiptPrinter.new(print_settings) - filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings,cashier_terminal,sale.sale_items,sale,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details, remark,current_balance,nil) + filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings,cashier_terminal,sale.sale_items,sale,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details, remark,current_balance,nil,other_amount) result = { :filepath => filename, :printer_model => print_settings.brand_name,