aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Model/Payer.elm
diff options
context:
space:
mode:
authorJoris2017-03-24 09:21:06 +0000
committerJoris2017-03-24 09:21:06 +0000
commitc0ac16a713c4e53cf6af8e72a6d5f6b8ac5d6456 (patch)
tree8a438430cee7411259fc395d8f3898488e85d750 /src/client/elm/Model/Payer.elm
parent293eb8295162bf0a038f488237db9c9d1316c04d (diff)
parentcfca18262c1ff48dcb683ddab7d03cf8e55573ff (diff)
downloadbudget-c0ac16a713c4e53cf6af8e72a6d5f6b8ac5d6456.tar.gz
budget-c0ac16a713c4e53cf6af8e72a6d5f6b8ac5d6456.tar.bz2
budget-c0ac16a713c4e53cf6af8e72a6d5f6b8ac5d6456.zip
Merge branch 'features/categories' into 'master'
Features/categories See merge request !1
Diffstat (limited to 'src/client/elm/Model/Payer.elm')
-rw-r--r--src/client/elm/Model/Payer.elm9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/client/elm/Model/Payer.elm b/src/client/elm/Model/Payer.elm
index e5a4b65..1663273 100644
--- a/src/client/elm/Model/Payer.elm
+++ b/src/client/elm/Model/Payer.elm
@@ -6,7 +6,6 @@ module Model.Payer exposing
, useIncomesFrom
)
-import Json.Decode as Json exposing (..)
import Dict exposing (..)
import List
import Maybe
@@ -54,7 +53,7 @@ getOrderedExceedingPayers currentTime users incomes payments =
mbMaxRatio =
postPaymentPayers
|> Dict.toList
- |> List.map (.ratio << snd)
+ |> List.map (.ratio << Tuple.second)
|> List.maximum
in case mbMaxRatio of
Just maxRatio ->
@@ -110,15 +109,15 @@ getPayers currentTime users incomes payments =
exceedingPayersFromAmounts : List (UserId, Int) -> List ExceedingPayer
exceedingPayersFromAmounts userAmounts =
- let mbMinAmount = List.minimum << List.map snd <| userAmounts
+ let mbMinAmount = List.minimum << List.map Tuple.second <| userAmounts
in case mbMinAmount of
Nothing ->
[]
Just minAmount ->
userAmounts
|> List.map (\userAmount ->
- { userId = fst userAmount
- , amount = snd userAmount - minAmount
+ { userId = Tuple.first userAmount
+ , amount = Tuple.second userAmount - minAmount
}
)
|> List.filter (\payer -> payer.amount > 0)