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 :: Handler Html
getJournalR = do getJournalR = do
master <- getYesod
entries <- runDB $ selectList [] [Asc TransactionId] entries <- runDB $ selectList [] [Asc TransactionId]
total <- return $ L.sum $ I.map (transactionAmount . entityVal) entries total <- return $ L.sum $ I.map (transactionAmount . entityVal) entries
cashBalance <- getCashierBalance cashBalance <- getCashierBalance

View file

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