print: -B shows converted amounts again, as in 1.1, even without -x. #551 (Simon Michael, Mykola Orliuk)
This commit is contained in:
		
							parent
							
								
									99cde10e98
								
							
						
					
					
						commit
						f9e113c9ab
					
				| @ -66,8 +66,15 @@ printEntries opts@CliOpts{reportopts_=ropts} j = do | |||||||
| entriesReportAsText :: CliOpts -> EntriesReport -> String | entriesReportAsText :: CliOpts -> EntriesReport -> String | ||||||
| entriesReportAsText opts = concatMap (showTransactionUnelided . gettxn)  | entriesReportAsText opts = concatMap (showTransactionUnelided . gettxn)  | ||||||
|   where |   where | ||||||
|     gettxn | boolopt "explicit" $ rawopts_ opts = id                   -- use the fully inferred/explicit txn |     gettxn | useexplicittxn = id                   -- use the fully inferred/explicit txn | ||||||
|            | otherwise                          = originalTransaction  -- use the original txn (more or less) |            | otherwise      = originalTransaction  -- use the original as-written txn, more or less | ||||||
|  |     -- Original vs inferred transactions/postings were causing problems here, disabling -B (#551). | ||||||
|  |     -- Use the explicit one if -B or -x are active. | ||||||
|  |     -- This passes tests; does it also mean -B sometimes shows missing amounts unnecessarily ?   | ||||||
|  |     useexplicittxn = or | ||||||
|  |       [ boolopt "explicit" $ rawopts_ opts | ||||||
|  |       , cost_ $ reportopts_ opts | ||||||
|  |       ] | ||||||
| 
 | 
 | ||||||
| -- Replace this transaction's postings with the original postings if any, but keep the | -- Replace this transaction's postings with the original postings if any, but keep the | ||||||
| -- current possibly rewritten account names. | -- current possibly rewritten account names. | ||||||
|  | |||||||
| @ -548,7 +548,7 @@ Note, `-x` will cause postings with a multi-commodity amount | |||||||
| will be split into multiple single-commodity postings, for valid journal output. | will be split into multiple single-commodity postings, for valid journal output. | ||||||
| 
 | 
 | ||||||
| With `-B`/`--cost`, amounts with [transaction prices](/journal.html#transaction-prices) | With `-B`/`--cost`, amounts with [transaction prices](/journal.html#transaction-prices) | ||||||
| are converted to cost using that price. | are converted to cost using that price. This can be used for troubleshooting. | ||||||
| 
 | 
 | ||||||
| With `-m`/`--match` and a STR argument, print will show at most one transaction: the one  | With `-m`/`--match` and a STR argument, print will show at most one transaction: the one  | ||||||
| one whose description is most similar to STR, and is most recent. STR should contain at | one whose description is most similar to STR, and is most recent. STR should contain at | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user