1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-10 07:55:21 +02:00

Fix income totals calculation error when loan payments exist

This commit is contained in:
Zach Gollwitzer 2025-03-11 12:00:25 -04:00
parent b8a3ca7732
commit eb599828ba

View file

@ -29,7 +29,7 @@ module IncomeStatement::BaseQuery
)
WHERE (
transfer_info.transfer_id IS NULL OR
(ae.amount < 0 AND transfer_info.accountable_type = 'Loan')
(ae.amount > 0 AND transfer_info.accountable_type = 'Loan')
)
GROUP BY 1, 2, 3, 4
SQL