aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Model
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/elm/Model')
-rw-r--r--src/client/elm/Model/Payer.elm13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/client/elm/Model/Payer.elm b/src/client/elm/Model/Payer.elm
index a7ce5fa..72f13b1 100644
--- a/src/client/elm/Model/Payer.elm
+++ b/src/client/elm/Model/Payer.elm
@@ -4,7 +4,6 @@ module Model.Payer
, ExceedingPayer
, getOrderedExceedingPayers
, useIncomesFrom
- , getPostPaymentPayer
) where
import Json.Decode as Json exposing (..)
@@ -29,6 +28,12 @@ type alias Payer =
, incomes : List Income
}
+type alias PostPaymentPayer =
+ { preIncomePaymentSum : Int
+ , cumulativeIncome : Int
+ , ratio : Float
+ }
+
type alias ExceedingPayer =
{ userId : UserId
, amount : Int
@@ -118,12 +123,6 @@ exceedingPayersFromAmounts userAmounts =
)
|> List.filter (\payer -> payer.amount > 0)
-type alias PostPaymentPayer =
- { preIncomePaymentSum : Int
- , cumulativeIncome : Int
- , ratio : Float
- }
-
getPostPaymentPayer : Time -> Time -> Payer -> PostPaymentPayer
getPostPaymentPayer currentTime since payer =
let cumulativeIncome = cumulativeIncomesSince currentTime since payer.incomes