multiple invoice void

This commit is contained in:
Zin Lin Phyo
2017-06-27 11:35:36 +06:30
parent c1646b812e
commit bcd44db9a2
11 changed files with 568 additions and 142 deletions

View File

@@ -25,7 +25,7 @@ class Origami::TableInvoicesController < BaseOrigamiController
else
sale = Sale.find(booking.sale_id)
if sale.sale_status != "completed"
if sale.sale_status != "completed" && sale.sale_status != 'void'
@sale_array.push(sale)
end
end

View File

@@ -9,6 +9,14 @@ class Origami::VoidController < BaseOrigamiController
sale.sale_status = 'void'
sale.save
bookings = sale.bookings
bookings.each do |booking|
orders = booking.orders
orders.each do |order|
# order.status = 'void'
end
end
table_avaliable = true
table = sale.bookings[0].dining_facility
table.bookings.each do |booking|