Zen Cart Logo
Forums / General Questions / Can anyone help with some code in invoices.php?

Can anyone help with some code in invoices.php?

Locked

Views: 836

Results 1 to 1 of 1
This thread is locked. New replies are disabled.
18 Jan 2007, 3:30 PM
#1
daves avatar

daves

Zen Follower

Join Date:
Dec 2006
Posts:
102
Plugin Contributions:
0

Can anyone help with some code in invoices.php?

In admin/invoice.php the following code displays the sub-total, shipping, tax, and total at the bottom of the invoice.

<?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";
  }
?>
```Can anyone suggest what I would replace it with so that it displays the sub-total, shipping, tax, and total as if "Display prices with tax" is false, even if it is actually set as true?

ie. so it displays it as follows even when the "display prices with tax" is true

1- Sub total **excluding **tax
2- shipping **excluding **tax
3- tax
4- total (1+2+3)


It doesn't matter even if it's coded so that you can no longer change the order of these in the normal manner, as long as it still works for customers both in and out of the tax zone.

Help on this would be much appreciated and would be of value to any buisnesses in the UK wh are VAT registered as the current system does not allow you to have prices displayed in the catalog including vat and have the invoices set for for UK VAT regulations (as above). It's one or the other.

Cheers,
Dave