diff --git a/Handler/Journal.hs b/Handler/Journal.hs index 75b704d..e7df105 100644 --- a/Handler/Journal.hs +++ b/Handler/Journal.hs @@ -6,6 +6,7 @@ import Handler.Common getJournalR :: Handler Html getJournalR = do + master <- getYesod entries <- runDB $ selectList [] [Asc TransactionId] total <- return $ L.sum $ I.map (transactionAmount . entityVal) entries cashBalance <- getCashierBalance diff --git a/templates/journal.hamlet b/templates/journal.hamlet index 6092db1..8b74aa6 100644 --- a/templates/journal.hamlet +++ b/templates/journal.hamlet @@ -8,18 +8,18 @@ $if not $ L.null entries Zeit Beschreibung - Betrag + Betrag in #{appCurrency $ appSettings master} $forall (Entity eId entry) <- entries #{formatTime defaultTimeLocale "%A %F %H:%M" $ transactionTime entry} #{transactionDescription entry} - #{show ((fromIntegral (transactionAmount entry)) / 100)} + #{show ((fromIntegral (transactionAmount entry)) / 100)} #{appCurrency $ appSettings master} Gesamtbetrag: - #{show ((fromIntegral total) / 100)} + #{show ((fromIntegral total) / 100)} #{appCurrency $ appSettings master}

- Kassenbestand: #{show ((fromIntegral cashBalance) / 100)} + Kassenbestand: #{show ((fromIntegral cashBalance) / 100)} #{appCurrency $ appSettings master}