Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 2 of 3
Show 2 taxes with Priority 1 (2013 Canadian taxes update)
 
RedRave
Jr. Member
 
Total Posts:  10
Joined:  2012-10-14
 

...

 
Magento Community Magento Community
Magento Community
Magento Community
 
MortomerSn
Jr. Member
 
Total Posts:  10
Joined:  2012-03-08
 

when you write this -

$this->escapeHtml($info[’title’]) == ‘QST’)

make sure that ‘QST’ corresponds to your definition of tax in tax setup screens in admin.

I promise to send you full code with explanation this week.

 
Magento Community Magento Community
Magento Community
Magento Community
 
RedRave
Jr. Member
 
Total Posts:  10
Joined:  2012-10-14
 

Fixed! I had for some a reason a blank space in my QST description........../$%/?%?$%?&!!

Thanks for the hint…

 
Magento Community Magento Community
Magento Community
Magento Community
 
srmobile
Sr. Member
 
Total Posts:  276
Joined:  2011-10-25
 
lmcbmai - 12 January 2013 06:27 PM

UPDATE:

Here is how to apply the hack with less changes to the original code. This also fixes the tax label appearance in Admin area.

Files to be modified:

/app/design/adminhtml/default/default/template/sales/order/totals/tax.phtml
/app/design/adminhtml/default/default/template/sales/order/create/totals/tax.phtml
/app/design/frontend/base/default/template/checkout/total/tax.phtml
/app/design/frontend/base/default/template/tax/checkout/tax.phtml
/app/design/frontend/base/default/template/tax/order/tax.phtml
/app/design/frontend/default/iphone/template/tax/order/tax.phtml

1. In file /app/design/adminhtml/default/default/template/sales/order/totals/tax.phtml around line 76 find the line that ends with
(<?php echo (float)$info['percent']?>%)<br /></td>
Insert the following code right above this line:
<?php if ($this->escapeHtml($info['title']) == 'QST'$info['percent'9.975;  //  QST fix ?>

2. In all other files listed above around line 40 or line 50 find the line containing:
(<?php echo (float)$rate['percent']?>%)
Insert the following code right above this line:
<?php if ($this->escapeHtml($rate['title']) == 'QST'$rate['percent'9.975;  //  QST fix ?>


Don’t forget to backup original files before doing these changes.
Please let us know if this worked for you.

Tried this and it doesn’t work. V 1.7.0.0

Why is it that RedRave has \ between quotes and the above does not?  Example: Above ‘QST’ RedRave \’QST\’

Does this make a difference?

Has anyone figured out an easier way than to modify all these files?

Thanks,

SR

 
Magento Community Magento Community
Magento Community
Magento Community
 
HyperBallad
Member
 
Avatar
Total Posts:  57
Joined:  2008-06-27
Montreal, QC
 

For me these fixes only work for the back-end but have no effects on the PDF invoice or front-end.

 
Magento Community Magento Community
Magento Community
Magento Community
 
srmobile
Sr. Member
 
Total Posts:  276
Joined:  2011-10-25
 

Upgraded to 1.7.0.2 and same result, modified the files exactly as stated but yet there still is no break down.

Any help would be greatly appreciated!

Thanks,

SR

 
Magento Community Magento Community
Magento Community
Magento Community
 
MortomerSn
Jr. Member
 
Total Posts:  10
Joined:  2012-03-08
 

Why is it that RedRave has \ between quotes and the above does not?  Example: Above ‘QST’ RedRave \’QST\’

Because quotes can mean different things in php, slashes is added before quotes to indicate that user really meant a human readable quotation mark.  Some discussion forum software gets confused and over-slashes when presenting text to user. Just ignore slashes in this case,

Email me and i will send you my complete fix (hack)

Mortimer

 
Magento Community Magento Community
Magento Community
Magento Community
 
papaweb
Jr. Member
 
Total Posts:  5
Joined:  2013-01-21
 

Hi

Anybody found a way to correct the pdf invoice.
The pdf invoice show 9.6% in place of 9.975%

Thank you

 
Magento Community Magento Community
Magento Community
Magento Community
 
srmobile
Sr. Member
 
Total Posts:  276
Joined:  2011-10-25
 

I’ve gone through this close to a dozen times now and just can’t get this to work. 

Can someone provide me with a file and perhaps even the way the tax setup is done in the admin panel?

I’ve cleared my cache, locks and session directories, template, everything I can basically think of that would affect this and still no change.

Thanks

SR

 
Magento Community Magento Community
Magento Community
Magento Community
 
srmobile
Sr. Member
 
Total Posts:  276
Joined:  2011-10-25
 

Got it to work!

THANK YOU TO MARTIN AND BORIS for clearing this up.

I was keeping the PST and GST at the same priority.

SR

 
Magento Community Magento Community
Magento Community
Magento Community
 
lmcbmai
Jr. Member
 
Total Posts:  6
Joined:  2012-11-04
 

Hi everyone,

Here is how to patch Invoice PDF:
- Create backup copy of the file /app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php
- Modify this file; find the function insertTotals (around line 577)
- In this function find the line

'text'      => $totalData['label'],
and replace it with
'text'      => str_replace('QST (9.5000%)''QST (9.9750%)'$totalData['label']),

That’s it!

If you are like me and hate those extra zeros

GST (5.0000%):

you can replace the original string with this
'text'      => str_replace('(5.0000%)''(5.00%)',str_replace('QST (9.5000%)''QST (9.975%)'$totalData['label'])),

If there is any other place that needs to be corrected, please let me know.

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
papaweb
Jr. Member
 
Total Posts:  5
Joined:  2013-01-21
 

Thank you its working with the pdf !

The last thing, is it possible to ventilate taxes on the invoice that receive the client by email ?
There is only the total for both taxes.

Thank you

 
Magento Community Magento Community
Magento Community
Magento Community
 
lmcbmai
Jr. Member
 
Total Posts:  6
Joined:  2012-11-04
 

E-mail Invoice showing single tax line is a separate issue. It is not related to the workaround I suggested here.

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
flyingmonk
Jr. Member
 
Total Posts:  3
Joined:  2013-02-11
 

This fix was AMAZING for Quebec tax problem. Thank you sooo much for the help on that.

But there is still the problem with Saskatchewan and Manitoba.  does anyone know how to Show 2 taxes with Priority 1??

Any help would be really appreciated.

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
lmcbmai
Jr. Member
 
Total Posts:  6
Joined:  2012-11-04
 

You should be able to use the same approach; just calculate correct multipliers for Saskatchewan and for Manitoba. However, if you have one web site with stores located in different provinces, you will need to further modify the hack to show correct labels next to each provincial tax.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 2 of 3