diff --git a/hledger-web/Hledger/Web/Handler/RegisterR.hs b/hledger-web/Hledger/Web/Handler/RegisterR.hs index 192ed96cb..d5d5711ec 100644 --- a/hledger-web/Hledger/Web/Handler/RegisterR.hs +++ b/hledger-web/Hledger/Web/Handler/RegisterR.hs @@ -107,7 +107,8 @@ registerChartHtml q title percommoditytxnreports = $(hamletFile "templates/chart charttitle = if null title then "" else title ++ ":" colorForCommodity = fromMaybe 0 . flip lookup commoditiesIndex commoditiesIndex = zip (map fst percommoditytxnreports) [0..] :: [(CommoditySymbol,Int)] - simpleMixedAmountQuantity = maybe 0 aquantity . listToMaybe . amounts + simpleMixedAmountQuantity = maybe 0 aquantity . listToMaybe . amounts . mixedAmountStripPrices + showZeroCommodity = wbUnpack . showMixedAmountB oneLine{displayPrice=False,displayZeroCommodity=True} shownull c = if null c then " " else c nodatelink = (RegisterR, [("q", T.unwords $ removeDates q)]) diff --git a/hledger-web/templates/chart.hamlet b/hledger-web/templates/chart.hamlet index 02e7ab273..78a77db3e 100644 --- a/hledger-web/templates/chart.hamlet +++ b/hledger-web/templates/chart.hamlet @@ -36,8 +36,8 @@ [ #{dayToJsTimestamp $ triDate i}, #{simpleMixedAmountQuantity $ triCommodityBalance c i}, - '#{showMixedAmountWithZeroCommodity $ triCommodityAmount c i}', - '#{showMixedAmountWithZeroCommodity $ triCommodityBalance c i}', + '#{showZeroCommodity $ triCommodityAmount c i}', + '#{showZeroCommodity $ triCommodityBalance c i}', '#{concat $ intersperse "\\n" $ lines $ T.unpack $ showTransaction $ triOrigTransaction i}', #{tindex $ triOrigTransaction i} ],