lib: export mapMixedAmount
This commit is contained in:
		
							parent
							
								
									1e9f30bafc
								
							
						
					
					
						commit
						64546cd54a
					
				| @ -96,6 +96,7 @@ module Hledger.Data.Amount ( | |||||||
|   amounts, |   amounts, | ||||||
|   filterMixedAmount, |   filterMixedAmount, | ||||||
|   filterMixedAmountByCommodity, |   filterMixedAmountByCommodity, | ||||||
|  |   mapMixedAmount, | ||||||
|   normaliseMixedAmountSquashPricesForDisplay, |   normaliseMixedAmountSquashPricesForDisplay, | ||||||
|   normaliseMixedAmount, |   normaliseMixedAmount, | ||||||
|   -- ** arithmetic |   -- ** arithmetic | ||||||
| @ -295,9 +296,9 @@ setAmountPrecision p a@Amount{astyle=s} = a{astyle=s{asprecision=p}} | |||||||
| setFullPrecision :: Amount -> Amount | setFullPrecision :: Amount -> Amount | ||||||
| setFullPrecision a = setAmountPrecision p a | setFullPrecision a = setAmountPrecision p a | ||||||
|   where |   where | ||||||
|     p                = max displayprecision normalprecision |     p                = max displayprecision naturalprecision | ||||||
|     displayprecision = asprecision $ astyle a |     displayprecision = asprecision $ astyle a | ||||||
|     normalprecision  = fromIntegral $ decimalPlaces $ normalizeDecimal $ aquantity a |     naturalprecision = fromIntegral $ decimalPlaces $ normalizeDecimal $ aquantity a | ||||||
| 
 | 
 | ||||||
| -- | Set an amount's display precision to just enough decimal places | -- | Set an amount's display precision to just enough decimal places | ||||||
| -- to show it exactly (possibly less than the number specified by | -- to show it exactly (possibly less than the number specified by | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user