aboutsummaryrefslogtreecommitdiff
path: root/server/src/Controller
diff options
context:
space:
mode:
authorJoris2019-11-03 15:47:11 +0100
committerJoris2019-11-03 15:47:14 +0100
commit0f85cbd8ee736b1996e3966bac1f5e47ed7d27a9 (patch)
tree661049f0876e097c739bd65579ca550a88945796 /server/src/Controller
parent182f3d3fea9985c0e403087fe253981c68e57102 (diff)
Fetch the first payment date instead of every payment to get cumulative income
Diffstat (limited to 'server/src/Controller')
-rw-r--r--server/src/Controller/Income.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/Controller/Income.hs b/server/src/Controller/Income.hs
index 4a41bd3..127e3b3 100644
--- a/server/src/Controller/Income.hs
+++ b/server/src/Controller/Income.hs
@@ -37,11 +37,11 @@ list page perPage =
count <- IncomePersistence.count
users <- UserPersistence.list
- allPayments <- PaymentPersistence.listPunctual -- TODO: get first payment defined for all
+ firstPayment <- PaymentPersistence.firstPunctualDay
allIncomes <- IncomePersistence.listAll
let since =
- CM.useIncomesFrom (map _user_id users) allIncomes allPayments
+ CM.useIncomesFrom (map _user_id users) allIncomes firstPayment
let byUser =
case since of