Fix account api for new features.

This commit is contained in:
James Cole
2025-01-15 18:54:49 +01:00
parent b13030420b
commit 9316ff3e51
5 changed files with 97 additions and 72 deletions

View File

@@ -170,7 +170,7 @@ class CreditRecalculateService
$this->validateOpeningBalance($account, $openingBalance);
}
}
$startOfDebt = $this->repository->getOpeningBalanceAmount($account) ?? '0';
$startOfDebt = $this->repository->getOpeningBalanceAmount($account, false) ?? '0';
$leftOfDebt = app('steam')->positive($startOfDebt);
// Log::debug(sprintf('Start of debt is "%s", so initial left of debt is "%s"', app('steam')->bcround($startOfDebt, 2), app('steam')->bcround($leftOfDebt, 2)));