Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Invoice not showing right price


yuluma

Recommended Posts

Ive been fooling around with the invoice.php in the admin folder. I want to format the invoice for printing. And found a litle bug.

 

The code is saying:

 

 ? ? ?
echo ' ? ? ? ?<td class="dataTableContent" align="right" valign="top">' . tep_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']) . '</b></td>' . "\n" .

 

So the "final_price" is printed

 

AND then the result on the invoice is that the same price as the incl price is shown!

 

Somehow the final_price is calculated as the price incl. Now i tried to change the code to this:

 

 ? ? ?echo ' ? ? ? ?<td class="dataTableContent" align="right" valign="top">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n" .
? ? ? ? ? ' ? ? ? ?<td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format($order->products[$i]['product_price'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" .

 

because i looked in the dbase table 'products' and saw that the correct price was under "product_price" but this doesn't work. (i think because it isn't pre-defined ?)

 

Is there anyone who knows this. searched the forum, couldn't find an answer.

big thanx in advance !!! :D

Link to comment
Share on other sites

Next to that I've got another question about the invoice:

 

I would like to change the receipent address format, but the code is just telling to print:

 

<?php echo tep_address_format($order->customer['format_id'], $order->customer, 1, '', '<br>'); ?>

 

I would like to format is so again i tried something like this:

 

<?php echo $order->address_book['entry_firstname']; ?>

 

this is because the invoice data is not in the customers table but in the addres_book table. But how do i connect the order back to the address_book ? Dit anyone already formatted the invoice like this ?

 

Again thanx !

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...