Hi to all,
I’m from Italy, and I have a special tax system. For the Italian law, I’ve to add a number called “marca da bollo” to each invoice, so I created a custom field and in the pdf template I print the number when I need it.
To make easy for me to detect which invoice has a specific number (“marca da bollo”), I edited the file partial_invoice_table.php, and with the previous custom field system (until version 1.4.10), this part of code worked well:
<th><?php echo lang('client_name'); ?></th>
<th><?php echo "Marca da bollo"; ?></th>
<th style="text-align: right;"><?php echo lang('amount'); ?></th>
...
<td>
<a href="<?php echo site_url('clients/view/' . $invoice->client_id); ?>" title="<?php echo lang('view_client'); ?>">
<?php echo $invoice->client_name; ?>
</a>
</td>
<td>
<?php echo nl2br($invoice->invoice_custom_id_marca_da_bollo); ?>
</td>
<td class="amount <?php if ($invoice->invoice_sign == '-1') { echo 'text-danger'; }; ?>">
<?php echo format_currency($invoice->invoice_total); ?>
</td>
Now, obviously, if I try to print the custom field with the new syntax $custom_fields['invoice']['ID marca da bollo']
, I get an error telling me that $custom_fields
it’s not declared.
My question is: how can I get the custom field provided above and print it in the partial_invoice_table.php file?
Thanks in advance for the collaboration.