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

#   Nouveau release

##

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

Less More

- Posts: 78
- Thank you received: 5
-
-

13 years 8 months ago -  13 years 8 months ago [\#94894](#94894) by [doyen](/forum/user/9407-doyen "View doyen's Profile")  *[Nouveau release](/forum/5-support-en-francais-french-support-/79389-nouveau-release#94894 "Bonjour  Le prochain release de Hikashop aura un fix pour les taxes du Quebec ( pour les réductions et coupons)  Awocoupon aussi au prochain Release aura ce fix pour l'instant si vous utiliser Awocoupon vous pouvez le faire manuellement avec ce code  www/administrator/components/com&#95;awocoupon/helpers/estore/hikashop/couponhandler.php, around line 210 is this code:  if(!empty($object-&gt;total-&gt;prices&#91;0&#93;-&gt;taxes)) { $object-&gt;total-&gt;prices&#91;0&#93;-&gt;taxes&#95;without&#95;discount = array(); foreach($object-&gt;total-&gt;prices&#91;0&#93;-&gt;taxes as $namekey =&gt; $tax){ $object-&gt;total-&gt;prices&#91;0&#93;-&gt;taxes&#95;without&#95;discount&#91;$namekey&#93; = clone($tax); }  $coupon&#95;tax&#95;amount = $coupon&#95;session+$coupon&#95;session; if(!empty($coupon&#95;tax&#95;amount)) { $tax = reset($object-&gt;total-&gt;prices&#91;0&#93;-&gt;taxes); $object-&gt;total-&gt;prices&#91;0&#93;-&gt;taxes&#91;$tax-&gt;tax&#95;namekey&#93;-&gt;tax&#95;amount -= $coupon&#95;tax&#95;amount;  $object-&gt;taxes&#91;0&#93;-&gt;tax&#95;namekey = $tax-&gt;tax&#95;namekey; $object-&gt;taxes&#91;0&#93;-&gt;tax&#95;amount = $coupon&#95;tax&#95;amount; } }  Please change it to this:  if(!empty($object-&gt;total-&gt;prices&#91;0&#93;-&gt;taxes)) { $object-&gt;total-&gt;prices&#91;0&#93;-&gt;taxes&#95;without&#95;discount = array(); $coupon&#95;tax&#95;amount = $coupon&#95;session+$coupon&#95;session; $total&#95;tax&#95;before&#95;discount = 0; foreach($object-&gt;total-&gt;prices&#91;0&#93;-&gt;taxes as $namekey =&gt; $tax){ $total&#95;tax&#95;before&#95;discount += $tax-&gt;tax&#95;amount; }  foreach($object-&gt;total-&gt;prices&#91;0&#93;-&gt;taxes as $namekey =&gt; $tax){ $object-&gt;total-&gt;prices&#91;0&#93;-&gt;taxes&#95;without&#95;discount&#91;$namekey&#93; = clone($tax);  $current&#95;tax = $object-&gt;total-&gt;prices&#91;0&#93;-&gt;taxes&#91;$namekey&#93;-&gt;tax&#95;amount; $object-&gt;total-&gt;prices&#91;0&#93;-&gt;taxes&#91;$namekey&#93;-&gt;tax&#95;amount = empty($total&#95;tax&#95;before&#95;discount) ? 0 : round( $current&#95;tax - ($coupon&#95;tax&#95;amount/$total&#95;tax&#95;before&#95;discount&#42;$current&#95;tax),2); }  if(!empty($coupon&#95;tax&#95;amount)) { $tax = reset($object-&gt;total-&gt;prices&#91;0&#93;-&gt;taxes); //$object-&gt;total-&gt;prices&#91;0&#93;-&gt;taxes&#91;$tax-&gt;tax&#95;namekey&#93;-&gt;tax&#95;amount -= $coupon&#95;tax&#95;amount;  $object-&gt;taxes&#91;0&#93;-&gt;tax&#95;namekey = $tax-&gt;tax&#95;namekey; $object-&gt;taxes&#91;0&#93;-&gt;tax&#95;amount = $coupon&#95;tax&#95;amount; } }  en espérant que cela peut vous aider  Merci")* was created by *[doyen](/forum/user/9407-doyen "View doyen's Profile")*

Bonjour

Le prochain release de Hikashop aura un fix pour les taxes du Quebec ( pour les réductions et coupons)

Awocoupon aussi au prochain Release aura ce fix pour l'instant si vous utiliser Awocoupon vous pouvez le faire manuellement avec ce code

www/administrator/components/com_awocoupon/helpers/estore/hikashop/couponhandler.php, around line 210 is this code:

if(!empty($object-&gt;total-&gt;prices[0]-&gt;taxes)) {
$object-&gt;total-&gt;prices[0]-&gt;taxes_without_discount = array();
foreach($object-&gt;total-&gt;prices[0]-&gt;taxes as $namekey =&gt; $tax){ $object-&gt;total-&gt;prices[0]-&gt;taxes_without_discount[$namekey] = clone($tax); }

$coupon_tax_amount = $coupon_session+$coupon_session;
if(!empty($coupon_tax_amount)) {
$tax = reset($object-&gt;total-&gt;prices[0]-&gt;taxes);
$object-&gt;total-&gt;prices[0]-&gt;taxes[$tax-&gt;tax_namekey]-&gt;tax_amount -= $coupon_tax_amount;

$object-&gt;taxes[0]-&gt;tax_namekey = $tax-&gt;tax_namekey;
$object-&gt;taxes[0]-&gt;tax_amount = $coupon_tax_amount;
}
}

Please change it to this:

if(!empty($object-&gt;total-&gt;prices[0]-&gt;taxes)) {
$object-&gt;total-&gt;prices[0]-&gt;taxes_without_discount = array();
$coupon_tax_amount = $coupon_session+$coupon_session;
$total_tax_before_discount = 0;
foreach($object-&gt;total-&gt;prices[0]-&gt;taxes as $namekey =&gt; $tax){ $total_tax_before_discount += $tax-&gt;tax_amount; }

foreach($object-&gt;total-&gt;prices[0]-&gt;taxes as $namekey =&gt; $tax){
$object-&gt;total-&gt;prices[0]-&gt;taxes_without_discount[$namekey] = clone($tax);

$current_tax = $object-&gt;total-&gt;prices[0]-&gt;taxes[$namekey]-&gt;tax_amount;
$object-&gt;total-&gt;prices[0]-&gt;taxes[$namekey]-&gt;tax_amount = empty($total_tax_before_discount) ? 0 : round( $current_tax - ($coupon_tax_amount/$total_tax_before_discount*$current_tax),2);
}

if(!empty($coupon_tax_amount)) {
$tax = reset($object-&gt;total-&gt;prices[0]-&gt;taxes);
//$object-&gt;total-&gt;prices[0]-&gt;taxes[$tax-&gt;tax_namekey]-&gt;tax_amount -= $coupon_tax_amount;

$object-&gt;taxes[0]-&gt;tax_namekey = $tax-&gt;tax_namekey;
$object-&gt;taxes[0]-&gt;tax_amount = $coupon_tax_amount;
}
}

en espérant que cela peut vous aider

Merci

Last edit: 13 years 8 months ago by [doyen](/forum/user/9407-doyen "View doyen's Profile").

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

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

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