rename sumLedgerTransactions
This commit is contained in:
		
							parent
							
								
									405f71c389
								
							
						
					
					
						commit
						17ceb9039b
					
				| @ -24,7 +24,7 @@ isEntryBalanced :: Entry -> Bool | ||||
| isEntryBalanced (Entry {etransactions=ts}) = isZeroAmount sum && numcommodities==1 | ||||
|     where | ||||
|       realts = filter isReal ts | ||||
|       sum = sumLedgerTransactions realts | ||||
|       sum = sumRawTransactions realts | ||||
|       numcommodities = length $ nub $ map (symbol . commodity . tamount) realts | ||||
| 
 | ||||
| -- | Fill in a missing balance in this entry, if there is one,  | ||||
|  | ||||
| @ -34,7 +34,7 @@ autofillTransactions ts = | ||||
|       (reals, _) = partition isReal ts | ||||
|       (realamounts, missingamounts) = partition hasAmount reals | ||||
|       balance t = if (isReal t) && (not $ hasAmount t)  | ||||
|                   then t{tamount = -(sumLedgerTransactions realamounts)} | ||||
|                   then t{tamount = -(sumRawTransactions realamounts)} | ||||
|                   else t | ||||
| 
 | ||||
| isReal :: RawTransaction -> Bool | ||||
| @ -43,5 +43,5 @@ isReal t = rttype t == RegularTransaction | ||||
| hasAmount :: RawTransaction -> Bool | ||||
| hasAmount = ("AUTO" /=) . symbol . commodity . tamount | ||||
| 
 | ||||
| sumLedgerTransactions :: [RawTransaction] -> Amount | ||||
| sumLedgerTransactions = sumAmounts . map tamount | ||||
| sumRawTransactions :: [RawTransaction] -> Amount | ||||
| sumRawTransactions = sumAmounts . map tamount | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user