more currency

This commit is contained in:
nek0 2015-04-04 08:25:10 +02:00
parent 3fae262cf0
commit 623b19a440
2 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -8,18 +8,18 @@ $if not $ L.null entries
<tr>
<th>Zeit
<th>Beschreibung
<th>Betrag
<th>Betrag in #{appCurrency $ appSettings master}
$forall (Entity eId entry) <- entries
<tr>
<td>#{formatTime defaultTimeLocale "%A %F %H:%M" $ transactionTime entry}
<td>#{transactionDescription entry}
<td>#{show ((fromIntegral (transactionAmount entry)) / 100)}
<td>#{show ((fromIntegral (transactionAmount entry)) / 100)} #{appCurrency $ appSettings master}
<tfoot>
<tr>
<td colspan="2">Gesamtbetrag:
<td>#{show ((fromIntegral total) / 100)}
<td>#{show ((fromIntegral total) / 100)} #{appCurrency $ appSettings master}
<p>
Kassenbestand: #{show ((fromIntegral cashBalance) / 100)}
Kassenbestand: #{show ((fromIntegral cashBalance) / 100)} #{appCurrency $ appSettings master}
<p>
<a href=@{PayoutR}>