[Skip to main content](#vessel-content)

#   Difference from invoice and cart value with coupon

##

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86293
- Thank you received: 14271
-
-

14 years 3 months ago [\#58257](#58257) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Difference from invoice and cart value with coupon](/forum/4-how-to/53502-difference-from-invoice-and-cart-value-with-coupon?start=20#58257 "Hello, I'm using version 1.5.8 with Apply discounts before tax and price&#95;with&#95;tax set to no tax. I configured a 50% coupon.  In checkout I correctly get: - product 100€ - coupon 50€ - vat (20%) 10€ - correctly (100-50) &#42; 20/100 - total 60€  But order/invoice shows: - product 100€ - coupon 60€ (!) - vat (20%) 20€ (!) - total 60€  Why is there this difference? If I choose Apply discounts after tax, the order/invoice doesn't change and the checkout works as expected. I need order/invoice and administration to be like in the checkout, how can I do that?  Thanks!")*

I didn't had the time to look at the problem yet. I'll look at that this weekend.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUzNTAyLWRpZmZlcmVuY2UtZnJvbS1pbnZvaWNlLWFuZC1jYXJ0LXZhbHVlLXdpdGgtY291cG9uP3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Ciovo](/forum/user/6733-ciovo "View Ciovo's Profile")**
- [![Ciovo's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6733-ciovo "View Ciovo's Profile") Topic Author
- [ Offline](/forum/user/6733-ciovo)

Less More

- Posts: 19
- Thank you received: 0
-
-

14 years 2 months ago [\#59484](#59484) by [Ciovo](/forum/user/6733-ciovo "View Ciovo's Profile")  Replied by *[Ciovo](/forum/user/6733-ciovo "View Ciovo's Profile")* on topic *[Re: Difference from invoice and cart value with coupon](/forum/4-how-to/53502-difference-from-invoice-and-cart-value-with-coupon?start=20#59484 "Hello, I'm using version 1.5.8 with Apply discounts before tax and price&#95;with&#95;tax set to no tax. I configured a 50% coupon.  In checkout I correctly get: - product 100€ - coupon 50€ - vat (20%) 10€ - correctly (100-50) &#42; 20/100 - total 60€  But order/invoice shows: - product 100€ - coupon 60€ (!) - vat (20%) 20€ (!) - total 60€  Why is there this difference? If I choose Apply discounts after tax, the order/invoice doesn't change and the checkout works as expected. I need order/invoice and administration to be like in the checkout, how can I do that?  Thanks!")*

Any news?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUzNTAyLWRpZmZlcmVuY2UtZnJvbS1pbnZvaWNlLWFuZC1jYXJ0LXZhbHVlLXdpdGgtY291cG9uP3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86293
- Thank you received: 14271
-
-

14 years 2 months ago [\#59556](#59556) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Difference from invoice and cart value with coupon](/forum/4-how-to/53502-difference-from-invoice-and-cart-value-with-coupon?start=20#59556 "Hello, I'm using version 1.5.8 with Apply discounts before tax and price&#95;with&#95;tax set to no tax. I configured a 50% coupon.  In checkout I correctly get: - product 100€ - coupon 50€ - vat (20%) 10€ - correctly (100-50) &#42; 20/100 - total 60€  But order/invoice shows: - product 100€ - coupon 60€ (!) - vat (20%) 20€ (!) - total 60€  Why is there this difference? If I choose Apply discounts after tax, the order/invoice doesn't change and the checkout works as expected. I need order/invoice and administration to be like in the checkout, how can I do that?  Thanks!")*

We have been delayed on that but we have been able to reproduce it on our end.
We'll do some more tests and fix it during this week and the fix will be available in next version of HikaShop which should be out in one or two weeks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUzNTAyLWRpZmZlcmVuY2UtZnJvbS1pbnZvaWNlLWFuZC1jYXJ0LXZhbHVlLXdpdGgtY291cG9uP3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Eliot](/forum/user/1824-eliot "View Eliot's Profile")**
- [![Eliot's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1824.png)](/forum/user/1824-eliot "View Eliot's Profile")
- [ Offline](/forum/user/1824-eliot)

Less More

- Posts: 2334
- Thank you received: 403
-
-

14 years 2 months ago -  14 years 2 months ago [\#59617](#59617) by [Eliot](/forum/user/1824-eliot "View Eliot's Profile")  Replied by *[Eliot](/forum/user/1824-eliot "View Eliot's Profile")* on topic *[Re: Difference from invoice and cart value with coupon](/forum/4-how-to/53502-difference-from-invoice-and-cart-value-with-coupon?start=20#59617 "Hello, I'm using version 1.5.8 with Apply discounts before tax and price&#95;with&#95;tax set to no tax. I configured a 50% coupon.  In checkout I correctly get: - product 100€ - coupon 50€ - vat (20%) 10€ - correctly (100-50) &#42; 20/100 - total 60€  But order/invoice shows: - product 100€ - coupon 60€ (!) - vat (20%) 20€ (!) - total 60€  Why is there this difference? If I choose Apply discounts after tax, the order/invoice doesn't change and the checkout works as expected. I need order/invoice and administration to be like in the checkout, how can I do that?  Thanks!")*

Hi,

You were right and we find and error in the discount calculation for this case.
If you want to fix the bug you have to modify the line 1562 of the file administrator/components/com_hikashop/classes/currency.php

Just behind the if($discount_before_tax)replace this line:
Code:

$discount-&gt;discount_percent_amount_calculated = $price-&gt;price_value_with_tax*$discount-&gt;discount_percent_amount_calculated_without_tax/$price-&gt;price_value;

by this line:
Code:

$discount-&gt;discount_percent_amount_calculated = $price-&gt;price_value_with_tax*$discount-&gt;discount_percent_amount_calculated_without_tax/$price-&gt;price_value_with_tax;

And it should works ![:)](/media/kunena/emoticons/8.png ":)")

Last edit: 14 years 2 months ago by [Eliot](/forum/user/1824-eliot "View Eliot's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUzNTAyLWRpZmZlcmVuY2UtZnJvbS1pbnZvaWNlLWFuZC1jYXJ0LXZhbHVlLXdpdGgtY291cG9uP3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.117 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
