add audit for change tax

This commit is contained in:
NyanLinHtut
2019-12-24 11:14:04 +06:30
parent 180c61dc7a
commit 054de3731e
2 changed files with 13 additions and 0 deletions

View File

@@ -729,8 +729,10 @@ class Origami::PaymentsController < BaseOrigamiController
sale_id = params[:sale_id]
order_source = params[:cashier_type]
tax_type = params[:tax_type]
remark = "Change tax to #{tax_type.upcase} for Sale ID #{sale_id} By #{current_login_employee.name}"
sale = Sale.find(sale_id)
sale.compute_by_sale_items(sale.total_discount, nil, order_source, tax_type)
SaleAudit.record_audit_change_tax(sale_id,remark,current_login_employee.name)
render json: JSON.generate({:status => true})
end