balance: simplify multicolumn report titles slightly
This commit is contained in:
		
							parent
							
								
									1333b2650a
								
							
						
					
					
						commit
						ca43eab47a
					
				@ -369,7 +369,7 @@ formatField opts accountName depth total ljust min max field = case field of
 | 
				
			|||||||
-- | Render a multi-column period balance report as plain text suitable for console output.
 | 
					-- | Render a multi-column period balance report as plain text suitable for console output.
 | 
				
			||||||
periodBalanceReportAsText :: ReportOpts -> MultiBalanceReport -> [String]
 | 
					periodBalanceReportAsText :: ReportOpts -> MultiBalanceReport -> [String]
 | 
				
			||||||
periodBalanceReportAsText opts (MultiBalanceReport (colspans, items, coltotals)) =
 | 
					periodBalanceReportAsText opts (MultiBalanceReport (colspans, items, coltotals)) =
 | 
				
			||||||
  (["Change of balance (flow):"] ++) $
 | 
					  (["Balance changes:"] ++) $
 | 
				
			||||||
  trimborder $ lines $
 | 
					  trimborder $ lines $
 | 
				
			||||||
   render
 | 
					   render
 | 
				
			||||||
    id
 | 
					    id
 | 
				
			||||||
@ -396,7 +396,7 @@ periodBalanceReportAsText opts (MultiBalanceReport (colspans, items, coltotals))
 | 
				
			|||||||
-- | Render a multi-column cumulative balance report as plain text suitable for console output.
 | 
					-- | Render a multi-column cumulative balance report as plain text suitable for console output.
 | 
				
			||||||
cumulativeBalanceReportAsText :: ReportOpts -> MultiBalanceReport -> [String]
 | 
					cumulativeBalanceReportAsText :: ReportOpts -> MultiBalanceReport -> [String]
 | 
				
			||||||
cumulativeBalanceReportAsText opts (MultiBalanceReport (colspans, items, coltotals)) =
 | 
					cumulativeBalanceReportAsText opts (MultiBalanceReport (colspans, items, coltotals)) =
 | 
				
			||||||
  (["Ending balance (cumulative):"] ++) $
 | 
					  (["Ending balances (cumulative):"] ++) $
 | 
				
			||||||
  trimborder $ lines $
 | 
					  trimborder $ lines $
 | 
				
			||||||
   render id ((" "++) . maybe "" (showDate . prevday) . spanEnd) showMixedAmountOneLineWithoutPrice $
 | 
					   render id ((" "++) . maybe "" (showDate . prevday) . spanEnd) showMixedAmountOneLineWithoutPrice $
 | 
				
			||||||
    addtotalrow $ 
 | 
					    addtotalrow $ 
 | 
				
			||||||
