blub
This commit is contained in:
parent
13e2b4b2bd
commit
cb3e7019d4
1 changed files with 1 additions and 1 deletions
|
@ -59,7 +59,7 @@ getStatisticsR = do
|
||||||
archdevils <- runDB $ selectList [UserBalance <. -5000] []
|
archdevils <- runDB $ selectList [UserBalance <. -5000] []
|
||||||
bevs <- runDB $ selectList [] [Asc BeverageId]
|
bevs <- runDB $ selectList [] [Asc BeverageId]
|
||||||
totalLossPrime <- return $ foldl (\acc (Entity _ bev) ->
|
totalLossPrime <- return $ foldl (\acc (Entity _ bev) ->
|
||||||
let primePrice = if not (isNothing (beveragePricePerCrate bev) && not (isNothing (beveragePerCrate bev))) then (fromIntegral $ fromMaybe 0 (beveragePricePerCrate bev)) / (fromIntegral $ fromMaybe 0 (beveragePerCrate bev)) else 0.0
|
let primePrice = (fromIntegral $ fromMaybe 0 (beveragePricePerCrate bev)) / (fromIntegral $ fromMaybe 1 (beveragePerCrate bev))
|
||||||
in acc + (((fromIntegral $ beverageCorrectedAmount bev) * primePrice) / 100)
|
in acc + (((fromIntegral $ beverageCorrectedAmount bev) * primePrice) / 100)
|
||||||
) 0 bevs
|
) 0 bevs
|
||||||
totalLossRetail <- return $ foldl (\acc (Entity _ bev) ->
|
totalLossRetail <- return $ foldl (\acc (Entity _ bev) ->
|
||||||
|
|
Loading…
Reference in a new issue