update access code for void foc and edit

This commit is contained in:
Aung Myo
2018-05-18 16:57:34 +06:30
parent e120a32307
commit d7992cd4b8
3 changed files with 6 additions and 6 deletions

View File

@@ -55,7 +55,7 @@ class Origami::WasteSpoileController < BaseOrigamiController
# FOr Sale Audit
action_by = current_user.name
if access_code != "null"
if access_code != "null" && current_user.role == "cashier"
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}"