Merge branch 'r-1902001-01' into foodcourt
This commit is contained in:
@@ -90,6 +90,7 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
latest_order_no = nil
|
||||
is_kbz = params[:is_kbz]
|
||||
|
||||
|
||||
if saleObj = Sale.find(sale_id)
|
||||
sale_items = SaleItem.get_all_sale_items(sale_id)
|
||||
|
||||
@@ -106,7 +107,7 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
sp.kbz_edit_sale_payment(sp.received_amount.to_f, current_user)
|
||||
end
|
||||
|
||||
if !path.include? ("credit_payment")
|
||||
|
||||
rebate_amount = nil
|
||||
|
||||
# For Cashier by Zone
|
||||
@@ -200,12 +201,18 @@ 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)
|
||||
credit_pdf = Lookup.find_by_lookup_type("credit_pdf")
|
||||
if (path.include? ("credit_payment")) && !credit_pdf.nil? && credit_pdf.value.to_i == 1
|
||||
printed_status = 'credit_payment'
|
||||
else
|
||||
printed_status = 'Paid'
|
||||
end
|
||||
|
||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings, false, nil, cashier_terminal, sale_items, saleObj, customer.name, item_price_by_accounts, discount_price_by_accounts, member_info, rebate_amount, current_shop, "Paid", current_balance, card_data, other_amount, latest_order_no, card_balance_amount, nil)
|
||||
|
||||
#end
|
||||
end
|
||||
|
||||
if !saleObj.nil?
|
||||
# InventoryJob.perform_now(self.id)
|
||||
# InventoryDefinition.calculate_product_count(saleObj)
|
||||
|
||||
Reference in New Issue
Block a user