;refactor amountValue
This commit is contained in:
		
							parent
							
								
									bba9c32607
								
							
						
					
					
						commit
						69d72e8c48
					
				| @ -458,8 +458,8 @@ canonicaliseAmount styles a@Amount{acommodity=c, astyle=s} = a{astyle=s'} | |||||||
| -- If no default valuation commodity can be found, the amount is left | -- If no default valuation commodity can be found, the amount is left | ||||||
| -- unchanged. | -- unchanged. | ||||||
| amountValue :: Prices -> Day -> Amount -> Amount | amountValue :: Prices -> Day -> Amount -> Amount | ||||||
| amountValue prices d a@Amount{acommodity=c} = | amountValue prices d a = | ||||||
|   case priceLookup prices d c of |   case priceLookup prices d (acommodity a) of | ||||||
|     Just v  -> v{aquantity=aquantity v * aquantity a} |     Just v  -> v{aquantity=aquantity v * aquantity a} | ||||||
|     Nothing -> a |     Nothing -> a | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user