Add MoveTablePdf and FOC update error
This commit is contained in:
@@ -239,11 +239,11 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
end
|
||||
|
||||
#Move Table Print
|
||||
def print_move_table(printer_settings,to,from,shop_detail,date,type,moved_by)
|
||||
def print_move_table(printer_settings,to,from,shop_detail,date,type,moved_by,order_items)
|
||||
#Use CUPS service
|
||||
#Generate PDF
|
||||
#Print
|
||||
pdf = MoveTablePdf.new(printer_settings,to,from,shop_detail,date,type,moved_by)
|
||||
pdf = MoveTablePdf.new(printer_settings,to,from,shop_detail,date,type,moved_by,order_items)
|
||||
pdf.render_file "tmp/print_move_table.pdf"
|
||||
self.print("tmp/print_move_table.pdf")
|
||||
end
|
||||
|
||||
@@ -255,7 +255,7 @@ class SalePayment < ApplicationRecord
|
||||
payment_status = false
|
||||
|
||||
# add to sale item with foc
|
||||
sale_items = SaleItem.where("sale_id='#{ self.sale.sale_id }' and status is null")
|
||||
sale_items = SaleItem.where("sale_id='#{ self.sale.sale_id }'")
|
||||
|
||||
sale_items.each do|item|
|
||||
SaleItem.update_existing_item(item.qty, item, self.sale.sale_id, "foc", item.unit_price, item.price)
|
||||
|
||||
Reference in New Issue
Block a user