made supplier digest more beautiful

This commit is contained in:
nek0 2015-10-12 17:11:56 +02:00
parent f42b79d1c8
commit 34a5b61993

View file

@ -30,13 +30,15 @@ getSupplierDigestR sId = do
bevs <- runDB $ selectList [BeverageSupplier ==. (Just sId)] [Asc BeverageIdent] bevs <- runDB $ selectList [BeverageSupplier ==. (Just sId)] [Asc BeverageIdent]
digests <- return $ map genBevDigest bevs digests <- return $ map genBevDigest bevs
w <- return $ [whamlet|$newline always w <- return $ [whamlet|$newline always
#{supplierIdent sup}<br> <p>
#{unTextarea $ supplierAddress sup}<br> #{supplierIdent sup}<br>
#{supplierTel sup}<br> #{unTextarea $ supplierAddress sup}<br>
#{supplierEmail sup}<br> #{supplierTel sup}<br>
#{supplierEmail sup}<br>
<hr> <hr>
<b> <p>
_{MsgCustomerId}: #{supplierCustomerId sup} <b>
_{MsgCustomerId}: #{supplierCustomerId sup}
<table> <table>
<thead> <thead>
<tr> <tr>
@ -55,10 +57,11 @@ getSupplierDigestR sId = do
<td>#{T.pack $ show $ bdCrates dig} <td>#{T.pack $ show $ bdCrates dig}
<td>#{formatIntCurrency $ fromMaybe 0 $ beveragePricePerCrate $ bdBev dig} #{appCurrency $ appSettings master} <td>#{formatIntCurrency $ fromMaybe 0 $ beveragePricePerCrate $ bdBev dig} #{appCurrency $ appSettings master}
<td>#{formatIntCurrency $ bdTotal dig} #{appCurrency $ appSettings master} <td>#{formatIntCurrency $ bdTotal dig} #{appCurrency $ appSettings master}
<td colspan="3">_{MsgTotalCrates} <tr>
<td>#{T.pack $ show $ sum $ map bdCrates digests} <td colspan="3">_{MsgTotalCrates}
<td>_{MsgBuyValue} <td>#{T.pack $ show $ sum $ map bdCrates digests}
<td>#{formatIntCurrency $ sum $ map bdTotal digests} #{appCurrency $ appSettings master} <td>_{MsgBuyValue}
<td>#{formatIntCurrency $ sum $ map bdTotal digests} #{appCurrency $ appSettings master}
|] |]
tableLayout w tableLayout w
Nothing -> do Nothing -> do