update access code for admin,manager and superviso

This commit is contained in:
Aung Myo
2018-05-09 14:06:43 +06:30
parent b9778d7b5b
commit c06cc1be6d
3 changed files with 27 additions and 14 deletions

View File

@@ -72,9 +72,12 @@ class Origami::VoidController < BaseOrigamiController
# FOr Sale Audit
action_by = current_user.name
approved_by = Employee.find_by_emp_id(access_code)
if access_code.present?
action_by = Employee.find_by_emp_id(access_code).name
end
# remark = "Void Sale ID #{sale_id} | Receipt No #{sale.receipt_no} | Receipt No #{sale.receipt_no} | Table ->#{table.name}"
sale_audit = SaleAudit.record_audit_for_edit(sale_id,sale.cashier_id, approved_by.name,remark,"SALEVOID" )
sale_audit = SaleAudit.record_audit_for_edit(sale_id,sale.cashier_id, action_by,remark,"SALEVOID" )
# For Print