I’m trying to add tariff code (HS code) next to each item in the price quote for PDF template.
I’ve tried to add this line to the below:
“<?php echo nl2br(htmlsc($item->item_tariff)); ?>”
However i’m getting this error below:
A PHP Error was encounteredSeverity: NoticeMessage: Undefined property: stdClass::$item_tariffFilename: pdf/ANCInvoicePlane.phpLine Number: 156
<tr>
<td><?php _htmlsc($item->item_name); ?></td>
<td><?php echo nl2br(htmlsc($item->item_description)); ?></td>
<td><?php echo nl2br(htmlsc($item->item_tariff)); ?></td>
<td class="text-right">
<?php echo format_amount($item->item_quantity); ?>
<?php if ($item->item_product_unit) : ?>
<br>
<small><?php _htmlsc($item->item_product_unit); ?></small>
<?php endif; ?>
</td>
<td class="text-right">
<?php echo format_currency($item->item_price); ?>
</td>
<?php if ($show_item_discounts) : ?>
<td class="text-right">
<?php echo format_currency($item->item_discount); ?>
</td>
<?php endif; ?>
<td class="text-right">
<?php echo format_currency($item->item_total); ?>
</td>
</tr>
Btw I’m editing a new template. Also I checked the ip table and for tariffs: its listed like this:
‘product_tariff’ => ‘Tariff’,
So what am i doing wrong ?
Thanks