mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-28 14:20:47 +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_symbol' => $currencySymbol,
|
||||||
'currency_decimal_places' => $decimalPlaces,
|
'currency_decimal_places' => $decimalPlaces,
|
||||||
'current_balance' => number_format((float)app('steam')->balance($account, $date), $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),
|
'notes' => $this->repository->getNoteText($account),
|
||||||
'monthly_payment_date' => $monthlyPaymentDate,
|
'monthly_payment_date' => $monthlyPaymentDate,
|
||||||
'credit_card_type' => $creditCardType,
|
'credit_card_type' => $creditCardType,
|
||||||
@@ -195,6 +195,9 @@ class AccountTransformer extends AbstractTransformer
|
|||||||
$creditCardType = $this->repository->getMetaValue($account, 'cc_type');
|
$creditCardType = $this->repository->getMetaValue($account, 'cc_type');
|
||||||
$monthlyPaymentDate = $this->repository->getMetaValue($account, 'cc_monthly_payment_date');
|
$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];
|
return [$creditCardType, $monthlyPaymentDate];
|
||||||
}
|
}
|
||||||
@@ -218,6 +221,9 @@ class AccountTransformer extends AbstractTransformer
|
|||||||
$openingBalance = $amount;
|
$openingBalance = $amount;
|
||||||
$openingBalanceDate = $this->repository->getOpeningBalanceDate($account);
|
$openingBalanceDate = $this->repository->getOpeningBalanceDate($account);
|
||||||
}
|
}
|
||||||
|
if(null !== $openingBalanceDate) {
|
||||||
|
$openingBalanceDate = Carbon::createFromFormat('!Y-m-d', $openingBalanceDate, config('app.timezone'))->toAtomString();
|
||||||
|
}
|
||||||
|
|
||||||
return [$openingBalance, $openingBalanceDate];
|
return [$openingBalance, $openingBalanceDate];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user