Michael Kainer 
							
						 
					 
					
						
						
						
						
							
						
						
							79ca4a767e 
							
						 
					 
					
						
						
							
							cli: Add -% to compound balance commands  
						
						 
						
						... 
						
						
						
						This commit introduces the commandline argument -%/--percent to show
percentages of the column's total instead of the absolute amounts for
each account in reports. The signs of the values are preserved.
This option is especially useful for the balance and incomestatement
commands.
If there are multiple commodities involved in a report hledger bails
with an error message. This can be avoided by using --cost. Also note
that if one uses -% with the balance command the chances are high that
all numbers are 0. This is due to the fact that by default balance sums
up to zero. If one wants to use -% in a meaningful way with balance one
has to add a query.
In order to keep the implementation as simple as possible --tree has no
influence over how the percentages are calculated, i.e., the percentages
always represent the fraction of the columns total. If one wants to know
the percentages relative to a parent account, one has to use a query to
narrow down the accounts. 
						
					 
					
						2019-11-18 17:10:59 -08:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							c4d650e6ad 
							
						 
					 
					
						
						
							
							lib: balance-style -> balance-type  
						
						 
						
						
						
					 
					
						2019-11-13 09:06:25 -08:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							39bc183340 
							
						 
					 
					
						
						
							
							lib: csv reader gets balance-style directive  
						
						 
						
						
						
					 
					
						2019-11-13 09:06:25 -08:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							fb3c1a132c 
							
						 
					 
					
						
						
							
							csv: fix parsing of whitespace on line after an if block ( fix   #1120 )  
						
						 
						
						
						
					 
					
						2019-11-13 05:41:32 -08:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							94f912e558 
							
						 
					 
					
						
						
							
							lib: better resolution of csv field aliases ("balance" vs "balance1", etc)  
						
						 
						
						
						
					 
					
						2019-11-12 12:20:09 -08:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							c4d7cc198a 
							
						 
					 
					
						
						
							
							csv: finalise and check journals generated from CSV ( #1000 )  
						
						 
						
						... 
						
						
						
						Invalid transactions generated from CSV will now be rejected.
I updated some csv tests to avoid this, except for 21, which
probably needs more cleanup. 
						
					 
					
						2019-11-07 18:58:12 -08:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							5264a7ebc1 
							
						 
					 
					
						
						
							
							;lib: refactor, split out finaliseJournal  
						
						 
						
						
						
					 
					
						2019-11-07 18:08:41 -08:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							fc001da1ef 
							
						 
					 
					
						
						
							
							lib: expenses:unknown is a much better default account name  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							c66ccc5cee 
							
						 
					 
					
						
						
							
							lib: do not try to balance transaction in csv reader  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							95ec5715cc 
							
						 
					 
					
						
						
							
							lib: better compatibility code in csv reader  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							d62f84bec2 
							
						 
					 
					
						
						
							
							lib: csv reader does not generate postings if account=""  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							8d24a40150 
							
						 
					 
					
						
						
							
							lib: csv parser fills out amounts on all postings, if possible  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							637741a755 
							
						 
					 
					
						
						
							
							lib: amount1 is no longer magical  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							977592e49c 
							
						 
					 
					
						
						
							
							lib: typo fix, "expense:unknown" -> "expenses:unknown"  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							3c7d5d466d 
							
						 
					 
					
						
						
							
							lib, doc, test: csv parser gains "end" command for "if" block  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							f92590f92c 
							
						 
					 
					
						
						
							
							lib: allow zero postings in csv reader  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							1ab8631264 
							
						 
					 
					
						
						
							
							lib: change default rules file text to mention "amount1"  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							32cbe4c7b3 
							
						 
					 
					
						
						
							
							lib: better inference for unknown account names in csv parser  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							b5d4918c16 
							
						 
					 
					
						
						
							
							lib: allow recursive interpolation of fields with underscores in names  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							38db7eb24d 
							
						 
					 
					
						
						
							
							lib: implement skip end in csv reader  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							b2ba1086b6 
							
						 
					 
					
						
						
							
							lib: fixed validation rules for minimul viable csv rules to include account1 etc  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							f1ab107400 
							
						 
					 
					
						
						
							
							lib, doc: extended "skip" in "if" body to "skip N"  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							f108b52171 
							
						 
					 
					
						
						
							
							lib: fix for  #1001  - empty field assignment consumes next line  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							5dac141a7e 
							
						 
					 
					
						
						
							
							lib: implement conditional line skips in csv ( fixes   #1076 )  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							f74df08e98 
							
						 
					 
					
						
						
							
							lib: fix accidental switch of income:unknown and expence:unknown in csv parser  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							77fa81ea4d 
							
						 
					 
					
						
						
							
							lib: fix error message formatting (header displayed twice)  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							825b9ce5b3 
							
						 
					 
					
						
						
							
							lib: fixed amount vs amount1 conflict detection in csv parser  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							24bba96ea2 
							
						 
					 
					
						
						
							
							lib: more robust multi-line joining in csv parser  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							881422cd0f 
							
						 
					 
					
						
						
							
							lib: fix recursive interpolation in CSV parser for fields with dashes  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							e4476dd2f1 
							
						 
					 
					
						
						
							
							lib: more robust "unknown" account assignment in csv parser  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							28ca65b99a 
							
						 
					 
					
						
						
							
							lib: more explicit conditions for using legacy csv parser  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							e4add6df83 
							
						 
					 
					
						
						
							
							lib: fix for multiline descriptions in csv ( fixes   #841 ,  #416 )  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Dmitry Astapov 
							
						 
					 
					
						
						
						
						
							
						
						
							9aab476d53 
							
						 
					 
					
						
						
							
							lib: csv parser supports up to 9 postings.  Fixes   #570 ,  #627  
						
						 
						
						
						
					 
					
						2019-11-05 21:16:42 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							312e772468 
							
						 
					 
					
						
						
							
							prices: style price amounts; always show full precision  
						
						 
						
						
						
					 
					
						2019-10-20 07:09:34 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							b598f30a8a 
							
						 
					 
					
						
						
							
							;lib: styleAmountExceptPrecision  
						
						 
						
						
						
					 
					
						2019-10-20 07:08:45 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							2e3b51c03f 
							
						 
					 
					
						
						
							
							;lib: journalConvertAmountsToCost -> journalToCost  
						
						 
						
						
						
					 
					
						2019-10-19 19:58:27 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							54e1caebf1 
							
						 
					 
					
						
						
							
							;lib: refactor journalConvertAmountsToCost  
						
						 
						
						
						
					 
					
						2019-10-19 19:53:05 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							905149df86 
							
						 
					 
					
						
						
							
							;lib: transaction valuation helpers  
						
						 
						
						
						
					 
					
						2019-10-19 19:41:21 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							de0a6b1e62 
							
						 
					 
					
						
						
							
							;lib: Transaction: as Map -> as M  
						
						 
						
						
						
					 
					
						2019-10-19 19:17:35 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Mykola Orliuk 
							
						 
					 
					
						
						
						
						
							
						
						
							78146978f4 
							
						 
					 
					
						
						
							
							;lib: store raw opts unquoted  
						
						 
						
						... 
						
						
						
						It looks like we only need quote when we build query and in some
messages.
Fixes  simonmichael/hledger#1079  
						
					 
					
						2019-10-19 14:44:08 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							eff1b31c86 
							
						 
					 
					
						
						
							
							csv: allow csv records with varying lengths, padding with empties  
						
						 
						
						... 
						
						
						
						Sometimes trailing empty fields are omitted entirely (including the
commas) in CSV records. (I see this in exported Google spreadsheets.)
Now we don't raise an error in this case, instead we automatically pad
any "short" records with empty fields. Not yet well tested. 
						
					 
					
						2019-10-07 14:54:36 -10:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							6dcddadd9f 
							
						 
					 
					
						
						
							
							;journal: in generated-transaction:/posting: tags, add a space before the value  
						
						 
						
						
						
					 
					
						2019-10-07 14:54:36 -10:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							16973ce296 
							
						 
					 
					
						
						
							
							;lib: fix journalInferCommodityStyles debug message  
						
						 
						
						
						
					 
					
						2019-09-27 18:51:37 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							58a313165c 
							
						 
					 
					
						
						
							
							;journal: infer amount styles more carefully, fix wrong output ( #1091 )  
						
						 
						
						... 
						
						
						
						Certain journal entries could trigger a bug where we displayed amounts
with the same character for digit group mark and decimal mark. Now if
a comma or period digit group mark is detected, that forces the
decimal mark to be the other character. 
						
					 
					
						2019-09-27 15:40:36 -10:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							9967ead4c5 
							
						 
					 
					
						
						
							
							;lib: let commodityStylesFromAmounts & co. return an error ( #793 ,  #1091 )  
						
						 
						
						... 
						
						
						
						And if they did, the stats command would now throw an error.
Changed:
journalApplyCommodityStyles
journalInferCommodityStyles
commodityStylesFromAmounts 
						
					 
					
						2019-09-27 15:09:39 -10:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							64f49a8c02 
							
						 
					 
					
						
						
							
							;doc: journal: rewrite Amounts; switch to "digit group mark" term ( #1091 )  
						
						 
						
						
						
					 
					
						2019-09-27 14:25:32 -10:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							b754abc36b 
							
						 
					 
					
						
						
							
							;lib: commodityStylesFromAmounts: simplify, disable  #1091  test  
						
						 
						
						
						
					 
					
						2019-09-26 18:06:22 -10:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							4884213a3e 
							
						 
					 
					
						
						
							
							;lib: commodityStylesFromAmounts: a failing unit test for  #1091  
						
						 
						
						
						
					 
					
						2019-09-25 23:08:00 -10:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							7ffe38677a 
							
						 
					 
					
						
						
							
							;lib: parseAndFinaliseJournal: note txns order issue ( #1091 )  
						
						 
						
						
						
					 
					
						2019-09-25 23:07:22 -10:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							6037d701b6 
							
						 
					 
					
						
						
							
							;lib: document RawNumber, AmbiguousNumber, DigitGrp ( #1091 )  
						
						 
						
						
						
					 
					
						2019-09-25 21:26:06 -10:00