{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE OverloadedLists #-} module Tests.Accounting where import Literate.Accounting import Literate.Invoice import Literate.Organization import Literate.Prelude import Tests.Organization qualified as Orga data Cause = CauseInvoice InvoiceId deriving (Eq, Ord, Show, Generic, NFData) data Account = AccountOrga Organization deriving (Eq, Ord, Show, Generic, NFData) data Amounts = Amounts { amountsEuro :: Amount 100 (UnitName "€") } deriving (Eq, Ord, Show, Generic, NFData) instance FromRational Amounts where fromRational r = Amounts{amountsEuro = fromRational r} accounting :: [Movement Cause Account Amounts] accounting = [ Movement { moveDescription = "" , moveCause = [] , moveDate = "2026-01-27" , movePostings = equalPostings (AccountOrga Orga.upwork) (AccountOrga Orga.julmInfo) 174.30 } , Movement { moveDescription = "" , moveCause = [] , moveDate = "2026-01-28" , movePostings = equalPostings (AccountOrga Orga.nixosFoundationNGITeam) (AccountOrga Orga.julmInfo) 2000.00 } , Movement { moveDescription = "" , moveCause = [] , moveDate = "2026-01-29" , movePostings = equalPostings (AccountOrga Orga.nixosFoundationNGITeam) (AccountOrga Orga.julmInfo) 4643.75 } ]