Dining Charges Bug Fix

This commit is contained in:
Phyo
2017-08-25 18:52:35 +06:30
parent 6aaea69f0a
commit 44105a5f3b
2 changed files with 6 additions and 1 deletions

View File

@@ -146,7 +146,7 @@ class Promotion < ApplicationRecord
sale_item.sale_id = sale_id
sale_item.save
sale = Sale.find(sale_id).
sale = Sale.find(sale_id)
sale.compute_by_sale_items(sale.id, sale.sale_items, sale.total_discount)
end
@@ -207,6 +207,7 @@ class Promotion < ApplicationRecord
return item[1]
end
end
return 0
end
def self.calculate_discount(total, discount)