add tax in charges

This commit is contained in:
phyusin
2018-03-22 11:09:12 +06:30
parent b8a71079f4
commit ebadfff25b
3 changed files with 6 additions and 4 deletions

View File

@@ -19,6 +19,7 @@ class Origami::OtherChargesController < BaseOrigamiController
sale_id = params[:sale_id]
other_charges_items = JSON.parse(params[:other_charges_items])
sub_total = params[:sub_total]
cashier_type = params[:cashier_type]
if Sale.exists?(sale_id)
sale = Sale.find(sale_id)
@@ -68,7 +69,7 @@ class Origami::OtherChargesController < BaseOrigamiController
end
# Re-calc All Amount in Sale
sale.compute_by_sale_items(sale_id, sale.sale_items, sale.total_discount)
sale.compute_by_sale_items(sale_id, sale.sale_items, sale.total_discount, nil, cashier_type)
end
if !table.nil?
dining = {:table_id => table_id, :table_type => table.type }