remove check is taxable in sale item discount cal

This commit is contained in:
Yan
2017-11-30 18:33:26 +06:30
parent f4116fe9fb
commit 72b8047754

View File

@@ -95,7 +95,7 @@ class SaleItem < ApplicationRecord
discount_account = {:name => a.title, :price => 0}
# Check for actual sale items
sale_items.where("is_taxable = false AND remark = 'Discount'").find_each do |si|
sale_items.where("remark = 'Discount'").find_each do |si|
if si.account_id == a.id
discount_account[:price] = (discount_account[:price].abs + si.price.abs) * (-1)
end