close: generated unpriced balance assertion amounts (#824)
This commit is contained in:
		
							parent
							
								
									f320345699
								
							
						
					
					
						commit
						08c0d83593
					
				| @ -43,10 +43,10 @@ close CliOpts{rawopts_=rawopts, reportopts_=ropts} j = do | ||||
|       -- amounts in opening/closing transactions should be too (#941) | ||||
|       -- setprec = setFullPrecision | ||||
|       setprec = setMinimalPrecision | ||||
| 
 | ||||
|       -- balance assertion amounts will be unpriced, cf #824 | ||||
|       closingps = [posting{paccount=a | ||||
|                           ,pamount=mixed [setprec $ negate b] | ||||
|                           ,pbalanceassertion=Just assertion{baamount=setprec b{aquantity=0}} | ||||
|                           ,pbalanceassertion=Just assertion{baamount=setprec b{aquantity=0, aprice=NoPrice}} | ||||
|                           } | ||||
|                   | (a,_,_,mb) <- acctbals | ||||
|                   , b <- amounts $ normaliseMixedAmountSquashPricesForDisplay mb | ||||
| @ -55,7 +55,7 @@ close CliOpts{rawopts_=rawopts, reportopts_=ropts} j = do | ||||
| 
 | ||||
|       openingps = [posting{paccount=a | ||||
|                           ,pamount=mixed [setprec b] | ||||
|                           ,pbalanceassertion=Just assertion{baamount=setprec b} | ||||
|                           ,pbalanceassertion=Just assertion{baamount=setprec b{aprice=NoPrice}} | ||||
|                           } | ||||
|                   | (a,_,_,mb) <- acctbals | ||||
|                   , b <- amounts $ normaliseMixedAmountSquashPricesForDisplay mb | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user