This commit is contained in:
Yan
2017-07-10 16:23:37 +06:30
parent 9402cde2bc
commit 082627018f
3 changed files with 5 additions and 4 deletions

View File

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