cln: print, close: Check the show_costs_ option instead of directly
checking the --show-costs flag.
This commit is contained in:
		
							parent
							
								
									ba0eec9132
								
							
						
					
					
						commit
						1d9be4c2de
					
				| @ -102,11 +102,10 @@ close CliOpts{rawopts_=rawopts, reportspec_=rspec'} j = do | |||||||
| 
 | 
 | ||||||
|     -- should we show the amount(s) on the equity posting(s) ? |     -- should we show the amount(s) on the equity posting(s) ? | ||||||
|     explicit = boolopt "explicit" rawopts |     explicit = boolopt "explicit" rawopts | ||||||
|     show_costs = boolopt "show-costs" rawopts |  | ||||||
| 
 | 
 | ||||||
|     -- the balances to close |     -- the balances to close | ||||||
|     (acctbals',_) = balanceReport rspec j |     (acctbals',_) = balanceReport rspec j | ||||||
|     acctbals = map (\(a,_,_,b) -> (a, if show_costs then b else mixedAmountStripPrices b)) acctbals' |     acctbals = map (\(a,_,_,b) -> (a, if show_costs_ ropts then b else mixedAmountStripPrices b)) acctbals' | ||||||
|     totalamt = maSum $ map snd acctbals |     totalamt = maSum $ map snd acctbals | ||||||
| 
 | 
 | ||||||
|     -- since balance assertion amounts are required to be exact, the |     -- since balance assertion amounts are required to be exact, the | ||||||
|  | |||||||
| @ -88,8 +88,8 @@ entriesReportAsText opts = | |||||||
|       -- By default, use the original as-written-in-the-journal txn. |       -- By default, use the original as-written-in-the-journal txn. | ||||||
|       | otherwise = originalTransaction |       | otherwise = originalTransaction | ||||||
|     maybeStripPrices |     maybeStripPrices | ||||||
|       -- Strip prices when inferring equity, unless the show-costs option is set |       -- Strip prices when inferring equity, unless the show_costs_  is set | ||||||
|       | opts ^. infer_equity && not (boolopt "show-costs" $ rawopts_ opts) = |       | opts ^. infer_equity && not (opts ^. show_costs) = | ||||||
|           transactionTransformPostings postingStripPrices |           transactionTransformPostings postingStripPrices | ||||||
|       | otherwise = id |       | otherwise = id | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user