Custom field on template

ip-2
Tags: #<Tag:0x00007f0195302aa8>

#1

I am running v2.0.0 Alpha 1

added a custom field no problem…trying to get it to show up on invoice and pdf following the guide here https://wiki.invoiceplane.com/en/2.0/customization/invoice-templates#adding-custom-fields

no luck…any pointers?


#2

no one? double checked it today…


#3

Would help if you would add more details about that. What custom field, what configuration, how did you added the field to the template?


#4

I copied the custom.blade.php as recommended to use for the base and added my custom field {{ $invoice->client->custom->column_1 }}

I placed it in the table as follows:

<td style="width: 50%;" valign="top">
        <h1>{{ mb_strtoupper(trans('fi.invoice')) }}</h1>
        <span class="info">{{ mb_strtoupper(trans('fi.invoice')) }} #</span>{{ $invoice->number }}<br>
        <span class="info">{{ mb_strtoupper(trans('fi.issued')) }}</span> {{ $invoice->formatted_created_at }}<br>
        <span class="info">{{ mb_strtoupper(trans('fi.due_date')) }}</span> {{ $invoice->formatted_due_at }}<br><br>
        <span class="info">{{ mb_strtoupper(trans('fi.bill_to')) }}</span><br>{{ $invoice->client->name }}<br>
		<br>{{ $invoice->client->custom->column_1 }}<br>
		@if ($invoice->client->address) {!! $invoice->client->formatted_address !!}<br>@endif
    </td>

I have tried creating an invoice and choosing my template and also setting my template as the default invoice template and neither works.


#5

Does adding other text or styling works? Would be important to know if the template itself isn’t working or just the custom field.


#6

Sorry for the delayed reply…

No other text or styling works…so I went back and modfied the custom.blade.php file following the same directions and it does work…seems like it isn’t picking up my other file even though it is selected. I even copied the working custom.blade.php file and renamed it and it does not pick up the changes when selected.

Let me know if there is anything I can do to help test/fix.

Thanks!