add menu item taxable

This commit is contained in:
Yan
2017-12-04 14:54:47 +06:30
parent 7ef75a285a
commit 9d27418e25
8 changed files with 20 additions and 7 deletions

View File

@@ -225,7 +225,11 @@ class Sale < ApplicationRecord
puts "item.sales_item_id ddd"
puts item.sale_item_id
subtotal_price = subtotal_price + item.price
total_taxable = total_taxable + item.taxable_price
# only calc tax when true
if(item.is_taxable)
total_taxable = total_taxable + item.taxable_price
end
# total_taxable = total_taxable + (item.taxable_price * item.qty)
end
@@ -287,7 +291,11 @@ class Sale < ApplicationRecord
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
# only calc tax when true
if(item.is_taxable)
total_taxable = total_taxable + item.taxable_price
end
end
end