Limit GenerateBalances builder to transactions in the requested period
This commit is contained in:
parent
763e27db03
commit
ed62e72e6a
@ -397,7 +397,12 @@ impl ReportingStep for GenerateBalances {
|
|||||||
let mut balances = BalancesAt {
|
let mut balances = BalancesAt {
|
||||||
balances: HashMap::new(),
|
balances: HashMap::new(),
|
||||||
};
|
};
|
||||||
update_balances_from_transactions(&mut balances.balances, transactions.iter());
|
update_balances_from_transactions(
|
||||||
|
&mut balances.balances,
|
||||||
|
transactions
|
||||||
|
.iter()
|
||||||
|
.filter(|t| t.transaction.dt.date() <= self.args.date),
|
||||||
|
);
|
||||||
|
|
||||||
// Store result
|
// Store result
|
||||||
let mut result = ReportingProducts::new();
|
let mut result = ReportingProducts::new();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user