fix for customer tax ui and calc tax after bind customer

This commit is contained in:
Yan
2017-08-11 12:13:30 +06:30
parent d32fbf18e0
commit 0e93eb3765
3 changed files with 16 additions and 6 deletions

View File

@@ -89,6 +89,8 @@ 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)
else
render json: JSON.generate({:status => false, :error_message => "Record not found"})
end