remove conflict data

This commit is contained in:
phyusin
2018-07-12 15:54:30 +06:30
20 changed files with 67 additions and 29 deletions

View File

@@ -32,6 +32,7 @@ class Origami::SalesController < BaseOrigamiController
# existing_booking.update_attributes(checkout_at: checkout_at)
# end
if booking.sale_id.nil?
order_array = []
booking.booking_orders.each do |booking_order|
booking.booking_status = 'moved'
@@ -54,7 +55,17 @@ class Origami::SalesController < BaseOrigamiController
saleobj.save
order.save
booking.save
order_array.push(order.order_id)
end
receipt_no = Sale.find(sale_id).receipt_no
action_by = current_user.name
type = "ADD_TO_EXISTING"
remark = "#{action_by} add to existing order #{order_array} to Receipt No=>#{receipt_no} in #{table.name}"
sale_audit = SaleAudit.record_audit_sale(sale_id,remark,action_by,type )
booking_order = BookingOrder.where('booking_id=?',booking)
booking_order.each do |bo|