From 6c60119a92be141d41dae61d3bbe519d7fe08b52 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 28 Jul 2014 18:47:59 -0700 Subject: [PATCH] web: show right zero commodities on register chart If zero amounts are recorded with a commodity, any resulting zero balances appearing in the register chart will have the proper commodity and colour. (This is the first and so far only case of hledger preserving the commodity of zero amounts.) --- hledger-web/Handler/RegisterR.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hledger-web/Handler/RegisterR.hs b/hledger-web/Handler/RegisterR.hs index d214bca63..8dd374835 100644 --- a/hledger-web/Handler/RegisterR.hs +++ b/hledger-web/Handler/RegisterR.hs @@ -141,8 +141,8 @@ registerChartHtml percommoditytxnreports = [ #{dayToJsTimestamp $ triDate i}, #{simpleMixedAmountQuantity $ triCommodityBalance c i}, - '#{show $ triCommodityAmount c i}', - '#{show $ triCommodityBalance c i}', + '#{showMixedAmountWithZeroCommodity $ triCommodityAmount c i}', + '#{showMixedAmountWithZeroCommodity $ triCommodityBalance c i}', '#{concat $ intersperse "\\n" $ lines $ show $ triOrigTransaction i}', ], /* [] */