Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2007
    Posts
    54
    Plugin Contributions
    0

    Default Removing Total (excluding tax) from invoice

    When I remove these lines from admin/invoice.php:


    Code:
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
          <tr class="dataTableHeadingRow">
            <td class="dataTableHeadingContent" colspan="2"><?php echo TABLE_HEADING_PRODUCTS; ?></td>
            <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td>
            <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TAX; ?></td>
            <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_EXCLUDING_TAX; ?></td>
            <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_INCLUDING_TAX; ?></td>
            <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_EXCLUDING_TAX; ?></td>
            <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_INCLUDING_TAX; ?></td>
          </tr>
    <?php
        for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
          echo '      <tr class="dataTableRow">' . "\n" .
               '        <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . '&nbsp;x</td>' . "\n" .
               '        <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];
    
          if (isset($order->products[$i]['attributes']) && (($k = sizeof($order->products[$i]['attributes'])) > 0)) {
            for ($j = 0; $j < $k; $j++) {
              echo '<br><nobr><small>&nbsp;<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value']));
              if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
              if ($order->products[$i]['attributes'][$j]['product_attribute_is_free'] == '1' and $order->products[$i]['product_is_free'] == '1') echo TEXT_INFO_ATTRIBUTE_FREE;
              echo '</i></small></nobr>';
            }
          }
    
          echo '        </td>' . "\n" .
               '        <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n";
          echo '        <td class="dataTableContent" align="right" valign="top">' . zen_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n" .
               '        <td class="dataTableContent" align="right" valign="top"><b>' .
                          $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) .
                          ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format($order->products[$i]['onetime_charges'], true, $order->info['currency'], $order->info['currency_value']) : '') .
                        '</b></td>' . "\n" .
               '        <td class="dataTableContent" align="right" valign="top"><b>' .
                          $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) .
                          ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') .
                        '</b></td>' . "\n" .
               '        <td class="dataTableContent" align="right" valign="top"><b>' .
                          $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) .
                          ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format($order->products[$i]['onetime_charges'], true, $order->info['currency'], $order->info['currency_value']) : '') .
                        '</b></td>' . "\n" .
               '        <td class="dataTableContent" align="right" valign="top"><b>' .
                          $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) .
                          ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') .
                        '</b></td>' . "\n";
          echo '      </tr>' . "\n";
        }
    ?>
          <tr>
            <td align="right" colspan="8"><table border="0" cellspacing="0" cellpadding="2">
    <?php
      for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
        echo '          <tr>' . "\n" .
             '            <td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Text">' . $order->totals[$i]['title'] . '</td>' . "\n" .
             '            <td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Amount">' . $order->totals[$i]['text'] . '</td>' . "\n" .
             '          </tr>' . "\n";
      }
    ?>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
    I get rid of the column Total excl. tax column, but now my Price incl. tax is the same as the Price excl. tax (I am talking about the amount), why is this happening?

    thanx

  2. #2
    Join Date
    Dec 2007
    Posts
    54
    Plugin Contributions
    0

    Default Re: Removing Total (excluding tax) from invoice

    Quote Originally Posted by ivanc View Post
    When I remove these lines from admin/invoice.php:


    PHP Code:
    <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_EXCLUDING_TAX?></td>


    <td class="dataTableContent" align="right" valign="top"><b>' .
                          $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) .
                          ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') .
                        '</b></td>' . "\n" .
               '
    these are the two deleted parts

    looks like [COLOR="Red"] doesnt work with PHP tags so it didnt show the deleted part in the previous post

    please look for and in the previous post to see the position of the deleted parts in the file

 

 

Similar Threads

  1. Replies: 22
    Last Post: 12 Jan 2015, 09:45 PM
  2. Logout is including tax & logged in is excluding tax
    By jcdk in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 2
    Last Post: 15 Nov 2009, 02:59 PM
  3. Removing Tax from Order total on checkout_payment page
    By phil99 in forum General Questions
    Replies: 13
    Last Post: 16 Jul 2009, 10:46 PM
  4. Price(inc) vs. Order Total Tax on invoice
    By susb8383 in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 0
    Last Post: 23 Jan 2009, 09:32 PM
  5. Excluding gift certs from order total for free shipping
    By KTNaturals in forum Built-in Shipping and Payment Modules
    Replies: 9
    Last Post: 18 Feb 2007, 03:49 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR