Merge branch 'august_spring' of bitbucket.org:code2lab/sxrestaurant into august_spring

* 'august_spring' of bitbucket.org:code2lab/sxrestaurant:
  Dining Charges Bug Fix
  InJutyIndexform
This commit is contained in:
Zin Lin Phyo
2017-08-28 09:47:06 +06:30
7 changed files with 177 additions and 131 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)