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

#   Re: Round Pb with a discount

##

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

Less More

- Posts: 190
- Thank you received: 0
-
-

14 years 9 months ago -  14 years 9 months ago [\#37204](#37204) by [codewarrior](/forum/user/4710-codewarrior "View codewarrior's Profile")  *[Re: Round Pb with a discount](/forum/4-how-to/37204-re-round-pb-with-a-discount#37204 "Bonjour, j'ai mis à jour en version 1.5.6 Le résultat est le suivant dans le front-end  et pour la configuration :  NB : si je change la config en Apply Discount=After Taxes, l'affichage est correct. Dites-moi si je vous ai communiqué suffisamment d'informations de paramétrage.  Cordialement")* was created by *[codewarrior](/forum/user/4710-codewarrior "View codewarrior's Profile")*

Bonjour,
j'ai mis à jour en version 1.5.6
Le résultat est le suivant dans le front-end
[ ![Frontend.PNG](/forum/attachment/2526) ](/forum/attachment/2526 "Frontend.PNG")

et pour la configuration :
[ ![Config1.PNG](/forum/attachment/2524) ](/forum/attachment/2524 "Config1.PNG")

[ ![Discount.PNG](/forum/attachment/2525) ](/forum/attachment/2525 "Discount.PNG")

[ ![Produit.PNG](/forum/attachment/2527) ](/forum/attachment/2527 "Produit.PNG")

[ ![Tax.PNG](/forum/attachment/2528) ](/forum/attachment/2528 "Tax.PNG")

NB : si je change la config en Apply Discount=After Taxes, l'affichage est correct.
Dites-moi si je vous ai communiqué suffisamment d'informations de paramétrage.

Cordialement

- [ ![Config1.PNG](/forum/attachment/2524) ](/forum/attachment/2524 "Config1.PNG") [ ](/forum/attachment/2524?download=1 "Config1.PNG")
- [ ![Discount.PNG](/forum/attachment/2525) ](/forum/attachment/2525 "Discount.PNG") [ ](/forum/attachment/2525?download=1 "Discount.PNG")
- [ ![Frontend.PNG](/forum/attachment/2526) ](/forum/attachment/2526 "Frontend.PNG") [ ](/forum/attachment/2526?download=1 "Frontend.PNG")
- [ ![Produit.PNG](/forum/attachment/2527) ](/forum/attachment/2527 "Produit.PNG") [ ](/forum/attachment/2527?download=1 "Produit.PNG")
- [ ![Tax.PNG](/forum/attachment/2528) ](/forum/attachment/2528 "Tax.PNG") [ ](/forum/attachment/2528?download=1 "Tax.PNG")

Last edit: 14 years 9 months ago by [codewarrior](/forum/user/4710-codewarrior "View codewarrior's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzM3MjA0LXJlLXJvdW5kLXBiLXdpdGgtYS1kaXNjb3VudD90bXBsPW1hcmtkb3du) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86586
- Thank you received: 14325
-
-

14 years 9 months ago [\#37342](#37342) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Round Pb with a discount](/forum/4-how-to/37204-re-round-pb-with-a-discount#37342 "Bonjour, j'ai mis à jour en version 1.5.6 Le résultat est le suivant dans le front-end  et pour la configuration :  NB : si je change la config en Apply Discount=After Taxes, l'affichage est correct. Dites-moi si je vous ai communiqué suffisamment d'informations de paramétrage.  Cordialement")*

En effet, quand les taxes sont calculées avant les réductions il n'y a pas de problème.

Pourriez vous changer les lignes:
$round = $this-&gt;getRounding(@$price-&gt;price_currency_id);

en:
$round = 5;

dans la fonction addDiscount du fichier administrator/components/com_hikashop/classes/currency.php et réessayer ?

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

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

Less More

- Posts: 190
- Thank you received: 0
-
-

14 years 9 months ago [\#37484](#37484) by [codewarrior](/forum/user/4710-codewarrior "View codewarrior's Profile")  Replied by *[codewarrior](/forum/user/4710-codewarrior "View codewarrior's Profile")* on topic *[Re: Round Pb with a discount](/forum/4-how-to/37204-re-round-pb-with-a-discount#37484 "Bonjour, j'ai mis à jour en version 1.5.6 Le résultat est le suivant dans le front-end  et pour la configuration :  NB : si je change la config en Apply Discount=After Taxes, l'affichage est correct. Dites-moi si je vous ai communiqué suffisamment d'informations de paramétrage.  Cordialement")*

Cela résout en effet le pb.

Cela donnera t'il lieu à une correction dans la prochaine version, ou faudra t'il refaire la manip ?
Cordialement

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzM3MjA0LXJlLXJvdW5kLXBiLXdpdGgtYS1kaXNjb3VudD90bXBsPW1hcmtkb3du) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86586
- Thank you received: 14325
-
-

14 years 9 months ago [\#37583](#37583) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Round Pb with a discount](/forum/4-how-to/37204-re-round-pb-with-a-discount#37583 "Bonjour, j'ai mis à jour en version 1.5.6 Le résultat est le suivant dans le front-end  et pour la configuration :  NB : si je change la config en Apply Discount=After Taxes, l'affichage est correct. Dites-moi si je vous ai communiqué suffisamment d'informations de paramétrage.  Cordialement")*

Je ne vois pas de problème à faire cette modification donc ce sera inclu.

The following user(s) said Thank You: [codewarrior](/forum/user/4710-codewarrior "View codewarrior's Profile")

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

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

Less More

- Posts: 190
- Thank you received: 0
-
-

14 years 9 months ago [\#37621](#37621) by [codewarrior](/forum/user/4710-codewarrior "View codewarrior's Profile")  Replied by *[codewarrior](/forum/user/4710-codewarrior "View codewarrior's Profile")* on topic *[Re: Round Pb with a discount](/forum/4-how-to/37204-re-round-pb-with-a-discount#37621 "Bonjour, j'ai mis à jour en version 1.5.6 Le résultat est le suivant dans le front-end  et pour la configuration :  NB : si je change la config en Apply Discount=After Taxes, l'affichage est correct. Dites-moi si je vous ai communiqué suffisamment d'informations de paramétrage.  Cordialement")*

Merci beaucoup.

Je sais bien que cette autre question n'est pas technique, mais pour la France, faut-il appliquer la réduction avant ou après les taxes ?
Merci

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzM3MjA0LXJlLXJvdW5kLXBiLXdpdGgtYS1kaXNjb3VudD90bXBsPW1hcmtkb3du) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86586
- Thank you received: 14325
-
-

14 years 9 months ago [\#37622](#37622) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Round Pb with a discount](/forum/4-how-to/37204-re-round-pb-with-a-discount#37622 "Bonjour, j'ai mis à jour en version 1.5.6 Le résultat est le suivant dans le front-end  et pour la configuration :  NB : si je change la config en Apply Discount=After Taxes, l'affichage est correct. Dites-moi si je vous ai communiqué suffisamment d'informations de paramétrage.  Cordialement")*

Nous l'appliquons avant de notre coté mais le mieux est de demander à votre comptable.

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

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

Less More

- Posts: 190
- Thank you received: 0
-
-

14 years 3 months ago -  14 years 3 months ago [\#61937](#61937) by [codewarrior](/forum/user/4710-codewarrior "View codewarrior's Profile")  Replied by *[codewarrior](/forum/user/4710-codewarrior "View codewarrior's Profile")* on topic *[Re: Round Pb with a discount](/forum/4-how-to/37204-re-round-pb-with-a-discount#61937 "Bonjour, j'ai mis à jour en version 1.5.6 Le résultat est le suivant dans le front-end  et pour la configuration :  NB : si je change la config en Apply Discount=After Taxes, l'affichage est correct. Dites-moi si je vous ai communiqué suffisamment d'informations de paramétrage.  Cordialement")*

Bonjour Nicolas,
j'ai à nouveau ce problème d'arrondi depuis le passage à la version 1.5.9
Prix HT : 32.00669
Prix TTC : 38.28
Discount : 29.46%
Prix TTC final : 27.00 dans l'affichage du produit ==&gt; OK

Une fois dans le Caddy, j'obtiens les prix corrects, sauf pour le TOTAL TTC = 27.01

[ ![Capture&#95;2012-08-24.PNG](/forum/attachment/5349) ](/forum/attachment/5349 "...2012-08-24.PNG")

Vous m'aviez fait modifier la vue Checkout / Cart ainsi pour afficher le prix TOTAL TTC :
&lt;td class="hikashop_cart_product_price_value"&gt;
&lt;?php
$this-&gt;params-&gt;set('price_with_tax',1);
$this-&gt;row=&amp;$row;
$this-&gt;unit=true;
echo $this-&gt;loadTemplate();
?&gt;
&lt;span class="hikashop_product_price_before_discount"&gt;
&lt;?php
$LBprice = $this-&gt;currencyHelper-&gt;format($row-&gt;prices[0]-&gt;price_value_without_discount_with_tax/$row-&gt;cart_product_quantity,$row-&gt;prices[0]-&gt;price_currency_id);
if (!$LBprice) {echo $LBprice; }
?&gt;
&lt;/ span&gt;
&lt;/td&gt;

PS : pour 2 articles, le prix Total TTC passe à 54.02€

Par avance merci de votre aide, pour corriger :
1) le problème d'arrondi
2) l'affichage de la TVA (négative et valeur incorrecte)

Cordialement

- [ ![Capture&#95;2012-08-24.PNG](/forum/attachment/5349) ](/forum/attachment/5349 "...2012-08-24.PNG") [ ](/forum/attachment/5349?download=1 "...2012-08-24.PNG")

Last edit: 14 years 3 months ago by [codewarrior](/forum/user/4710-codewarrior "View codewarrior's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzM3MjA0LXJlLXJvdW5kLXBiLXdpdGgtYS1kaXNjb3VudD90bXBsPW1hcmtkb3du) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86586
- Thank you received: 14325
-
-

14 years 3 months ago [\#62048](#62048) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Round Pb with a discount](/forum/4-how-to/37204-re-round-pb-with-a-discount#62048 "Bonjour, j'ai mis à jour en version 1.5.6 Le résultat est le suivant dans le front-end  et pour la configuration :  NB : si je change la config en Apply Discount=After Taxes, l'affichage est correct. Dites-moi si je vous ai communiqué suffisamment d'informations de paramétrage.  Cordialement")*

Bonjour,

Nous avons pu reproduire le problème de notre coté. Nous allons voir pour corriger cela en début de semaine.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzM3MjA0LXJlLXJvdW5kLXBiLXdpdGgtYS1kaXNjb3VudD90bXBsPW1hcmtkb3du) 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 3 months ago [\#62226](#62226) by [Eliot](/forum/user/1824-eliot "View Eliot's Profile")  Replied by *[Eliot](/forum/user/1824-eliot "View Eliot's Profile")* on topic *[Re: Round Pb with a discount](/forum/4-how-to/37204-re-round-pb-with-a-discount#62226 "Bonjour, j'ai mis à jour en version 1.5.6 Le résultat est le suivant dans le front-end  et pour la configuration :  NB : si je change la config en Apply Discount=After Taxes, l'affichage est correct. Dites-moi si je vous ai communiqué suffisamment d'informations de paramétrage.  Cordialement")*

Bonjour,

Après reproduction du bug nous avons résolut le problème.
Pour le corriger, remplacer le fichier currency.php dans administrator\components\com_hikashop\classes par celui ci-dessous.
Nous sommes encore en train de tester cette modification mais cela devrait résoudre votre soucis.

####  Attachment not found

The following user(s) said Thank You: [codewarrior](/forum/user/4710-codewarrior "View codewarrior's Profile")

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

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

Less More

- Posts: 190
- Thank you received: 0
-
-

14 years 2 months ago -  14 years 2 months ago [\#63835](#63835) by [codewarrior](/forum/user/4710-codewarrior "View codewarrior's Profile")  Replied by *[codewarrior](/forum/user/4710-codewarrior "View codewarrior's Profile")* on topic *[Re: Round Pb with a discount](/forum/4-how-to/37204-re-round-pb-with-a-discount#63835 "Bonjour, j'ai mis à jour en version 1.5.6 Le résultat est le suivant dans le front-end  et pour la configuration :  NB : si je change la config en Apply Discount=After Taxes, l'affichage est correct. Dites-moi si je vous ai communiqué suffisamment d'informations de paramétrage.  Cordialement")*

Problème d'arrondi résolu avec maj 1.6.0
Merci

Mais pouvez-vous m'aider avec l'affichage de la TVA qui est comme vous pouvez le voir sur l'image, à -1.96€ quel que soit le Total TTC

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzM3MjA0LXJlLXJvdW5kLXBiLXdpdGgtYS1kaXNjb3VudD90bXBsPW1hcmtkb3du) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86586
- Thank you received: 14325
-
-

14 years 2 months ago [\#63982](#63982) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Round Pb with a discount](/forum/4-how-to/37204-re-round-pb-with-a-discount#63982 "Bonjour, j'ai mis à jour en version 1.5.6 Le résultat est le suivant dans le front-end  et pour la configuration :  NB : si je change la config en Apply Discount=After Taxes, l'affichage est correct. Dites-moi si je vous ai communiqué suffisamment d'informations de paramétrage.  Cordialement")*

Il n'y a pas d'image dans votre message ?

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

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

Less More

- Posts: 190
- Thank you received: 0
-
-

14 years 2 months ago -  14 years 2 months ago [\#63988](#63988) by [codewarrior](/forum/user/4710-codewarrior "View codewarrior's Profile")  Replied by *[codewarrior](/forum/user/4710-codewarrior "View codewarrior's Profile")* on topic *[Re: Round Pb with a discount](/forum/4-how-to/37204-re-round-pb-with-a-discount#63988 "Bonjour, j'ai mis à jour en version 1.5.6 Le résultat est le suivant dans le front-end  et pour la configuration :  NB : si je change la config en Apply Discount=After Taxes, l'affichage est correct. Dites-moi si je vous ai communiqué suffisamment d'informations de paramétrage.  Cordialement")*

je faisais référence à l'image 5 posts plus hauts.
La TVA apparait à la saisie du coupon.

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzM3MjA0LXJlLXJvdW5kLXBiLXdpdGgtYS1kaXNjb3VudD90bXBsPW1hcmtkb3du) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86586
- Thank you received: 14325
-
-

14 years 2 months ago [\#64172](#64172) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Round Pb with a discount](/forum/4-how-to/37204-re-round-pb-with-a-discount#64172 "Bonjour, j'ai mis à jour en version 1.5.6 Le résultat est le suivant dans le front-end  et pour la configuration :  NB : si je change la config en Apply Discount=After Taxes, l'affichage est correct. Dites-moi si je vous ai communiqué suffisamment d'informations de paramétrage.  Cordialement")*

La TVA devrait apparaitre sans coupon et être positive. Je n'ai pas souvenir de quelqu'un ayant une TVA négative.
Pourriez vous fournir un accès au back end pour que nous regardions cela ?

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

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

Less More

- Posts: 190
- Thank you received: 0
-
-

14 years 2 months ago [\#64988](#64988) by [codewarrior](/forum/user/4710-codewarrior "View codewarrior's Profile")  Replied by *[codewarrior](/forum/user/4710-codewarrior "View codewarrior's Profile")* on topic *[Re: Round Pb with a discount](/forum/4-how-to/37204-re-round-pb-with-a-discount#64988 "Bonjour, j'ai mis à jour en version 1.5.6 Le résultat est le suivant dans le front-end  et pour la configuration :  NB : si je change la config en Apply Discount=After Taxes, l'affichage est correct. Dites-moi si je vous ai communiqué suffisamment d'informations de paramétrage.  Cordialement")*

Je vous ai envoyé un PM il y a quelques jours. Par avance merci

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzM3MjA0LXJlLXJvdW5kLXBiLXdpdGgtYS1kaXNjb3VudD90bXBsPW1hcmtkb3du) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86586
- Thank you received: 14325
-
-

14 years 2 months ago [\#65170](#65170) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Round Pb with a discount](/forum/4-how-to/37204-re-round-pb-with-a-discount#65170 "Bonjour, j'ai mis à jour en version 1.5.6 Le résultat est le suivant dans le front-end  et pour la configuration :  NB : si je change la config en Apply Discount=After Taxes, l'affichage est correct. Dites-moi si je vous ai communiqué suffisamment d'informations de paramétrage.  Cordialement")*

Nous avons trouvé le problème.

Remplacez voir le code:
$coupon2-&gt;total-&gt;prices[0]-&gt;price_value_with_tax = $totalnondiscount_with_tax;
$coupon2-&gt;total-&gt;prices[0]-&gt;price_value = $totalnondiscount;
$currency-&gt;addCoupon($coupon2-&gt;total,$coupon2);

par:
if($coupon2-&gt;discount_flat_amount&gt;$totalnondiscount_with_tax){
$coupon2-&gt;discount_flat_amount=0;
}
$total = null;
$obj=null;
$total-&gt;prices = array($obj);
$total-&gt;prices[0]-&gt;price_value_with_tax = $totalnondiscount_with_tax;
$total-&gt;prices[0]-&gt;price_value = $totalnondiscount;
$currency-&gt;addCoupon($total,$coupon2);

dans le fichier administrator/components/com_hikashop/classes/discount.php

Cela résoud le problème de notre coté.

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

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

Less More

- Posts: 190
- Thank you received: 0
-
-

14 years 2 months ago [\#66728](#66728) by [codewarrior](/forum/user/4710-codewarrior "View codewarrior's Profile")  Replied by *[codewarrior](/forum/user/4710-codewarrior "View codewarrior's Profile")* on topic *[Re: Round Pb with a discount](/forum/4-how-to/37204-re-round-pb-with-a-discount#66728 "Bonjour, j'ai mis à jour en version 1.5.6 Le résultat est le suivant dans le front-end  et pour la configuration :  NB : si je change la config en Apply Discount=After Taxes, l'affichage est correct. Dites-moi si je vous ai communiqué suffisamment d'informations de paramétrage.  Cordialement")*

Nicolas,
I'm sorry, but I have product at 79€ ttc and a coupon of 10€ ttc
with your modification I have the following displays :
1) with no coupon

####  Attachment Capture1.PNG not found

2) with the 10€ coupon

####  Attachment Capture2.PNG not found

Obviously, coupon, VAT and Total (should be 69€) are all false !

-
-

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzM3MjA0LXJlLXJvdW5kLXBiLXdpdGgtYS1kaXNjb3VudD90bXBsPW1hcmtkb3du) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86586
- Thank you received: 14325
-
-

14 years 2 months ago [\#67005](#67005) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Round Pb with a discount](/forum/4-how-to/37204-re-round-pb-with-a-discount#67005 "Bonjour, j'ai mis à jour en version 1.5.6 Le résultat est le suivant dans le front-end  et pour la configuration :  NB : si je change la config en Apply Discount=After Taxes, l'affichage est correct. Dites-moi si je vous ai communiqué suffisamment d'informations de paramétrage.  Cordialement")*

You should just not apply any tax category on your coupon and everything would be correct

- [ ![Catalogue.png](/forum/attachment/5931) ](/forum/attachment/5931 "Catalogue.png") [ ](/forum/attachment/5931?download=1 "Catalogue.png")

The following user(s) said Thank You: [codewarrior](/forum/user/4710-codewarrior "View codewarrior's Profile")

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

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

Less More

- Posts: 190
- Thank you received: 0
-
-

14 years 1 month ago [\#68097](#68097) by [codewarrior](/forum/user/4710-codewarrior "View codewarrior's Profile")  Replied by *[codewarrior](/forum/user/4710-codewarrior "View codewarrior's Profile")* on topic *[Re: Round Pb with a discount](/forum/4-how-to/37204-re-round-pb-with-a-discount#68097 "Bonjour, j'ai mis à jour en version 1.5.6 Le résultat est le suivant dans le front-end  et pour la configuration :  NB : si je change la config en Apply Discount=After Taxes, l'affichage est correct. Dites-moi si je vous ai communiqué suffisamment d'informations de paramétrage.  Cordialement")*

Thanks Nicolas, it works fine !

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzM3MjA0LXJlLXJvdW5kLXBiLXdpdGgtYS1kaXNjb3VudD90bXBsPW1hcmtkb3du) 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.140 seconds

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