print receipt bill
This commit is contained in:
@@ -131,7 +131,7 @@ class Api::BillController < Api::ApiController
|
|||||||
#member_info = Customer.get_member_account(customer)
|
#member_info = Customer.get_member_account(customer)
|
||||||
|
|
||||||
# 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, 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
|
||||||
|
|
||||||
def request_bill
|
def request_bill
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class Oqs::PrintController < ApplicationController
|
|||||||
ai.save
|
ai.save
|
||||||
end
|
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"
|
if ENV["SERVER_MODE"] == "cloud"
|
||||||
result = {
|
result = {
|
||||||
:filepath => filename,
|
:filepath => filename,
|
||||||
@@ -119,7 +119,7 @@ class Oqs::PrintController < ApplicationController
|
|||||||
ai.save
|
ai.save
|
||||||
end
|
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"
|
if ENV["SERVER_MODE"] == "cloud"
|
||||||
result = {
|
result = {
|
||||||
:filepath => filename,
|
:filepath => filename,
|
||||||
|
|||||||
@@ -617,7 +617,7 @@ class Origami::PaymentsController < BaseOrigamiController
|
|||||||
other_amount = SaleItem.calculate_other_charges(saleObj.sale_items)
|
other_amount = SaleItem.calculate_other_charges(saleObj.sale_items)
|
||||||
|
|
||||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
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 = {
|
result = {
|
||||||
:status => true,
|
:status => true,
|
||||||
@@ -716,7 +716,7 @@ class Origami::PaymentsController < BaseOrigamiController
|
|||||||
|
|
||||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
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 = {
|
result = {
|
||||||
:status => true,
|
:status => true,
|
||||||
:filepath => filename,
|
:filepath => filename,
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ class Origami::RequestBillsController < ApplicationController
|
|||||||
# 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,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
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ class Origami::VoidController < BaseOrigamiController
|
|||||||
discount_price_by_accounts = SaleItem.get_discount_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.sale_items)
|
other_amount = SaleItem.calculate_other_charges(sale.sale_items)
|
||||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
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 = {
|
result = {
|
||||||
:filepath => filename,
|
:filepath => filename,
|
||||||
:printer_model => print_settings.brand_name,
|
:printer_model => print_settings.brand_name,
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ class Origami::WasteSpoileController < BaseOrigamiController
|
|||||||
discount_price_by_accounts = SaleItem.get_discount_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.sale_items)
|
other_amount = SaleItem.calculate_other_charges(sale.sale_items)
|
||||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
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 = {
|
result = {
|
||||||
:filepath => filename,
|
:filepath => filename,
|
||||||
:printer_model => print_settings.brand_name,
|
:printer_model => print_settings.brand_name,
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ class Transactions::SalesController < ApplicationController
|
|||||||
|
|
||||||
other_amount = SaleItem.calculate_other_charges(sale.sale_items) #other charges
|
other_amount = SaleItem.calculate_other_charges(sale.sale_items) #other charges
|
||||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
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 = {
|
result = {
|
||||||
:filepath => filename,
|
:filepath => filename,
|
||||||
:printer_model => print_settings.brand_name,
|
:printer_model => print_settings.brand_name,
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ class OrderReservation < ApplicationRecord
|
|||||||
other_amount = SaleItem.calculate_other_charges(saleObj.sale_items)
|
other_amount = SaleItem.calculate_other_charges(saleObj.sale_items)
|
||||||
|
|
||||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
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
|
#receipt bill pdf setting
|
||||||
|
|
||||||
result = {:status=> true,
|
result = {:status=> true,
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
application_path="#{File.expand_path("../..", __FILE__)}"
|
# application_path="#{File.expand_path("../..", __FILE__)}"
|
||||||
directory application_path
|
# directory application_path
|
||||||
#environment ENV.fetch("RAILS_ENV") { "production" }
|
# #environment ENV.fetch("RAILS_ENV") { "production" }
|
||||||
environment "production"
|
# environment "production"
|
||||||
pidfile "#{application_path}/tmp/puma/pid"
|
# pidfile "#{application_path}/tmp/puma/pid"
|
||||||
state_path "#{application_path}/tmp/puma/state"
|
# state_path "#{application_path}/tmp/puma/state"
|
||||||
stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
|
# stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
|
||||||
port ENV.fetch("PORT") { 62158 }
|
# port ENV.fetch("PORT") { 62158 }
|
||||||
workers 2
|
# workers 2
|
||||||
preload_app!
|
# preload_app!
|
||||||
|
|||||||
Reference in New Issue
Block a user