Dieses Dokuwiki verwendet ein von Anymorphic Webdesign erstelltes Thema.

Customer Tax ID on invoices

The intention of this modification is to show the Customer (Company) tax number on invoices.

The method used isn't ideal (in that Company name is used instead of ID) but should work fine, unless you happen to get two Companies with identical names. Note that often the same Company uses some means to differentiate themselves. Example: This Company (UK) Ltd and This Company (NZ) Ltd.


Edit catalog/admin/invoice.php

On lines 21-22,

  include(DIR_WS_CLASSES . 'order.php');
  $order = new order($oID);

Insert this below them:

  $tax_id_query = tep_db_query("select distinct entry_company_tax_id from " . TABLE_ADDRESS_BOOK . " where entry_company = '" . $order->customer['company'] . "'");
  if (tep_db_num_rows($tax_id_query)>0) {
  $company_tax_id=tep_db_fetch_array($tax_id_query);
  $tax_id=$company_tax_id[entry_company_tax_id];
  }

Around about Line 58, edit to read this:

            <td class="main"><b><?php echo ENTRY_SOLD_TO; ?></b></td>
          </tr>
          <tr>
            <td class="main"><?php echo tep_address_format($order->customer['format_id'], $order->billing, 1, '', '<br>'); ?></td>
          </tr>
          <tr>
            <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo ENTRY_COMPANY_TAX_ID; ?><?php echo $tax_id; ?></td>          
          </tr>
          <tr>
            <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo $order->customer['telephone']; ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo '<a href="mailto:' . $order->customer['email_address'] . '"><u>' . $order->customer['email_address'] . '</u></a>'; ?></td>
          </tr>

Notice these lines:
   <tr>
      <td class="main"><?php echo ENTRY_COMPANY_TAX_ID; ?><?php echo $tax_id; ?></td>          
   </tr>

This is drawn from the admin core.php language file and if the text doesn't suit then you should add a similar define entry to the bottom. Also, change the position of the displayed information, to suit your needs.

  • Bookmark at
  • Bookmark "Customer Tax ID on invoices" at Digg
  • Bookmark "Customer Tax ID on invoices" at Furl
  • Bookmark "Customer Tax ID on invoices" at Reddit
  • Bookmark "Customer Tax ID on invoices" at Google
  • Bookmark "Customer Tax ID on invoices" at StumbleUpon
  • Bookmark "Customer Tax ID on invoices" at Technorati
  • Bookmark "Customer Tax ID on invoices" at Facebook
  • Bookmark "Customer Tax ID on invoices" at Twitter
  • Bookmark "Customer Tax ID on invoices" at Slashdot
display_customer_tax_id.txt ยท Last modified: 2011/11/22 08:00 by ejsolutions
You are here: startdisplay_customer_tax_id
Dieses Dokuwiki verwendet ein von Anymorphic Webdesign erstelltes Thema.
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0