more currency
This commit is contained in:
parent
3fae262cf0
commit
623b19a440
2 changed files with 5 additions and 4 deletions
|
@ -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
|
||||||
|
|
|
@ -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}>
|
||||||
|
|
Loading…
Reference in a new issue