Merge branch 'adminbsb_material_ui' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
Yan
2017-11-17 13:33:11 +06:30
3 changed files with 77 additions and 46 deletions

View File

@@ -121,8 +121,9 @@ class Origami::CustomersController < BaseOrigamiController
if status == true
render json: JSON.generate({:status => true})
# Re-calc All Amount in Sale
sale.compute_by_sale_items(sale.sale_id, sale.sale_items, sale.total_discount)
if(id == "SAL")
sale.compute_by_sale_items(sale.sale_id, sale.sale_items, sale.total_discount)
end
else
render json: JSON.generate({:status => false, :error_message => "Record not found"})
end