add menu item taxable
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user