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

This commit is contained in:
Nweni
2017-08-17 17:41:01 +06:30
34 changed files with 966 additions and 816 deletions

3
app/models/product.rb Normal file
View File

@@ -0,0 +1,3 @@
class Product < ApplicationRecord
validates_presence_of :name
end

2
app/models/promotion.rb Normal file
View File

@@ -0,0 +1,2 @@
class Promotion < ApplicationRecord
end

View File

@@ -267,7 +267,7 @@ class Sale < ApplicationRecord
rounding_adjustment = 0
sales_items.each do |item|
if item.remark != 'void'
if item.remark != 'void' && item.remark != 'foc'
#compute each item and added to total
subtotal_price = subtotal_price + item.price
total_taxable = total_taxable + item.price