diff options
author | Joris | 2017-03-24 09:21:04 +0000 |
---|---|---|
committer | Joris | 2017-03-24 09:21:04 +0000 |
commit | cfca18262c1ff48dcb683ddab7d03cf8e55573ff (patch) | |
tree | 8a438430cee7411259fc395d8f3898488e85d750 /src/client/elm/Model/Payer.elm | |
parent | 293eb8295162bf0a038f488237db9c9d1316c04d (diff) |
Features/categories
Diffstat (limited to 'src/client/elm/Model/Payer.elm')
-rw-r--r-- | src/client/elm/Model/Payer.elm | 9 |
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) |