Skip to content

New version for Canadian Taxes#73

Open
Fluotonic wants to merge 16 commits intocommerceguys:masterfrom
Fluotonic:master
Open

New version for Canadian Taxes#73
Fluotonic wants to merge 16 commits intocommerceguys:masterfrom
Fluotonic:master

Conversation

@Fluotonic
Copy link

Hey everyone,

I live in Canada and I had to work on something reliable for taxes here. I've seen a previous work (4 years ago) that had been left as is. The base was already good but a few errors were left in zones and tax types. I've done some cleanup and now it works well in my app.

The resolver was also not taking into account the fact that, in Canada, you can't charge provincial taxes to a client in another province if your business is not registered there. Why? Simply because you could not remit your collected tax to the government at the end of you exercise (your need your tax numbers for that).

The new logic now takes care of this, as well as making sure Federal taxes are always applied inside Canada.

Please let me know if anything is missing. If all is good, feel free to merge this with the master branch.

Thanks!

Based on https://github.com/monosolutions/tax/tree/CanadianTaxes.

* Fixed errors in zone files:
- administrative-area whould only have the proince letters
- errors in generic names (ex. BC is not on HST, but has its own provincial tax)

* Fixed errors in tax types:
- outdated values were updated (using this official page as a reference: https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/gst-hst-businesses/charge-collect-which-rate/calculator.html)
- generic labels were fixed to display real spellings (ex. PST in Manitoba is called RST)
* If Store and Client are based in different provinces, provincial tax can only be collected by Store if it's registered in Client's province.

* GST and HST can (and have to) be collected everytime by Store from Client in Canada.
@bojanz bojanz mentioned this pull request Jan 13, 2020
@bojanz
Copy link
Contributor

bojanz commented Jan 13, 2020

Closed #31 in favor of this one.

@Archanium
Copy link
Contributor

Looks great IMO @Fluotonic. I didn't have that much knowledge about the Canadian tax system when I made #31 :)

@Fluotonic
Copy link
Author

Hey @Archanium ! Yeah, taxes are a real challenge, honestly... Your work was really helpful anyway so thank you for that :-)

@bojanz
Copy link
Contributor

bojanz commented Jan 27, 2020

@Fluotonic You need to rebase your branch, you can't just recommit changes like you did in 6dc30f9

Also, you can't specify a version in composer.json, the maintainer decides when to tag a release and how to number it, it has no relation to what's in the files.

@Fluotonic
Copy link
Author

Hey @bojanz, sorry about the version number. That was intended for my other branch only but I've still to learn more about how Git works ;-)

I tried to rebase the master as you aksed me to. Can you let me know if it worked?

Thanks!

@Fluotonic
Copy link
Author

I also just fixed the conflicts that were mentioned here. I hope all is good now :-)

@Fluotonic
Copy link
Author

Hi @bojanz! I'm diving back into the "tax world" for a project and I just stumbled upon this very old pull request I left at the time...

Honestly, I've no idea if the last change I just made to remove conflicts can make a difference for the pull request. But just in case it works, this would be good for your package, I guess.

My knowledge about Git is still fairly limited, so bear with me ;-)

Anyway, feel free to let me know if I can help.

Cheers!

@dmnc dmnc mentioned this pull request Feb 24, 2025
composer.json Outdated
@@ -1,5 +1,6 @@
{
"name": "commerceguys/tax",
"version": "0.8.1",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the hard version number. This will be determined by the tag name in GitHub

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please indent with tabs as per PSR-12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants