mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 11:41:09 -04:00
Merge branch 'invoice-custom-field' into 'master'
fix custom field invoice issue See merge request mohit.panjvani/crater-web!1432
This commit is contained in:
@ -46,6 +46,7 @@ class InvoiceResource extends JsonResource
|
||||
'base_due_amount' => $this->base_due_amount,
|
||||
'currency_id' => $this->currency_id,
|
||||
'formatted_created_at' => $this->formattedCreatedAt,
|
||||
'formatted_notes' => $this->formattedNotes,
|
||||
'invoice_pdf_url' => $this->invoicePdfUrl,
|
||||
'formatted_invoice_date' => $this->formattedInvoiceDate,
|
||||
'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)
|
||||
{
|
||||
$dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id);
|
||||
|
||||
@ -48,14 +48,14 @@
|
||||
</dd>
|
||||
</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"
|
||||
>
|
||||
<dt class="text-sm font-medium text-gray-500">
|
||||
{{ $t('invoices.notes') }}
|
||||
</dt>
|
||||
<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>
|
||||
</div>
|
||||
</dl>
|
||||
|
||||
Reference in New Issue
Block a user