aboutsummaryrefslogtreecommitdiff
path: root/common/src/Common/Model/Payer.hs
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/Common/Model/Payer.hs')
-rw-r--r--common/src/Common/Model/Payer.hs25
1 files changed, 10 insertions, 15 deletions
diff --git a/common/src/Common/Model/Payer.hs b/common/src/Common/Model/Payer.hs
index 3c816c8..39a5788 100644
--- a/common/src/Common/Model/Payer.hs
+++ b/common/src/Common/Model/Payer.hs
@@ -1,19 +1,19 @@
module Common.Model.Payer
- ( ExceedingPayer(..)
- , getExceedingPayers
+ ( getExceedingPayers
, useIncomesFrom
, cumulativeIncomesSince
) where
-import qualified Data.List as List
-import qualified Data.Maybe as Maybe
-import Data.Time (NominalDiffTime, UTCTime (..))
-import qualified Data.Time as Time
-import Data.Time.Calendar (Day)
+import qualified Data.List as List
+import qualified Data.Maybe as Maybe
+import Data.Time (NominalDiffTime, UTCTime (..))
+import qualified Data.Time as Time
+import Data.Time.Calendar (Day)
-import Common.Model.Income (Income (..))
-import Common.Model.Payment (Payment (..))
-import Common.Model.User (User (..), UserId)
+import Common.Model.ExceedingPayer (ExceedingPayer (..))
+import Common.Model.Income (Income (..))
+import Common.Model.Payment (Payment (..))
+import Common.Model.User (User (..), UserId)
data Payer = Payer
{ _payer_userId :: UserId
@@ -29,11 +29,6 @@ data PostPaymentPayer = PostPaymentPayer
, _postPaymentPayer_ratio :: Float
}
-data ExceedingPayer = ExceedingPayer
- { _exceedingPayer_userId :: UserId
- , _exceedingPayer_amount :: Int
- } deriving (Show)
-
getExceedingPayers :: UTCTime -> [User] -> [Income] -> [Payment] -> [ExceedingPayer]
getExceedingPayers currentTime users incomes payments =
let userIds = map _user_id users