Community Add-Ons

Maintainers: fat_dog
Add file to this package
Top » Order Total Modules

Display VAT or Tax Content on Invoice
for osCommerce Online Merchant v2.2

Here is a very simple contribution that I wrote for my store, and I figured I should give back to the community for all the great contributions I have grabbed in the past.

My store displays simple pricing - i.e. just one price is input, which includes VAT (or Tax). I therefore do not use OSC tax options on anything.

So when we get to the invoice, I have a Sub-Total, Postage/Shipping, and a Total. All of this is done by the order totals class.

What I have produced here is a fix that will go and find the numeric value of the customers order total, display this (if you wish) seperately to the shipping and sub-total (just uncomment the line) and then work out the VAT content of that total and display it.

Works fine with any tax rate, just change 0.175 to your desired rate.

Legend:  Download   Report
Expand All / Collapse All
a simpler way dasruud 20 Apr 2007  

an easier way to accomplish this, without the need to add constants, would be to change the formula in invoice.php.
for instance, on my shop i have the last column from the invoice modified from "total including tax" to "tax amount"
to edit, find:

<td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "n";

change to:

<td class="dataTableContent" align="right" valign="top">' . $currencies->format($order->products[$i]['tax'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</td>' . "n";

Display VAT or Tax Content on Invoice v1.1 fat_dog 31 Jan 2007  
Display VAT or Tax Content on Invoice fat_dog 31 Jan 2007