update sale audit all process in origami
This commit is contained in:
@@ -26,6 +26,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'
|
||||
@@ -48,7 +49,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|
|
||||
|
||||
Reference in New Issue
Block a user