This commit is contained in:
James Cole
2025-08-24 20:14:02 +02:00
parent 2d67eece5d
commit 1cde7aab0c
2 changed files with 7 additions and 6 deletions

View File

@@ -327,6 +327,7 @@ class AccountEnrichment implements EnrichmentInterface
$openingBalance = null;
$pcOpeningBalance = null;
}
$meta['current_balance_date'] =$this->getDate();
$meta['balances'] = [
'current_balance' => $currentBalance,
'pc_current_balance' => $pcCurrentBalance,
@@ -378,13 +379,17 @@ class AccountEnrichment implements EnrichmentInterface
public function setDate(?Carbon $date): void
{
if(null !== $date) {
$date->endOfDay();
Log::debug(sprintf('Date is now %s', $date->toW3cString()));
}
$this->date = $date;
}
public function getDate(): Carbon
{
if (null === $this->date) {
return today();
return now();
}
return $this->date;