fix conflit

This commit is contained in:
Zin Lin Phyo
2017-08-25 13:46:50 +06:30
116 changed files with 2373 additions and 111 deletions

View File

@@ -184,6 +184,7 @@ class Sale < ApplicationRecord
sale_item.sale_id = self.id
sale_item.price = diningprice
sale_item.save
self.compute
end
def update_item (item)
@@ -215,10 +216,11 @@ class Sale < ApplicationRecord
sales_items.each do |item|
#compute each item and added to total
puts "item.sales_item_id ddd"
puts item.sale_item_id
subtotal_price = subtotal_price + item.price
total_taxable = total_taxable + (item.taxable_price * item.qty)
end
apply_tax (total_taxable)
self.total_amount = subtotal_price
self.total_discount = total_discount