diff --git a/app/controllers/api/bill_controller.rb b/app/controllers/api/bill_controller.rb index 214e1300..1614bb1e 100755 --- a/app/controllers/api/bill_controller.rb +++ b/app/controllers/api/bill_controller.rb @@ -131,7 +131,7 @@ class Api::BillController < Api::ApiController #member_info = Customer.get_member_account(customer) # 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, false, nil,@sale_items,@sale_data,customer.name, item_price_by_accounts, member_info, shop_details) end def request_bill diff --git a/app/controllers/oqs/print_controller.rb b/app/controllers/oqs/print_controller.rb index abf20018..751e1c01 100755 --- a/app/controllers/oqs/print_controller.rb +++ b/app/controllers/oqs/print_controller.rb @@ -51,7 +51,7 @@ class Oqs::PrintController < ApplicationController ai.save end - # filename, receipt_no, cashier_printer = printer.print_receipt_bill(print_settings,cashier_terminal,sale_items,sale_data,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info, shop_detail, "Frt",current_balance,nil,other_amount) + # filename, receipt_no, cashier_printer = printer.print_receipt_bill(print_settings, false, nil,cashier_terminal,sale_items,sale_data,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info, shop_detail, "Frt",current_balance,nil,other_amount) if ENV["SERVER_MODE"] == "cloud" result = { :filepath => filename, @@ -119,7 +119,7 @@ class Oqs::PrintController < ApplicationController ai.save end - # filename, receipt_no, cashier_printer = printer.print_receipt_bill(print_settings,cashier_terminal,sale_items,sale_data,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info, shop_detail, "Frt",current_balance,nil,other_amount) + # filename, receipt_no, cashier_printer = printer.print_receipt_bill(print_settings, false, nil,cashier_terminal,sale_items,sale_data,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info, shop_detail, "Frt",current_balance,nil,other_amount) if ENV["SERVER_MODE"] == "cloud" result = { :filepath => filename, diff --git a/app/controllers/origami/payments_controller.rb b/app/controllers/origami/payments_controller.rb index ec8a6958..45cb7c51 100755 --- a/app/controllers/origami/payments_controller.rb +++ b/app/controllers/origami/payments_controller.rb @@ -617,7 +617,7 @@ class Origami::PaymentsController < BaseOrigamiController other_amount = SaleItem.calculate_other_charges(saleObj.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,other_amount,latest_order_no,card_balance_amount,nil) + filename, receipt_no, cashier_printer = printer.print_receipt_bill(print_settings, false, nil,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,latest_order_no,card_balance_amount,nil) result = { :status => true, @@ -716,7 +716,7 @@ class Origami::PaymentsController < BaseOrigamiController 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,other_amount,nil,nil,nil) + filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings, false, nil,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,nil,nil,nil) result = { :status => true, :filepath => filename, diff --git a/app/controllers/origami/request_bills_controller.rb b/app/controllers/origami/request_bills_controller.rb index 422e1372..9905ebaf 100755 --- a/app/controllers/origami/request_bills_controller.rb +++ b/app/controllers/origami/request_bills_controller.rb @@ -120,7 +120,7 @@ class Origami::RequestBillsController < ApplicationController # 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, false, nil,@sale_items,@sale_data,customer.name, item_price_by_accounts,member_info,shop_details) end end diff --git a/app/controllers/origami/void_controller.rb b/app/controllers/origami/void_controller.rb index 75bb7074..980fd6bd 100755 --- a/app/controllers/origami/void_controller.rb +++ b/app/controllers/origami/void_controller.rb @@ -148,7 +148,7 @@ class Origami::VoidController < BaseOrigamiController discount_price_by_accounts = SaleItem.get_discount_price_by_accounts(sale.sale_items) other_amount = SaleItem.calculate_other_charges(sale.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,other_amount,nil,nil,nil) + filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings, false, nil,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,nil,nil,nil) 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 92720467..2d4c9367 100755 --- a/app/controllers/origami/waste_spoile_controller.rb +++ b/app/controllers/origami/waste_spoile_controller.rb @@ -122,7 +122,7 @@ class Origami::WasteSpoileController < BaseOrigamiController discount_price_by_accounts = SaleItem.get_discount_price_by_accounts(sale.sale_items) other_amount = SaleItem.calculate_other_charges(sale.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,other_amount,nil,nil,nil) + filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings, false, nil,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,nil,nil,nil) result = { :filepath => filename, :printer_model => print_settings.brand_name, diff --git a/app/controllers/transactions/sales_controller.rb b/app/controllers/transactions/sales_controller.rb index 24c76b1d..e8a2d9e4 100755 --- a/app/controllers/transactions/sales_controller.rb +++ b/app/controllers/transactions/sales_controller.rb @@ -364,7 +364,7 @@ class Transactions::SalesController < ApplicationController other_amount = SaleItem.calculate_other_charges(sale.sale_items) #other charges 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,other_amount,nil,nil,nil) + filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings, false, nil,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,nil,nil,nil) result = { :filepath => filename, :printer_model => print_settings.brand_name, diff --git a/app/models/order_reservation.rb b/app/models/order_reservation.rb index c75ad748..0be86204 100644 --- a/app/models/order_reservation.rb +++ b/app/models/order_reservation.rb @@ -203,7 +203,7 @@ class OrderReservation < ApplicationRecord other_amount = SaleItem.calculate_other_charges(saleObj.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,saleObj.customer.name, item_price_by_accounts, discount_price_by_accounts, nil,nil,shop_detail, "Paid",nil,nil,other_amount,nil,nil, order_reservation) + filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings, false, nil,cashier_terminal,saleObj.sale_items,saleObj,saleObj.customer.name, item_price_by_accounts, discount_price_by_accounts, nil,nil,shop_detail, "Paid",nil,nil,other_amount,nil,nil, order_reservation) #receipt bill pdf setting result = {:status=> true, diff --git a/config/puma.rb b/config/puma.rb index fd89392f..6a545bed 100755 --- a/config/puma.rb +++ b/config/puma.rb @@ -1,10 +1,10 @@ -application_path="#{File.expand_path("../..", __FILE__)}" -directory application_path -#environment ENV.fetch("RAILS_ENV") { "production" } -environment "production" -pidfile "#{application_path}/tmp/puma/pid" -state_path "#{application_path}/tmp/puma/state" -stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log" -port ENV.fetch("PORT") { 62158 } -workers 2 -preload_app! +# application_path="#{File.expand_path("../..", __FILE__)}" +# directory application_path +# #environment ENV.fetch("RAILS_ENV") { "production" } +# environment "production" +# pidfile "#{application_path}/tmp/puma/pid" +# state_path "#{application_path}/tmp/puma/state" +# stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log" +# port ENV.fetch("PORT") { 62158 } +# workers 2 +# preload_app! diff --git a/dump.rdb b/dump.rdb index 715250ee..f5754191 100644 Binary files a/dump.rdb and b/dump.rdb differ