update sale item xls

This commit is contained in:
Aung Myo
2017-12-05 16:28:21 +06:30
parent 7d701edaab
commit 97bb6ae211
5 changed files with 9 additions and 20 deletions

View File

@@ -97,7 +97,7 @@ class SaleItem < ApplicationRecord
# Check for actual sale items
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)
discount_account[:price] = (discount_account[:price].abs + si.price.abs) * (1)
end
end
discount_accounts.push(discount_account)