Fix RetainedEarningsToEquity not considering API transactions

This commit is contained in:
RunasSudo 2025-08-23 21:40:30 +10:00
parent a66f90e0c9
commit 845640dc93
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -1334,9 +1334,9 @@ impl ReportingStep for RetainedEarningsToEquity {
let eofy_date = get_eofy(&self.args.date, &context.eofy_date); let eofy_date = get_eofy(&self.args.date, &context.eofy_date);
let last_eofy_date = eofy_date.with_year(eofy_date.year() - 1).unwrap(); let last_eofy_date = eofy_date.with_year(eofy_date.year() - 1).unwrap();
// RetainedEarningsToEquity depends on CombineOrdinaryTransactions for last financial year // RetainedEarningsToEquity depends on AllTransactionsExceptEarningsToEquity for last financial year
vec![ReportingProductId { vec![ReportingProductId {
name: "CombineOrdinaryTransactions".to_string(), name: "AllTransactionsExceptEarningsToEquity".to_string(),
kind: ReportingProductKind::BalancesAt, kind: ReportingProductKind::BalancesAt,
args: ReportingStepArgs::DateArgs(DateArgs { args: ReportingStepArgs::DateArgs(DateArgs {
date: last_eofy_date, date: last_eofy_date,
@ -1358,7 +1358,7 @@ impl ReportingStep for RetainedEarningsToEquity {
// Get balances at end of last financial year // Get balances at end of last financial year
let balances_last_eofy = products let balances_last_eofy = products
.get_or_err(&ReportingProductId { .get_or_err(&ReportingProductId {
name: "CombineOrdinaryTransactions".to_string(), name: "AllTransactionsExceptEarningsToEquity".to_string(),
kind: ReportingProductKind::BalancesAt, kind: ReportingProductKind::BalancesAt,
args: ReportingStepArgs::DateArgs(DateArgs { args: ReportingStepArgs::DateArgs(DateArgs {
date: last_eofy_date.clone(), date: last_eofy_date.clone(),