check tax error, filter for credit payment report and add query for sale payment in receipt no detail

This commit is contained in:
phyusin
2018-07-20 13:43:29 +06:30
parent 91fc8696af
commit 5c75a99e41
6 changed files with 14 additions and 13 deletions

View File

@@ -1926,7 +1926,7 @@ end
query.select("(CASE WHEN sp.payment_method='cash' THEN (SUM(sp.payment_amount) - SUM(sales.amount_changed)) ELSE SUM(sp.payment_amount) END) as payment_amount").first()
end
else
if current_user.role == 'administrator' || current_user.role == 'manager' || current_user.role == 'account' || current_user.role == 'supervisor'
if current_user.role == 'administrator' || current_user.role == 'manager' || current_user.role == 'account'
if !from_time.nil? && !to_time.nil?
query = Sale.joins("JOIN sale_payments as sp ON sp.sale_id = sales.sale_id")
if payment_method == 'card'