Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Invoice.php, Tax included with Subtotal


Guest

Recommended Posts

I am running OSC 2.2 and when generating the invoice, the tax is listed in the sub-total and then the line just below that. I have looked through invoice.php to find the loop:

for ($i=0; $i<sizeof($order->totals); $i++) {

echo '          <tr>' . "n" .

'  <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "n" .

'  <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "n" .

'  </tr>' . "n";

}

 

Which generates the output, but I am unable to find where it is getting its sub-total from. I am thinking about rewriting this to simply output values directly without looping through... but I would like to leave the original code intact as much as possible. I have searched the forum and have seen references where people realized this and smiply left it, but I can't let it go. Its annoying and brings out the crazy.

If anyone has some advice I would appreciate it.

Link to comment
Share on other sites

If you find the solution to this please post it, I haven't had a chance to go through this yet, but you are right it does not look right when displayed in this way.

 

Also the tax is included in the shipping charge. IMO the best way for this to work would be to show all charges without tax, then a sub-total, then total tax, then final grand total. It is quite confusing as-is.....

Link to comment
Share on other sites

Make sure that in catalog/includes/application_top.php this:

define('DISPLAY_PRICE_WITH_TAX', false); // Display prices with tax (true) or without tax (false)

is set to false

and if you have the 2.2 MS1 version ...this is done in your admin side of the store

 

HTH

 

The_Bear

Link to comment
Share on other sites

Make sure that in catalog/includes/application_top.php this:

define('DISPLAY_PRICE_WITH_TAX', false); // Display prices with tax (true) or without tax (false)

is set to false

and if you have the 2.2 MS1 version ...this is done in your admin side of the store

 

HTH

 

The_Bear

 

The only trouble if you do this, is that all prices throughout the store are displayed without tax. I would like to display product prices with tax. But when going through the checkout procedure show the subtotal and shipping without tax. It works this way if set as you suggest but then product prices do not include tax unless you are logged in as an EU resident (for VAT).

Link to comment
Share on other sites

The_Bear

 

You are my hero!! That resolved my issue and made everything better. The sun has even come out and birds are singing. Thank you!

Link to comment
Share on other sites

  • 2 weeks later...

thanx for you suggestrions..

i have another question

 

i need to have item's price in the store catalog including tax...

so i can't use

define('DISPLAY_PRICE_WITH_TAX', false);

but i also need to display -in the invoice, via admin panel- the sub-total non-including tax..

i mean:

 

Sub-Total (not including tax): 20,00EUR

Tax (IVA 20%): 4,00EUR

Total: 24,00EUR

 

the trouble is that that data are stored in orders_total table..

there is no row for a total price not including tax..

i've tried making a javascript code in a form that made a subtraction between the total and the tax, but it don't work couse it also store the currencies code (EUR in my case) (and i need it to be there)...

thanx to everyone...

Link to comment
Share on other sites

everyone keeps mentioning

 

Make sure that in catalog/includes/application_top.php this:

Code:

define('DISPLAY_PRICE_WITH_TAX', false); // Display prices with tax (true) or without tax (false)

 

but my application_top don't have that! i'm using 2.2 ms1 (feb 2003)

 

where can i find this?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...