Add New Column in Quote and Invoice

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:

  1. Defined a Custom field (“quote_custom_unit”)
  2. duplicated the default.php in the public quote templates folder
  3. 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>

What exactly isn’t working?

I wanted to make the custom field “quote_custom_unit” display as a column on the items. Such that the Quote items will have the following fields:

  • Item’
  • Description
  • Quantity
  • Unit
  • Price

Yes but what is not working? Your code looks correct so is the field just not showing up or there are any errors?

im sorry i was not clear. the new column i want to add is not showing up.