mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-15 19:09:50 +00:00
Fix #7505
This commit is contained in:
@@ -209,7 +209,13 @@ class AccountTransformer extends AbstractTransformer
|
||||
$monthlyPaymentDate = $this->repository->getMetaValue($account, 'cc_monthly_payment_date');
|
||||
}
|
||||
if (null !== $monthlyPaymentDate) {
|
||||
$monthlyPaymentDate = Carbon::createFromFormat('!Y-m-d', $monthlyPaymentDate, config('app.timezone'))->toAtomString();
|
||||
// try classic date:
|
||||
if(10 === strlen($monthlyPaymentDate)) {
|
||||
$monthlyPaymentDate = Carbon::createFromFormat('!Y-m-d', $monthlyPaymentDate, config('app.timezone'))->toAtomString();
|
||||
}
|
||||
if(10 !== strlen($monthlyPaymentDate)) {
|
||||
$monthlyPaymentDate = Carbon::parse($monthlyPaymentDate, config('app.timezone'))->toAtomString();
|
||||
}
|
||||
}
|
||||
|
||||
return [$creditCardType, $monthlyPaymentDate];
|
||||
@@ -233,7 +239,7 @@ class AccountTransformer extends AbstractTransformer
|
||||
$openingBalanceDate = $this->repository->getOpeningBalanceDate($account);
|
||||
}
|
||||
if (null !== $openingBalanceDate) {
|
||||
$openingBalanceDate = Carbon::createFromFormat('!Y-m-d', $openingBalanceDate, config('app.timezone'))->toAtomString();
|
||||
$openingBalanceDate = Carbon::createFromFormat('Y-m-d H:i:s', $openingBalanceDate, config('app.timezone'))->toAtomString();
|
||||
}
|
||||
|
||||
return [$openingBalance, $openingBalanceDate];
|
||||
|
||||
@@ -103,9 +103,8 @@ class PiggyBankTransformer extends AbstractTransformer
|
||||
$leftToSave = app('steam')->bcround($leftToSave, $currency->decimal_places);
|
||||
$savePerMonth = app('steam')->bcround($this->piggyRepos->getSuggestedMonthlyAmount($piggyBank), $currency->decimal_places);
|
||||
}
|
||||
$startDate = $piggyBank->startdate?->toAtomString();
|
||||
$targetDate = $piggyBank->targetdate?->toAtomString();
|
||||
|
||||
$startDate = $piggyBank->startdate?->format('Y-m-d');
|
||||
$targetDate = $piggyBank->targetdate?->format('Y-m-d');
|
||||
|
||||
return [
|
||||
'id' => (string)$piggyBank->id,
|
||||
|
||||
@@ -92,9 +92,9 @@ class RecurrenceTransformer extends AbstractTransformer
|
||||
'type' => $shortType,
|
||||
'title' => $recurrence->title,
|
||||
'description' => $recurrence->description,
|
||||
'first_date' => $recurrence->first_date->toAtomString(),
|
||||
'latest_date' => $recurrence->latest_date?->toAtomString(),
|
||||
'repeat_until' => $recurrence->repeat_until?->toAtomString(),
|
||||
'first_date' => $recurrence->first_date->format('Y-m-d'),
|
||||
'latest_date' => $recurrence->latest_date?->format('Y-m-d'),
|
||||
'repeat_until' => $recurrence->repeat_until?->format('Y-m-d'),
|
||||
'apply_rules' => $recurrence->apply_rules,
|
||||
'active' => $recurrence->active,
|
||||
'nr_of_repetitions' => $reps,
|
||||
|
||||
@@ -42,7 +42,7 @@ class TagTransformer extends AbstractTransformer
|
||||
*/
|
||||
public function transform(Tag $tag): array
|
||||
{
|
||||
$date = $tag->date?->toAtomString();
|
||||
$date = $tag->date?->format('Y-m-d');
|
||||
/** @var Location $location */
|
||||
$location = $tag->locations()->first();
|
||||
$latitude = null;
|
||||
|
||||
Reference in New Issue
Block a user