VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Steffi on November 30, 2012, 21:01:43 PM

Title: [SOLVED] Invoice Product Discount added instead of shown for each product
Post by: Steffi on November 30, 2012, 21:01:43 PM
Hello everybody!

Product discounts are added for each product in VM 2.0.12 :
10% discount is shown in invoice pdf like this:
product 1: 100$   -10$   90$
product 2: 100$   -20$   90$
product 3: 100$   -30$   90$

total: -30$   270$

if you got the same problem and want it to look like that:
product 1: 100$   -10$   90$
product 2: 100$   -10$   90$
product 3: 100$   -10$   90$

total: -30$   270$

change lines 76-78 from:
<td align="right" class="priceCol" >
<?php echo  $this->currency->priceDisplay$item->product_subtotal_discount );  //No quantity is already stored with it ?>
</td>

to
<td align="right" class="priceCol" >
<?php 
$var_discount_dummy $item->product_subtotal_discount $var_discount_dummy;
echo  $this->currency->priceDisplay$var_discount_dummy );  //No quantity is already stored with it 
?>

</td>

and add:
$var_discount_dummy=0.000000;
in line 21 ;)

Have fun!
Title: Re: [SOLVED] Invoice Product Discount added instead of shown for each product
Post by: JurgenG on December 03, 2012, 23:05:26 PM
This issue is also present in VM 2.0.14.

The solution mentioned above does set the discount on the second product line to 0.00 but the 3rd is again the same discount amount. 4th is 0.00 again and 5th is the discount amount of the first. and so on.
Please hheeellpp :(
Title: Re: [SOLVED] Invoice Product Discount added instead of shown for each product
Post by: Milbo on December 18, 2012, 17:11:34 PM
The problem is only in the invoice? I wanna have it fixed for the 2.0.16 holy days version.
Title: Re: [SOLVED] Invoice Product Discount added instead of shown for each product
Post by: D4niel on December 29, 2012, 17:05:00 PM
Quote from: JurgenG on December 03, 2012, 23:05:26 PM
This issue is also present in VM 2.0.14.

The solution mentioned above does set the discount on the second product line to 0.00 but the 3rd is again the same discount amount. 4th is 0.00 again and 5th is the discount amount of the first. and so on.
Please hheeellpp :(

This fix works fine for me ... hope you figured it out already
Title: Re: [SOLVED] Invoice Product Discount added instead of shown for each product
Post by: jbrailas on April 14, 2013, 12:48:00 PM
This fix doesn't work for me either.
Using VM 2.0.20b and Joomla 2.5.9.