mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 12:12:18 +00:00
Convert dates into date-times for #4571
This commit is contained in:
@@ -103,7 +103,7 @@ class AccountTransformer extends AbstractTransformer
|
||||
'currency_symbol' => $currencySymbol,
|
||||
'currency_decimal_places' => $decimalPlaces,
|
||||
'current_balance' => number_format((float)app('steam')->balance($account, $date), $decimalPlaces, '.', ''),
|
||||
'current_balance_date' => $date->format('Y-m-d'),
|
||||
'current_balance_date' => $date->toAtomString(),
|
||||
'notes' => $this->repository->getNoteText($account),
|
||||
'monthly_payment_date' => $monthlyPaymentDate,
|
||||
'credit_card_type' => $creditCardType,
|
||||
@@ -195,6 +195,9 @@ class AccountTransformer extends AbstractTransformer
|
||||
$creditCardType = $this->repository->getMetaValue($account, 'cc_type');
|
||||
$monthlyPaymentDate = $this->repository->getMetaValue($account, 'cc_monthly_payment_date');
|
||||
}
|
||||
if(null !== $monthlyPaymentDate) {
|
||||
$monthlyPaymentDate = Carbon::createFromFormat('!Y-m-d', $monthlyPaymentDate, config('app.timezone'))->toAtomString();
|
||||
}
|
||||
|
||||
return [$creditCardType, $monthlyPaymentDate];
|
||||
}
|
||||
@@ -218,6 +221,9 @@ class AccountTransformer extends AbstractTransformer
|
||||
$openingBalance = $amount;
|
||||
$openingBalanceDate = $this->repository->getOpeningBalanceDate($account);
|
||||
}
|
||||
if(null !== $openingBalanceDate) {
|
||||
$openingBalanceDate = Carbon::createFromFormat('!Y-m-d', $openingBalanceDate, config('app.timezone'))->toAtomString();
|
||||
}
|
||||
|
||||
return [$openingBalance, $openingBalanceDate];
|
||||
}
|
||||
|
Reference in New Issue
Block a user