diff --git a/app/Transformers/BillTransformer.php b/app/Transformers/BillTransformer.php index 4af76d1fb9..20f36e2ca9 100644 --- a/app/Transformers/BillTransformer.php +++ b/app/Transformers/BillTransformer.php @@ -76,6 +76,17 @@ class BillTransformer extends AbstractTransformer $objectGroupTitle = $objectGroup->title; } + $paidDataFormatted = []; + $payDatesFormatted = []; + foreach($paidData['paid_dates'] as $object) { + $object['date'] = Carbon::createFromFormat('!Y-m-d', $object['date'], config('app.timezone'))->toAtomString(); + $paidDataFormatted[] = $object; + } + + foreach ($payDates as $string) { + $payDatesFormatted[] = Carbon::createFromFormat('!Y-m-d', $string, config('app.timezone'))->toAtomString(); + } + return [ 'id' => (int)$bill->id, 'created_at' => $bill->created_at->toAtomString(), @@ -87,15 +98,15 @@ class BillTransformer extends AbstractTransformer 'name' => $bill->name, 'amount_min' => number_format((float)$bill->amount_min, $currency->decimal_places, '.', ''), 'amount_max' => number_format((float)$bill->amount_max, $currency->decimal_places, '.', ''), - 'date' => $bill->date->format('Y-m-d'), + 'date' => $bill->date->toAtomString(), 'repeat_freq' => $bill->repeat_freq, 'skip' => (int)$bill->skip, 'active' => $bill->active, 'order' => (int)$bill->order, 'notes' => $notes, - 'next_expected_match' => $paidData['next_expected_match'], - 'pay_dates' => $payDates, - 'paid_dates' => $paidData['paid_dates'], + 'next_expected_match' => Carbon::createFromFormat('!Y-m-d', $paidData['next_expected_match'], config('app.timezone'))->toAtomString(), + 'pay_dates' => $payDatesFormatted, + 'paid_dates' => $paidDataFormatted, 'object_group_id' => $objectGroupId ? (string)$objectGroupId : null, 'object_group_order' => $objectGroupOrder, 'object_group_title' => $objectGroupTitle, diff --git a/config/firefly.php b/config/firefly.php index 1922b18aab..946fbc31b7 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -100,7 +100,7 @@ return [ ], 'version' => '5.5.1', - 'api_version' => '1.5.0', + 'api_version' => '1.5.1', 'db_version' => 16, 'maxUploadSize' => 1073741824, // 1 GB 'send_error_message' => env('SEND_ERROR_MESSAGE', true), diff --git a/frontend/src/components/dashboard/MainBillsList.vue b/frontend/src/components/dashboard/MainBillsList.vue index 66d0ec27c7..44ae268e5c 100644 --- a/frontend/src/components/dashboard/MainBillsList.vue +++ b/frontend/src/components/dashboard/MainBillsList.vue @@ -62,7 +62,8 @@
- {{ new Intl.DateTimeFormat(locale, {year: 'numeric', month: 'long', day: 'numeric'}).format(new Date(payDate)) }}
+ {{ new Intl.DateTimeFormat(locale, {year: 'numeric', month: 'long', day: 'numeric'}).format(new Date(payDate)) }} +