mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 20:22:07 +00:00
Fix #4571
This commit is contained in:
@@ -76,6 +76,17 @@ class BillTransformer extends AbstractTransformer
|
|||||||
$objectGroupTitle = $objectGroup->title;
|
$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 [
|
return [
|
||||||
'id' => (int)$bill->id,
|
'id' => (int)$bill->id,
|
||||||
'created_at' => $bill->created_at->toAtomString(),
|
'created_at' => $bill->created_at->toAtomString(),
|
||||||
@@ -87,15 +98,15 @@ class BillTransformer extends AbstractTransformer
|
|||||||
'name' => $bill->name,
|
'name' => $bill->name,
|
||||||
'amount_min' => number_format((float)$bill->amount_min, $currency->decimal_places, '.', ''),
|
'amount_min' => number_format((float)$bill->amount_min, $currency->decimal_places, '.', ''),
|
||||||
'amount_max' => number_format((float)$bill->amount_max, $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,
|
'repeat_freq' => $bill->repeat_freq,
|
||||||
'skip' => (int)$bill->skip,
|
'skip' => (int)$bill->skip,
|
||||||
'active' => $bill->active,
|
'active' => $bill->active,
|
||||||
'order' => (int)$bill->order,
|
'order' => (int)$bill->order,
|
||||||
'notes' => $notes,
|
'notes' => $notes,
|
||||||
'next_expected_match' => $paidData['next_expected_match'],
|
'next_expected_match' => Carbon::createFromFormat('!Y-m-d', $paidData['next_expected_match'], config('app.timezone'))->toAtomString(),
|
||||||
'pay_dates' => $payDates,
|
'pay_dates' => $payDatesFormatted,
|
||||||
'paid_dates' => $paidData['paid_dates'],
|
'paid_dates' => $paidDataFormatted,
|
||||||
'object_group_id' => $objectGroupId ? (string)$objectGroupId : null,
|
'object_group_id' => $objectGroupId ? (string)$objectGroupId : null,
|
||||||
'object_group_order' => $objectGroupOrder,
|
'object_group_order' => $objectGroupOrder,
|
||||||
'object_group_title' => $objectGroupTitle,
|
'object_group_title' => $objectGroupTitle,
|
||||||
|
@@ -100,7 +100,7 @@ return [
|
|||||||
],
|
],
|
||||||
|
|
||||||
'version' => '5.5.1',
|
'version' => '5.5.1',
|
||||||
'api_version' => '1.5.0',
|
'api_version' => '1.5.1',
|
||||||
'db_version' => 16,
|
'db_version' => 16,
|
||||||
'maxUploadSize' => 1073741824, // 1 GB
|
'maxUploadSize' => 1073741824, // 1 GB
|
||||||
'send_error_message' => env('SEND_ERROR_MESSAGE', true),
|
'send_error_message' => env('SEND_ERROR_MESSAGE', true),
|
||||||
|
@@ -62,7 +62,8 @@
|
|||||||
<span v-html="renderPaidDate(paidDate)"/><br/>
|
<span v-html="renderPaidDate(paidDate)"/><br/>
|
||||||
</span>
|
</span>
|
||||||
<span v-for="payDate in bill.attributes.pay_dates" v-if="0===bill.attributes.paid_dates.length">
|
<span v-for="payDate in bill.attributes.pay_dates" v-if="0===bill.attributes.paid_dates.length">
|
||||||
{{ new Intl.DateTimeFormat(locale, {year: 'numeric', month: 'long', day: 'numeric'}).format(new Date(payDate)) }}<br/>
|
{{ new Intl.DateTimeFormat(locale, {year: 'numeric', month: 'long', day: 'numeric'}).format(new Date(payDate)) }}
|
||||||
|
<br/>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
Reference in New Issue
Block a user