This changes showMixedAmountElided so that the width to elide to is given as an argument, rather than fixed at 22 characters. This actually uses the new renderTable interface. Mostly this is just an internal change, but since we have more information about the widths of things, we can actually get rid of some superfluous spaces in the budget report output, previously there to make sure it stayed aligned with the largest reasonable contents.
		
			
				
	
	
		
			67 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			67 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| hledger -f balance-multicol.journal balance -M -A --transpose
 | |
| >>>
 | |
| Balance changes in 2012-12-01..2013-03-31:
 | |
| 
 | |
|          || assets  assets:cash  assets:checking |    
 | |
| =========++======================================+====
 | |
|  2012-12 ||      0            0               10 | 10 
 | |
|  2013-01 ||      0            0                0 |  0 
 | |
|  2013-02 ||      1            1                0 |  2 
 | |
|  2013-03 ||      0            0                1 |  1 
 | |
|  Average ||      0            0                3 |  3 
 | |
| >>>=0
 | |
| 
 | |
| hledger -f balance-multicol.journal balance -M -A -O csv --transpose
 | |
| >>>
 | |
| "Account","assets","assets:cash","assets:checking","Total:"
 | |
| "2012-12","0","0","10","10"
 | |
| "2013-01","0","0","0","0"
 | |
| "2013-02","1","1","0","2"
 | |
| "2013-03","0","0","1","1"
 | |
| "Average","0","0","3","3"
 | |
| >>>=0
 | |
| 
 | |
| 
 | |
| hledger bal -D -b 2016-12-01 -e 2016-12-04 -f - --budget
 | |
| <<<
 | |
| 2016/12/01
 | |
|     expenses:food  $10
 | |
|     assets:cash
 | |
| 
 | |
| 2016/12/02
 | |
|     expenses:food  $9
 | |
|     assets:cash
 | |
| 
 | |
| 2016/12/03
 | |
|     expenses:food  $11
 | |
|     assets:cash
 | |
| 
 | |
| 2016/12/02
 | |
|     expenses:leisure  $5
 | |
|     assets:cash
 | |
| 
 | |
| 2016/12/03
 | |
|     expenses:movies  $25
 | |
|     assets:cash
 | |
| 
 | |
| 2016/12/03
 | |
|     expenses:cab  $15
 | |
|     assets:cash
 | |
| 
 | |
| ~ daily from 2016/1/1
 | |
|     expenses:food     $10
 | |
|     expenses:leisure  $15
 | |
|     assets:cash
 | |
| >>>
 | |
| Budget performance in 2016-12-01..2016-12-03:
 | |
| 
 | |
|                   ||          2016-12-01          2016-12-02           2016-12-03 
 | |
| ==================++==============================================================
 | |
|  assets:cash      || $-10 [ 40% of $-25]  $-14 [56% of $-25]  $-51 [204% of $-25] 
 | |
|  expenses         ||  $10 [ 40% of  $25]   $14 [56% of  $25]   $51 [204% of  $25] 
 | |
|  expenses:food    ||  $10 [100% of  $10]    $9 [90% of  $10]   $11 [110% of  $10] 
 | |
|  expenses:leisure ||    0 [  0% of  $15]    $5 [33% of  $15]     0 [  0% of  $15] 
 | |
| ------------------++--------------------------------------------------------------
 | |
|                   ||    0 [           0]     0 [          0]     0 [           0] 
 | |
| >>>=0
 |