update sale audit

This commit is contained in:
Aung Myo
2017-10-31 12:08:27 +06:30
parent a687b45193
commit 56940d7f00
21 changed files with 348 additions and 215 deletions

View File

@@ -104,6 +104,10 @@ class Origami::CustomersController < BaseOrigamiController
order = Order.find(sale_order.order_id)
status = order.update_attributes(customer_id: customer_id,order_type:customer.customer_type)
end
action_by = current_user.id
remark = "Assign Customer Receipt No #{sale.receipt_no} | Sale ID #{sale.sale_id} | Customer ID ->#{customer.customer_id}- Customer Name ->#{customer.name}"
sale_audit = SaleAudit.record_audit_for_edit(sale.sale_id,sale.cashier_id, action_by,remark,"ASSIGNCUSTOMER" )
else
@booking = BookingOrder.find_by_order_id(params[:sale_id])
@orders = BookingOrder.where("booking_id = ? ", @booking.booking_id)