Author Topic: Invoice Product Discount added instead of shown for each product.  (Read 3427 times)

JurgenG

  • Beginner
  • *
  • Posts: 15
in the confirmation email to the customer the discounts are added in the subtotal list.

Instead of
1:  5,00
2:  0,00
3:  0,00
4:  0,00
Total  5,00

I get:
1:  5,00
2:  5,00
3:  5,00
4:  5,00
Total:  5,00

The checkout cart has the correct values

Joomla: 2.5.8
VM: 2.0.14 default theme.

Can someone share a light on this????

John2400

  • Virtuemart - the Future is ever Changing
  • Global Moderator
  • Full Member
  • *
  • Posts: 1568
  • VirtueMart Version: Use VM3.0.12
Re: Invoice Product Discount added instead of shown for each product.
« Reply #1 on: December 04, 2012, 09:24:49 am »
Ok - could you show us your settings Image

* are you using a tax to discount ?
* are using a Variant on a product to discount?
* are you using a Coupon?

* Image of the tax setting -to show us what you did  or the set up of that variant. I'm sure we could solve this.

JurgenG

  • Beginner
  • *
  • Posts: 15
Re: Invoice Product Discount added instead of shown for each product.
« Reply #2 on: December 04, 2012, 20:46:29 pm »
Hi John.

The discount is on the price BEFORE tax and the amount is without tax (the email show with tax and ok)
We do not use any variants on any of the product and we do not use coupons.

I wil try to make some printscreens of the settings this evening.

Thanx in advance.

JurgenG

  • Beginner
  • *
  • Posts: 15
Re: Invoice Product Discount added instead of shown for each product.
« Reply #3 on: December 06, 2012, 00:38:50 am »
Here are the printscreens of the VM configuration.

[attachment cleanup by admin]

JurgenG

  • Beginner
  • *
  • Posts: 15
Re: Invoice Product Discount added instead of shown for each product.
« Reply #4 on: December 06, 2012, 00:40:45 am »
And the calculation and tax rules:

[attachment cleanup by admin]

John2400

  • Virtuemart - the Future is ever Changing
  • Global Moderator
  • Full Member
  • *
  • Posts: 1568
  • VirtueMart Version: Use VM3.0.12
Re: Invoice Product Discount added instead of shown for each product.
« Reply #5 on: December 06, 2012, 13:22:43 pm »
A little complicated - I see you have had nearly 50 people look already and wow.  I'm wondering what you are trying to do?

* looking at your calculations you have a 5 euro product that you has tax that takes 6 euros of before tax and then you are trying to add a VAT tax of 21%? 

Try and explain what you want the tax to do?   or is it working correctly except when you receive an email.?

Or does not work at all- to start - if you have a tax - try leaving out the group default don't put anything there and try.

I'm sorry you have lost me - yes I can see the images but we are not sure what you are really asking.  Maybe it is just me ?

eg : a good costs X amount , then I want to ....

JurgenG

  • Beginner
  • *
  • Posts: 15
Re: Invoice Product Discount added instead of shown for each product.
« Reply #6 on: December 06, 2012, 21:31:03 pm »
What i am trying to do is to get rid of the discount cumulative.
Regarding the moment of discount you are correct. The tax should be calculated over the basic price minus the discount
e.g.: product base price is 110,--
                      discount: -10,--
     Tax (21% over 100):  21,--
                              --------------
                    Sale price: 121,--

When i place the discount AFTER the tax calculation the end price is the same but the TAX is incorrect and this will show in the cart, email and invoice.
e.g.: product base price is 110,--
      Tax (21% over 110):  23,10
   discount (inc 21%tax): -12.10
                              --------------
                    Sale price: 121,--

In the Cart all looks perfect for both the product line as the totals line. unit base price incl tax  |  quantity |  tax amount   |   discount  |  Total (see print screen of cart)
In the backend all the values are also correct. although the discounts are not visible here (see print screen of back-end order).

However... in the confirmation emails an the pdf invoice, the discount of the product lines are added up (see printscreen email_notification).
Only the first product, the Z-Wave vera Gateway.. has a discount of 6,91 euro ex tax ( 7,50 euro incl. tax) the other product lines have no discount whatsover and still the product lines says a discount of 7,50 and the TOTAL discount is also 7,50

Basically i would like the email notification and the invoice to show NO discounts when there are NONE.

Thanks for all of your time.


[attachment cleanup by admin]

lindapowers

  • Full Member
  • ***
  • Posts: 1335
  • If you're going through hell, keep going.
    • Venta de naranjas online y mandarinas
  • Skype Name: manu.gonzalez91
  • VirtueMart Version: Latest avi
Re: Invoice Product Discount added instead of shown for each product.
« Reply #7 on: December 09, 2012, 03:11:30 am »
The discounts or cupon codes have always been calculated wrong in VM, at least in the older 1.x version.

The discount has to be calculated over the base product price without the TAX.

Don't know if he meant this.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9853
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Invoice Product Discount added instead of shown for each product.
« Reply #8 on: December 18, 2012, 03:51:22 am »
The calculation is correct in vm2. I think he has a layout problem
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

JurgenG

  • Beginner
  • *
  • Posts: 15
Re: Invoice Product Discount added instead of shown for each product.
« Reply #9 on: December 20, 2012, 13:25:39 pm »
Hello Milbo,

The calculations are indedd correct in the backend and in the cart.
The discount amount are cumulated in the email and PDF Invoice that is being send to the customer. No changes have been made to the layout files.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9853
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Invoice Product Discount added instead of shown for each product.
« Reply #10 on: December 20, 2012, 15:25:16 pm »
Thank you guys,

we found it. In fact we did not notice the error, because the order was just not showing the discount at all. So the stored discount per item in the orders is wrong now. I am very glad, that we found this thread to find this imho last serious problem. All new orders should show the correct discount now.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

JurgenG

  • Beginner
  • *
  • Posts: 15
Re: Invoice Product Discount added instead of shown for each product.
« Reply #11 on: December 20, 2012, 15:47:33 pm »
Milbo, your more than welcome  ;D  although i am not sure as to what we did.

I understand that this cumulative discount error will be resolved in the next final release than?

I would really like to know what the fix is/was/will be. My brain was and is working overtime on this and I am all out of asprine :P

john1974

  • Beginner
  • *
  • Posts: 5
Re: Invoice Product Discount added instead of shown for each product.
« Reply #12 on: December 20, 2012, 17:45:35 pm »
Thank you guys,

we found it. In fact we did not notice the error, because the order was just not showing the discount at all. So the stored discount per item in the orders is wrong now. I am very glad, that we found this thread to find this imho last serious problem. All new orders should show the correct discount now.

Thank goodness, for this thread. I just spent two days setting up VM2 to be compliant with Australian GST standards, got the cart working with discounts and GST then found the discount amount was accumulating in the pring/pdf invoice (unlike the cart which is perfect). Attached a pic showing print invoice on left, and cart at checkout on right.

Milbo, any rough time frame for when this fix will be available as I won't be able to use VM until then?

Many thanks for all your hard work VM team.

[attachment cleanup by admin]

john1974

  • Beginner
  • *
  • Posts: 5
Re: Invoice Product Discount added instead of shown for each product.
« Reply #13 on: December 20, 2012, 18:00:07 pm »
Also found that this accumulative discount bug is showing in the Order items/history page (Account Maintenance - menu item).
Pic attached.
Thanks
John

[attachment cleanup by admin]

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9853
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/