@ -417,7 +417,7 @@ cumulativeBalanceReportAsText opts (MultiBalanceReport (colspans, items, coltota
 | 
				
			|||||||
-- | Render a multi-column historical balance report as plain text suitable for console output.
 | 
					-- | Render a multi-column historical balance report as plain text suitable for console output.
 | 
				
			||||||
historicalBalanceReportAsText :: ReportOpts -> MultiBalanceReport -> [String]
 | 
					historicalBalanceReportAsText :: ReportOpts -> MultiBalanceReport -> [String]
 | 
				
			||||||
historicalBalanceReportAsText opts (MultiBalanceReport (colspans, items, coltotals)) =
 | 
					historicalBalanceReportAsText opts (MultiBalanceReport (colspans, items, coltotals)) =
 | 
				
			||||||
  (["Ending balance (historical):"] ++) $
 | 
					  (["Ending balances (historical):"] ++) $
 | 
				
			||||||
  trimborder $ lines $
 | 
					  trimborder $ lines $
 | 
				
			||||||
   render id ((" "++) . maybe "" (showDate . prevday) . spanEnd) showMixedAmountOneLineWithoutPrice $
 | 
					   render id ((" "++) . maybe "" (showDate . prevday) . spanEnd) showMixedAmountOneLineWithoutPrice $
 | 
				
			||||||
    addtotalrow $ 
 | 
					    addtotalrow $ 
 | 
				
			||||||
 | 
				
			|||||||
@ -14,7 +14,7 @@ hledgerdev -f balance-multicol.journal register
 | 
				
			|||||||
# 2. A period balance (flow) report. --no-total also works but isn't pretty.
 | 
					# 2. A period balance (flow) report. --no-total also works but isn't pretty.
 | 
				
			||||||
hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' --no-total
 | 
					hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' --no-total
 | 
				
			||||||
>>>
 | 
					>>>
 | 
				
			||||||
Change of balance (flow):
 | 
					Balance changes:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                 ||  2013/01  2013/02  2013/03 
 | 
					                 ||  2013/01  2013/02  2013/03 
 | 
				
			||||||
=================++============================
 | 
					=================++============================
 | 
				
			||||||
@ -37,7 +37,7 @@ hledgerdev -f - balance -p 'quarterly in 2013' --empty
 | 
				
			|||||||
2013/3/1
 | 
					2013/3/1
 | 
				
			||||||
  (a)  1
 | 
					  (a)  1
 | 
				
			||||||
>>>
 | 
					>>>
 | 
				
			||||||
Change of balance (flow):
 | 
					Balance changes:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   ||  2013q1  2013q2  2013q3  2013q4 
 | 
					   ||  2013q1  2013q2  2013q3  2013q4 
 | 
				
			||||||
===++=================================
 | 
					===++=================================
 | 
				
			||||||
@ -51,7 +51,7 @@ Change of balance (flow):
 | 
				
			|||||||
# the highest-level displayed accounts (here, assets).
 | 
					# the highest-level displayed accounts (here, assets).
 | 
				
			||||||
hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' --cumulative
 | 
					hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' --cumulative
 | 
				
			||||||
>>>
 | 
					>>>
 | 
				
			||||||
Ending balance (cumulative):
 | 
					Ending balances (cumulative):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                 ||  2013/01/31  2013/02/28  2013/03/31 
 | 
					                 ||  2013/01/31  2013/02/28  2013/03/31 
 | 
				
			||||||
=================++=====================================
 | 
					=================++=====================================
 | 
				
			||||||
@ -68,7 +68,7 @@ Ending balance (cumulative):
 | 
				
			|||||||
# includes the displayed subaccount and not the excluded one.
 | 
					# includes the displayed subaccount and not the excluded one.
 | 
				
			||||||
hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' --cumulative not:cash
 | 
					hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' --cumulative not:cash
 | 
				
			||||||
>>>
 | 
					>>>
 | 
				
			||||||
Ending balance (cumulative):
 | 
					Ending balances (cumulative):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                 ||  2013/01/31  2013/02/28  2013/03/31 
 | 
					                 ||  2013/01/31  2013/02/28  2013/03/31 
 | 
				
			||||||
=================++=====================================
 | 
					=================++=====================================
 | 
				
			||||||
@ -82,7 +82,7 @@ Ending balance (cumulative):
 | 
				
			|||||||
# 6. A historical ending balance report.
 | 
					# 6. A historical ending balance report.
 | 
				
			||||||
hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' --historical
 | 
					hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' --historical
 | 
				
			||||||
>>>
 | 
					>>>
 | 
				
			||||||
Ending balance (historical):
 | 
					Ending balances (historical):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                 ||  2013/01/31  2013/02/28  2013/03/31 
 | 
					                 ||  2013/01/31  2013/02/28  2013/03/31 
 | 
				
			||||||
=================++=====================================
 | 
					=================++=====================================
 | 
				
			||||||
@ -98,7 +98,7 @@ Ending balance (historical):
 | 
				
			|||||||
# the highest-level displayed accounts, now assets:cash and assets:checking.
 | 
					# the highest-level displayed accounts, now assets:cash and assets:checking.
 | 
				
			||||||
hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' not:assets$
 | 
					hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' not:assets$
 | 
				
			||||||
>>>
 | 
					>>>
 | 
				
			||||||
Change of balance (flow):
 | 
					Balance changes:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                 ||  2013/01  2013/02  2013/03 
 | 
					                 ||  2013/01  2013/02  2013/03 
 | 
				
			||||||
=================++============================
 | 
					=================++============================
 | 
				
			||||||
@ -112,7 +112,7 @@ Change of balance (flow):
 | 
				
			|||||||
# 8. cumulative:
 | 
					# 8. cumulative:
 | 
				
			||||||
hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' not:assets$ --cumulative
 | 
					hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' not:assets$ --cumulative
 | 
				
			||||||
>>>
 | 
					>>>
 | 
				
			||||||
Ending balance (cumulative):
 | 
					Ending balances (cumulative):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                 ||  2013/01/31  2013/02/28  2013/03/31 
 | 
					                 ||  2013/01/31  2013/02/28  2013/03/31 
 | 
				
			||||||
=================++=====================================
 | 
					=================++=====================================
 | 
				
			||||||
@ -126,7 +126,7 @@ Ending balance (cumulative):
 | 
				
			|||||||
# 9. historical
 | 
					# 9. historical
 | 
				
			||||||
hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' --historical
 | 
					hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' --historical
 | 
				
			||||||
>>>
 | 
					>>>
 | 
				
			||||||
Ending balance (historical):
 | 
					Ending balances (historical):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                 ||  2013/01/31  2013/02/28  2013/03/31 
 | 
					                 ||  2013/01/31  2013/02/28  2013/03/31 
 | 
				
			||||||
=================++=====================================
 | 
					=================++=====================================
 | 
				
			||||||
@ -143,7 +143,7 @@ Ending balance (historical):
 | 
				
			|||||||
# 10. A flow report with depth limiting. The depth limit aggregates the three accounts as "assets".
 | 
					# 10. A flow report with depth limiting. The depth limit aggregates the three accounts as "assets".
 | 
				
			||||||
hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' --depth 1
 | 
					hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' --depth 1
 | 
				
			||||||
>>>
 | 
					>>>
 | 
				
			||||||
Change of balance (flow):
 | 
					Balance changes:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        ||  2013/01  2013/02  2013/03 
 | 
					        ||  2013/01  2013/02  2013/03 
 | 
				
			||||||
========++============================
 | 
					========++============================
 | 
				
			||||||
@ -156,7 +156,7 @@ Change of balance (flow):
 | 
				
			|||||||
# 11. As above, but postings in the top-level assets account have been excluded.
 | 
					# 11. As above, but postings in the top-level assets account have been excluded.
 | 
				
			||||||
hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' --depth 1 assets:
 | 
					hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' --depth 1 assets:
 | 
				
			||||||
>>>
 | 
					>>>
 | 
				
			||||||
Change of balance (flow):
 | 
					Balance changes:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        ||  2013/01  2013/02  2013/03 
 | 
					        ||  2013/01  2013/02  2013/03 
 | 
				
			||||||
========++============================
 | 
					========++============================
 | 
				
			||||||
@ -169,7 +169,7 @@ Change of balance (flow):
 | 
				
			|||||||
# 12. A cumulative balance report with depth limiting.
 | 
					# 12. A cumulative balance report with depth limiting.
 | 
				
			||||||
hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' --depth 1 --cumulative
 | 
					hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' --depth 1 --cumulative
 | 
				
			||||||
>>>
 | 
					>>>
 | 
				
			||||||
Ending balance (cumulative):
 | 
					Ending balances (cumulative):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        ||  2013/01/31  2013/02/28  2013/03/31 
 | 
					        ||  2013/01/31  2013/02/28  2013/03/31 
 | 
				
			||||||
========++=====================================
 | 
					========++=====================================
 | 
				
			||||||
@ -182,7 +182,7 @@ Ending balance (cumulative):
 | 
				
			|||||||
# 13. A historical balance report with depth limiting.
 | 
					# 13. A historical balance report with depth limiting.
 | 
				
			||||||
hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' --depth 1 --historical
 | 
					hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' --depth 1 --historical
 | 
				
			||||||
>>>
 | 
					>>>
 | 
				
			||||||
Ending balance (historical):
 | 
					Ending balances (historical):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        ||  2013/01/31  2013/02/28  2013/03/31 
 | 
					        ||  2013/01/31  2013/02/28  2013/03/31 
 | 
				
			||||||
========++=====================================
 | 
					========++=====================================
 | 
				
			||||||
@ -195,7 +195,7 @@ Ending balance (historical):
 | 
				
			|||||||
# 14. The three multicol balance report types again, this time with --tree
 | 
					# 14. The three multicol balance report types again, this time with --tree
 | 
				
			||||||
hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' --tree
 | 
					hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' --tree
 | 
				
			||||||
>>>
 | 
					>>>
 | 
				
			||||||
Change of balance (flow):
 | 
					Balance changes:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            ||  2013/01  2013/02  2013/03 
 | 
					            ||  2013/01  2013/02  2013/03 
 | 
				
			||||||
============++============================
 | 
					============++============================
 | 
				
			||||||
@ -210,7 +210,7 @@ Change of balance (flow):
 | 
				
			|||||||
# 15.
 | 
					# 15.
 | 
				
			||||||
hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' --cumulative --tree
 | 
					hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' --cumulative --tree
 | 
				
			||||||
>>>
 | 
					>>>
 | 
				
			||||||
Ending balance (cumulative):
 | 
					Ending balances (cumulative):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            ||  2013/01/31  2013/02/28  2013/03/31 
 | 
					            ||  2013/01/31  2013/02/28  2013/03/31 
 | 
				
			||||||
============++=====================================
 | 
					============++=====================================
 | 
				
			||||||
@ -225,7 +225,7 @@ Ending balance (cumulative):
 | 
				
			|||||||
# 16.
 | 
					# 16.
 | 
				
			||||||
hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' --historical --tree
 | 
					hledgerdev -f balance-multicol.journal balance -p 'monthly in 2013' --historical --tree
 | 
				
			||||||
>>>
 | 
					>>>
 | 
				
			||||||
Ending balance (historical):
 | 
					Ending balances (historical):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            ||  2013/01/31  2013/02/28  2013/03/31 
 | 
					            ||  2013/01/31  2013/02/28  2013/03/31 
 | 
				
			||||||
============++=====================================
 | 
					============++=====================================
 | 
				
			||||||
@ -247,7 +247,7 @@ hledgerdev -f- balance --monthly --date2
 | 
				
			|||||||
 (b)  1
 | 
					 (b)  1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
>>>
 | 
					>>>
 | 
				
			||||||
Change of balance (flow):
 | 
					Balance changes:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   ||  2014/01 
 | 
					   ||  2014/01 
 | 
				
			||||||
===++==========
 | 
					===++==========
 | 
				
			||||||
@ -271,7 +271,7 @@ hledgerdev -f- balance -p 'monthly 2014/1/10-2014/2/20'
 | 
				
			|||||||
 (after)  1
 | 
					 (after)  1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
>>>
 | 
					>>>
 | 
				
			||||||
Change of balance (flow):
 | 
					Balance changes:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        ||  2014/01  2014/02 
 | 
					        ||  2014/01  2014/02 
 | 
				
			||||||
========++===================
 | 
					========++===================
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user