mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 11:41:09 -04:00
fix custom field invoice issue
This commit is contained in:
@ -46,6 +46,7 @@ class InvoiceResource extends JsonResource
|
|||||||
'base_due_amount' => $this->base_due_amount,
|
'base_due_amount' => $this->base_due_amount,
|
||||||
'currency_id' => $this->currency_id,
|
'currency_id' => $this->currency_id,
|
||||||
'formatted_created_at' => $this->formattedCreatedAt,
|
'formatted_created_at' => $this->formattedCreatedAt,
|
||||||
|
'formatted_notes' => $this->formattedNotes,
|
||||||
'invoice_pdf_url' => $this->invoicePdfUrl,
|
'invoice_pdf_url' => $this->invoicePdfUrl,
|
||||||
'formatted_invoice_date' => $this->formattedInvoiceDate,
|
'formatted_invoice_date' => $this->formattedInvoiceDate,
|
||||||
'formatted_due_date' => $this->formattedDueDate,
|
'formatted_due_date' => $this->formattedDueDate,
|
||||||
|
|||||||
@ -166,6 +166,11 @@ class Invoice extends Model implements HasMedia
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getFormattedNotesAttribute($value)
|
||||||
|
{
|
||||||
|
return $this->getNotes();
|
||||||
|
}
|
||||||
|
|
||||||
public function getFormattedCreatedAtAttribute($value)
|
public function getFormattedCreatedAtAttribute($value)
|
||||||
{
|
{
|
||||||
$dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id);
|
$dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id);
|
||||||
|
|||||||
@ -48,14 +48,14 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="invoice.notes"
|
v-if="invoice.formatted_notes"
|
||||||
class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6"
|
class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6"
|
||||||
>
|
>
|
||||||
<dt class="text-sm font-medium text-gray-500">
|
<dt class="text-sm font-medium text-gray-500">
|
||||||
{{ $t('invoices.notes') }}
|
{{ $t('invoices.notes') }}
|
||||||
</dt>
|
</dt>
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||||
<span v-html="invoice.notes"></span>
|
<span v-html="invoice.formatted_notes"></span>
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
</dl>
|
</dl>
|
||||||
|
|||||||
Reference in New Issue
Block a user