Hi,
I am trying to add a new column on the quote template but it does not seem to work,
I have done the following steps:
- Defined a Custom field (“quote_custom_unit”)
- duplicated the default.php in the public quote templates folder
- edited the file on the duplicated quote template and added the following lines:
<th><?php echo lang('unit'); ?></th>
<td><?php echo $quote->quote_custom_unit; ?></td>
Here’s what the code looks now:
<table class="table table-striped">
<thead>
<tr>
<th><?php echo lang('item'); ?></th>
<th><?php echo lang('description'); ?></th>
<th><?php echo lang('qty'); ?></th>
<th><?php echo lang('unit'); ?></th>
<th><?php echo lang('price'); ?></th>
<th><?php echo lang('total'); ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($items as $item) : ?>
<tr>
<td><?php echo $item->item_name; ?></td>
<td><?php echo nl2br($item->item_description); ?></td>
<td><?php echo format_amount($item->item_quantity); ?></td>
<td><?php echo $quote->quote_custom_unit; ?></td>
<td><?php echo format_currency($item->item_price); ?></td>
<td><?php echo format_currency($item->item_subtotal); ?></td>
</tr>
<?php endforeach ?>
<tr>
<td colspan="3"></td>
<td><?php echo lang('subtotal'); ?>:</td>
<td><?php echo format_currency($quote->quote_item_subtotal); ?></td>
</tr>
<?php if ($quote->quote_item_tax_total > 0) { ?>
<tr>
<td class="no-bottom-border" colspan="3"></td>
<td><?php echo lang('item_tax'); ?></td>
<td><?php echo format_currency($quote->quote_item_tax_total); ?></td>
</tr>
<?php } ?>
<?php foreach ($quote_tax_rates as $quote_tax_rate) : ?>
<tr>
<td class="no-bottom-border" colspan="3"></td>
<td><?php echo $quote_tax_rate->quote_tax_rate_name . ' ' . $quote_tax_rate->quote_tax_rate_percent; ?>%</td>
<td><?php echo format_currency($quote_tax_rate->quote_tax_rate_amount); ?></td>
</tr>
<?php endforeach ?>
<tr>
<td class="no-bottom-border" colspan="3"></td>
<td><b><?php echo lang('total'); ?>:</b></td>
<td><b><?php echo format_currency($quote->quote_total); ?></b></td>
</tr>
</tbody>
</table>
</div>