Merge branch 'ui_ux_changes' of bitbucket.org:code2lab/sxrestaurant into adminbsb_ui_changes

This commit is contained in:
phyusin
2018-04-09 10:12:33 +06:30
26 changed files with 157 additions and 87 deletions

View File

@@ -264,11 +264,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

0
app/models/sale.rb Executable file → Normal file
View File

View File

@@ -257,7 +257,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)