From 7f0fffe24e76a2202e96cf5a0872f2bc900b5fce Mon Sep 17 00:00:00 2001 From: Thomas Faurbye Nielsen Date: Thu, 5 Nov 2015 16:53:58 +0100 Subject: [PATCH 1/7] Add Canadian taxes --- resources/tax_type/ca_ab_vat.json | 21 +++++++++++++++++++++ resources/tax_type/ca_bc_vat.json | 21 +++++++++++++++++++++ resources/tax_type/ca_mb_vat.json | 21 +++++++++++++++++++++ resources/tax_type/ca_nb_vat.json | 21 +++++++++++++++++++++ resources/tax_type/ca_nl_vat.json | 21 +++++++++++++++++++++ resources/tax_type/ca_ns_vat.json | 21 +++++++++++++++++++++ resources/tax_type/ca_nt_vat.json | 21 +++++++++++++++++++++ resources/tax_type/ca_nu_vat.json | 21 +++++++++++++++++++++ resources/tax_type/ca_on_vat.json | 21 +++++++++++++++++++++ resources/tax_type/ca_pe_vat.json | 21 +++++++++++++++++++++ resources/tax_type/ca_qc_vat.json | 21 +++++++++++++++++++++ resources/tax_type/ca_sk_vat.json | 21 +++++++++++++++++++++ resources/tax_type/ca_yt_vat.json | 21 +++++++++++++++++++++ resources/zone/ca_ab_vat.json | 13 +++++++++++++ resources/zone/ca_bc_vat.json | 13 +++++++++++++ resources/zone/ca_mb_vat.json | 13 +++++++++++++ resources/zone/ca_nb_vat.json | 13 +++++++++++++ resources/zone/ca_nl_vat.json | 13 +++++++++++++ resources/zone/ca_ns_vat.json | 13 +++++++++++++ resources/zone/ca_nt_vat.json | 13 +++++++++++++ resources/zone/ca_nu_vat.json | 13 +++++++++++++ resources/zone/ca_on_vat.json | 13 +++++++++++++ resources/zone/ca_pe_vat.json | 13 +++++++++++++ resources/zone/ca_qc_vat.json | 13 +++++++++++++ resources/zone/ca_sk_vat.json | 13 +++++++++++++ resources/zone/ca_yt_vat.json | 13 +++++++++++++ 26 files changed, 442 insertions(+) create mode 100644 resources/tax_type/ca_ab_vat.json create mode 100644 resources/tax_type/ca_bc_vat.json create mode 100644 resources/tax_type/ca_mb_vat.json create mode 100644 resources/tax_type/ca_nb_vat.json create mode 100644 resources/tax_type/ca_nl_vat.json create mode 100644 resources/tax_type/ca_ns_vat.json create mode 100644 resources/tax_type/ca_nt_vat.json create mode 100644 resources/tax_type/ca_nu_vat.json create mode 100644 resources/tax_type/ca_on_vat.json create mode 100644 resources/tax_type/ca_pe_vat.json create mode 100644 resources/tax_type/ca_qc_vat.json create mode 100644 resources/tax_type/ca_sk_vat.json create mode 100644 resources/tax_type/ca_yt_vat.json create mode 100644 resources/zone/ca_ab_vat.json create mode 100644 resources/zone/ca_bc_vat.json create mode 100644 resources/zone/ca_mb_vat.json create mode 100644 resources/zone/ca_nb_vat.json create mode 100644 resources/zone/ca_nl_vat.json create mode 100644 resources/zone/ca_ns_vat.json create mode 100644 resources/zone/ca_nt_vat.json create mode 100644 resources/zone/ca_nu_vat.json create mode 100644 resources/zone/ca_on_vat.json create mode 100644 resources/zone/ca_pe_vat.json create mode 100644 resources/zone/ca_qc_vat.json create mode 100644 resources/zone/ca_sk_vat.json create mode 100644 resources/zone/ca_yt_vat.json diff --git a/resources/tax_type/ca_ab_vat.json b/resources/tax_type/ca_ab_vat.json new file mode 100644 index 0000000..c6cf808 --- /dev/null +++ b/resources/tax_type/ca_ab_vat.json @@ -0,0 +1,21 @@ +{ + "name": "Canada - Alberta", + "generic_label": "GST", + "display_inclusive": true, + "zone": "ca_ab_vat", + "tag": "CA", + "rates": [ + { + "id": "ca_ab_vat_standard", + "name": "Standard", + "default": true, + "amounts": [ + { + "id": "ca_ab_vat_standard_2013", + "amount": 0.05, + "start_date": "2013-04-01" + } + ] + } + ] +} diff --git a/resources/tax_type/ca_bc_vat.json b/resources/tax_type/ca_bc_vat.json new file mode 100644 index 0000000..513d4b6 --- /dev/null +++ b/resources/tax_type/ca_bc_vat.json @@ -0,0 +1,21 @@ +{ + "name": "Canada - British Columbia", + "generic_label": "GST", + "display_inclusive": true, + "zone": "ca_bc_vat", + "tag": "CA", + "rates": [ + { + "id": "ca_bc_vat_standard", + "name": "Standard", + "default": true, + "amounts": [ + { + "id": "ca_bc_vat_standard_2013", + "amount": 0.05, + "start_date": "2013-04-01" + } + ] + } + ] +} diff --git a/resources/tax_type/ca_mb_vat.json b/resources/tax_type/ca_mb_vat.json new file mode 100644 index 0000000..b36017a --- /dev/null +++ b/resources/tax_type/ca_mb_vat.json @@ -0,0 +1,21 @@ +{ + "name": "Canada - Manitoba", + "generic_label": "GST", + "display_inclusive": true, + "zone": "ca_mb_vat", + "tag": "CA", + "rates": [ + { + "id": "ca_mb_vat_standard", + "name": "Standard", + "default": true, + "amounts": [ + { + "id": "ca_mb_vat_standard_2013", + "amount": 0.05, + "start_date": "2013-04-01" + } + ] + } + ] +} diff --git a/resources/tax_type/ca_nb_vat.json b/resources/tax_type/ca_nb_vat.json new file mode 100644 index 0000000..d688e23 --- /dev/null +++ b/resources/tax_type/ca_nb_vat.json @@ -0,0 +1,21 @@ +{ + "name": "Canada - New Brunswick", + "generic_label": "HST", + "display_inclusive": true, + "zone": "ca_nb_vat", + "tag": "CA", + "rates": [ + { + "id": "ca_nb_vat_standard", + "name": "Standard", + "default": true, + "amounts": [ + { + "id": "ca_nb_vat_standard_2013", + "amount": 0.13, + "start_date": "2013-04-01" + } + ] + } + ] +} diff --git a/resources/tax_type/ca_nl_vat.json b/resources/tax_type/ca_nl_vat.json new file mode 100644 index 0000000..73ad080 --- /dev/null +++ b/resources/tax_type/ca_nl_vat.json @@ -0,0 +1,21 @@ +{ + "name": "Canada - Newfoundland and Labrador", + "generic_label": "HST", + "display_inclusive": true, + "zone": "ca_nl_vat", + "tag": "CA", + "rates": [ + { + "id": "ca_nl_vat_standard", + "name": "Standard", + "default": true, + "amounts": [ + { + "id": "ca_nl_vat_standard_2013", + "amount": 0.13, + "start_date": "2013-04-01" + } + ] + } + ] +} diff --git a/resources/tax_type/ca_ns_vat.json b/resources/tax_type/ca_ns_vat.json new file mode 100644 index 0000000..3b8dd98 --- /dev/null +++ b/resources/tax_type/ca_ns_vat.json @@ -0,0 +1,21 @@ +{ + "name": "Canada - Nova Scotia", + "generic_label": "HST", + "display_inclusive": true, + "zone": "ca_ns_vat", + "tag": "CA", + "rates": [ + { + "id": "ca_ns_vat_standard", + "name": "Standard", + "default": true, + "amounts": [ + { + "id": "ca_ns_vat_standard_2013", + "amount": 0.15, + "start_date": "2013-04-01" + } + ] + } + ] +} diff --git a/resources/tax_type/ca_nt_vat.json b/resources/tax_type/ca_nt_vat.json new file mode 100644 index 0000000..965ce6c --- /dev/null +++ b/resources/tax_type/ca_nt_vat.json @@ -0,0 +1,21 @@ +{ + "name": "Canada - Northwest Territories", + "generic_label": "GST", + "display_inclusive": true, + "zone": "ca_nt_vat", + "tag": "CA", + "rates": [ + { + "id": "ca_nt_vat_standard", + "name": "Standard", + "default": true, + "amounts": [ + { + "id": "ca_nt_vat_standard_2013", + "amount": 0.05, + "start_date": "2013-04-01" + } + ] + } + ] +} diff --git a/resources/tax_type/ca_nu_vat.json b/resources/tax_type/ca_nu_vat.json new file mode 100644 index 0000000..b773616 --- /dev/null +++ b/resources/tax_type/ca_nu_vat.json @@ -0,0 +1,21 @@ +{ + "name": "Canada - Nunavut", + "generic_label": "GST", + "display_inclusive": true, + "zone": "ca_nu_vat", + "tag": "CA", + "rates": [ + { + "id": "ca_nu_vat_standard", + "name": "Standard", + "default": true, + "amounts": [ + { + "id": "ca_nu_vat_standard_2013", + "amount": 0.05, + "start_date": "2013-04-01" + } + ] + } + ] +} diff --git a/resources/tax_type/ca_on_vat.json b/resources/tax_type/ca_on_vat.json new file mode 100644 index 0000000..fffdb7a --- /dev/null +++ b/resources/tax_type/ca_on_vat.json @@ -0,0 +1,21 @@ +{ + "name": "Canada - Ontario", + "generic_label": "HST", + "display_inclusive": true, + "zone": "ca_on_vat", + "tag": "CA", + "rates": [ + { + "id": "ca_on_vat_standard", + "name": "Standard", + "default": true, + "amounts": [ + { + "id": "ca_on_vat_standard_2013", + "amount": 0.13, + "start_date": "2013-04-01" + } + ] + } + ] +} diff --git a/resources/tax_type/ca_pe_vat.json b/resources/tax_type/ca_pe_vat.json new file mode 100644 index 0000000..9cc5283 --- /dev/null +++ b/resources/tax_type/ca_pe_vat.json @@ -0,0 +1,21 @@ +{ + "name": "Canada - Prince Edward Island", + "generic_label": "HST", + "display_inclusive": true, + "zone": "ca_pe_vat", + "tag": "CA", + "rates": [ + { + "id": "ca_pe_vat_standard", + "name": "Standard", + "default": true, + "amounts": [ + { + "id": "ca_pe_vat_standard_2013", + "amount": 0.14, + "start_date": "2013-04-01" + } + ] + } + ] +} diff --git a/resources/tax_type/ca_qc_vat.json b/resources/tax_type/ca_qc_vat.json new file mode 100644 index 0000000..ce1b22b --- /dev/null +++ b/resources/tax_type/ca_qc_vat.json @@ -0,0 +1,21 @@ +{ + "name": "Canada - Quebec", + "generic_label": "GST", + "display_inclusive": true, + "zone": "ca_qc_vat", + "tag": "CA", + "rates": [ + { + "id": "ca_qc_vat_standard", + "name": "Standard", + "default": true, + "amounts": [ + { + "id": "ca_qc_vat_standard_2013", + "amount": 0.05, + "start_date": "2013-04-01" + } + ] + } + ] +} diff --git a/resources/tax_type/ca_sk_vat.json b/resources/tax_type/ca_sk_vat.json new file mode 100644 index 0000000..d4d5a5b --- /dev/null +++ b/resources/tax_type/ca_sk_vat.json @@ -0,0 +1,21 @@ +{ + "name": "Canada - Saskatchewan", + "generic_label": "GST", + "display_inclusive": true, + "zone": "ca_sk_vat", + "tag": "CA", + "rates": [ + { + "id": "ca_sk_vat_standard", + "name": "Standard", + "default": true, + "amounts": [ + { + "id": "ca_sk_vat_standard_2013", + "amount": 0.05, + "start_date": "2013-04-01" + } + ] + } + ] +} diff --git a/resources/tax_type/ca_yt_vat.json b/resources/tax_type/ca_yt_vat.json new file mode 100644 index 0000000..9594ed5 --- /dev/null +++ b/resources/tax_type/ca_yt_vat.json @@ -0,0 +1,21 @@ +{ + "name": "Canada - Yukon", + "generic_label": "GST", + "display_inclusive": true, + "zone": "ca_yt_vat", + "tag": "CA", + "rates": [ + { + "id": "ca_yt_vat_standard", + "name": "Standard", + "default": true, + "amounts": [ + { + "id": "ca_yt_vat_standard_2013", + "amount": 0.05, + "start_date": "2013-04-01" + } + ] + } + ] +} diff --git a/resources/zone/ca_ab_vat.json b/resources/zone/ca_ab_vat.json new file mode 100644 index 0000000..ef8f453 --- /dev/null +++ b/resources/zone/ca_ab_vat.json @@ -0,0 +1,13 @@ +{ + "name": "Canada - Alberta (GST)", + "scope": "tax", + "members": [ + { + "type": "country", + "id": "ca_ab_vat_0", + "name": "Canada - Alberta", + "country_code": "CA", + "administrative_area": "CA-AB" + } + ] +} diff --git a/resources/zone/ca_bc_vat.json b/resources/zone/ca_bc_vat.json new file mode 100644 index 0000000..de410f7 --- /dev/null +++ b/resources/zone/ca_bc_vat.json @@ -0,0 +1,13 @@ +{ + "name": "Canada - British Columbia (HST)", + "scope": "tax", + "members": [ + { + "type": "country", + "id": "ca_bs_vat_0", + "name": "Canada - British Columbia", + "country_code": "CA", + "administrative_area": "CA-BC" + } + ] +} diff --git a/resources/zone/ca_mb_vat.json b/resources/zone/ca_mb_vat.json new file mode 100644 index 0000000..6e1993f --- /dev/null +++ b/resources/zone/ca_mb_vat.json @@ -0,0 +1,13 @@ +{ + "name": "Canada - Manitoba (GST)", + "scope": "tax", + "members": [ + { + "type": "country", + "id": "ca_mb_vat_0", + "name": "Canada - Manitoba", + "country_code": "CA", + "administrative_area": "CA-MB" + } + ] +} diff --git a/resources/zone/ca_nb_vat.json b/resources/zone/ca_nb_vat.json new file mode 100644 index 0000000..116a6c0 --- /dev/null +++ b/resources/zone/ca_nb_vat.json @@ -0,0 +1,13 @@ +{ + "name": "Canada - New Brunswick (HST)", + "scope": "tax", + "members": [ + { + "type": "country", + "id": "ca_nb_vat_0", + "name": "Canada - New Brunswick", + "country_code": "CA", + "administrative_area": "CA-NB" + } + ] +} diff --git a/resources/zone/ca_nl_vat.json b/resources/zone/ca_nl_vat.json new file mode 100644 index 0000000..df660a5 --- /dev/null +++ b/resources/zone/ca_nl_vat.json @@ -0,0 +1,13 @@ +{ + "name": "Canada - Newfoundland and Labrador (HST)", + "scope": "tax", + "members": [ + { + "type": "country", + "id": "ca_nl_vat_0", + "name": "Canada - Newfoundland and Labrador", + "country_code": "CA", + "administrative_area": "CA-NL" + } + ] +} diff --git a/resources/zone/ca_ns_vat.json b/resources/zone/ca_ns_vat.json new file mode 100644 index 0000000..482ebc9 --- /dev/null +++ b/resources/zone/ca_ns_vat.json @@ -0,0 +1,13 @@ +{ + "name": "Canada - Nova Scotia (HST)", + "scope": "tax", + "members": [ + { + "type": "country", + "id": "ca_ns_vat_0", + "name": "Canada - Nova Scotia", + "country_code": "CA", + "administrative_area": "CA-NS" + } + ] +} diff --git a/resources/zone/ca_nt_vat.json b/resources/zone/ca_nt_vat.json new file mode 100644 index 0000000..5083c8d --- /dev/null +++ b/resources/zone/ca_nt_vat.json @@ -0,0 +1,13 @@ +{ + "name": "Canada - Northwest Territories (GST)", + "scope": "tax", + "members": [ + { + "type": "country", + "id": "ca_nt_vat_0", + "name": "Canada - Northwest Territories", + "country_code": "CA", + "administrative_area": "CA-NT" + } + ] +} diff --git a/resources/zone/ca_nu_vat.json b/resources/zone/ca_nu_vat.json new file mode 100644 index 0000000..1a016df --- /dev/null +++ b/resources/zone/ca_nu_vat.json @@ -0,0 +1,13 @@ +{ + "name": "Canada - Nunavut (GST)", + "scope": "tax", + "members": [ + { + "type": "country", + "id": "ca_ns_vat_0", + "name": "Canada - Nunavut", + "country_code": "CA", + "administrative_area": "CA-NU" + } + ] +} diff --git a/resources/zone/ca_on_vat.json b/resources/zone/ca_on_vat.json new file mode 100644 index 0000000..e723cfc --- /dev/null +++ b/resources/zone/ca_on_vat.json @@ -0,0 +1,13 @@ +{ + "name": "Canada - Ontario (HST)", + "scope": "tax", + "members": [ + { + "type": "country", + "id": "ca_on_vat_0", + "name": "Canada - Ontario", + "country_code": "CA", + "administrative_area": "CA-ON" + } + ] +} diff --git a/resources/zone/ca_pe_vat.json b/resources/zone/ca_pe_vat.json new file mode 100644 index 0000000..7d12965 --- /dev/null +++ b/resources/zone/ca_pe_vat.json @@ -0,0 +1,13 @@ +{ + "name": "Canada - Prince Edward Island (GST)", + "scope": "tax", + "members": [ + { + "type": "country", + "id": "ca_pe_vat_0", + "name": "Canada - Prince Edward Island", + "country_code": "CA", + "administrative_area": "CA-PE" + } + ] +} diff --git a/resources/zone/ca_qc_vat.json b/resources/zone/ca_qc_vat.json new file mode 100644 index 0000000..d357231 --- /dev/null +++ b/resources/zone/ca_qc_vat.json @@ -0,0 +1,13 @@ +{ + "name": "Canada - Quebec (GST)", + "scope": "tax", + "members": [ + { + "type": "country", + "id": "ca_qc_vat_0", + "name": "Canada - Quebec", + "country_code": "CA", + "administrative_area": "CA-QC" + } + ] +} diff --git a/resources/zone/ca_sk_vat.json b/resources/zone/ca_sk_vat.json new file mode 100644 index 0000000..3edf605 --- /dev/null +++ b/resources/zone/ca_sk_vat.json @@ -0,0 +1,13 @@ +{ + "name": "Canada - Saskatchewan (GST)", + "scope": "tax", + "members": [ + { + "type": "country", + "id": "ca_sk_vat_0", + "name": "Canada - Saskatchewan", + "country_code": "CA", + "administrative_area": "CA-SK" + } + ] +} diff --git a/resources/zone/ca_yt_vat.json b/resources/zone/ca_yt_vat.json new file mode 100644 index 0000000..18b1d7d --- /dev/null +++ b/resources/zone/ca_yt_vat.json @@ -0,0 +1,13 @@ +{ + "name": "Canada - Yukon (GST)", + "scope": "tax", + "members": [ + { + "type": "country", + "id": "ca_yt_vat_0", + "name": "Canada - Yukon", + "country_code": "CA", + "administrative_area": "CA-YT" + } + ] +} From c1bd48139bb01da85bba728a717d503df3aa6fce Mon Sep 17 00:00:00 2001 From: Thomas Faurbye Nielsen Date: Wed, 2 Dec 2015 15:11:05 +0100 Subject: [PATCH 2/7] Split GST/PST taxes into their own file. Rename files so they make sense. Add a test for split-rate (GST/PST) --- .../{ca_ab_vat.json => ca_ab_gst.json} | 7 +- .../{ca_bc_vat.json => ca_bc_gst.json} | 6 +- resources/tax_type/ca_bc_pst.json | 21 +++ .../{ca_mb_vat.json => ca_mb_gst.json} | 6 +- resources/tax_type/ca_mb_pst.json | 21 +++ .../{ca_nb_vat.json => ca_nb_hst.json} | 9 +- resources/tax_type/ca_nl_hst.json | 27 ++++ resources/tax_type/ca_nl_vat.json | 21 --- .../{ca_ns_vat.json => ca_ns_hst.json} | 2 +- .../{ca_nt_vat.json => ca_nt_hst.json} | 6 +- .../{ca_nu_vat.json => ca_nu_gst.json} | 6 +- .../{ca_on_vat.json => ca_on_hst.json} | 6 +- .../{ca_pe_vat.json => ca_pe_hst.json} | 6 +- .../{ca_qc_vat.json => ca_qc_gst.json} | 6 +- resources/tax_type/ca_qc_qst.json | 21 +++ .../{ca_sk_vat.json => ca_sk_gst.json} | 6 +- resources/tax_type/ca_sk_pst.json | 21 +++ .../{ca_yt_vat.json => ca_yt_gst.json} | 6 +- .../TaxType/CanadaTaxTypeResolverTest.php | 143 +++++++++++++----- 19 files changed, 253 insertions(+), 94 deletions(-) rename resources/tax_type/{ca_ab_vat.json => ca_ab_gst.json} (70%) rename resources/tax_type/{ca_bc_vat.json => ca_bc_gst.json} (75%) create mode 100644 resources/tax_type/ca_bc_pst.json rename resources/tax_type/{ca_mb_vat.json => ca_mb_gst.json} (74%) create mode 100644 resources/tax_type/ca_mb_pst.json rename resources/tax_type/{ca_nb_vat.json => ca_nb_hst.json} (66%) create mode 100644 resources/tax_type/ca_nl_hst.json delete mode 100644 resources/tax_type/ca_nl_vat.json rename resources/tax_type/{ca_ns_vat.json => ca_ns_hst.json} (93%) rename resources/tax_type/{ca_nt_vat.json => ca_nt_hst.json} (75%) rename resources/tax_type/{ca_nu_vat.json => ca_nu_gst.json} (74%) rename resources/tax_type/{ca_on_vat.json => ca_on_hst.json} (74%) rename resources/tax_type/{ca_pe_vat.json => ca_pe_hst.json} (75%) rename resources/tax_type/{ca_qc_vat.json => ca_qc_gst.json} (74%) create mode 100644 resources/tax_type/ca_qc_qst.json rename resources/tax_type/{ca_sk_vat.json => ca_sk_gst.json} (74%) create mode 100644 resources/tax_type/ca_sk_pst.json rename resources/tax_type/{ca_yt_vat.json => ca_yt_gst.json} (74%) diff --git a/resources/tax_type/ca_ab_vat.json b/resources/tax_type/ca_ab_gst.json similarity index 70% rename from resources/tax_type/ca_ab_vat.json rename to resources/tax_type/ca_ab_gst.json index c6cf808..45077b9 100644 --- a/resources/tax_type/ca_ab_vat.json +++ b/resources/tax_type/ca_ab_gst.json @@ -1,17 +1,18 @@ { "name": "Canada - Alberta", "generic_label": "GST", - "display_inclusive": true, + "display_inclusive": false, "zone": "ca_ab_vat", "tag": "CA", "rates": [ { - "id": "ca_ab_vat_standard", + "id": "ca_ab_gst_standard", "name": "Standard", "default": true, + "compound": true, "amounts": [ { - "id": "ca_ab_vat_standard_2013", + "id": "ca_ab_gst_standard_2013", "amount": 0.05, "start_date": "2013-04-01" } diff --git a/resources/tax_type/ca_bc_vat.json b/resources/tax_type/ca_bc_gst.json similarity index 75% rename from resources/tax_type/ca_bc_vat.json rename to resources/tax_type/ca_bc_gst.json index 513d4b6..bbdbbc1 100644 --- a/resources/tax_type/ca_bc_vat.json +++ b/resources/tax_type/ca_bc_gst.json @@ -1,17 +1,17 @@ { "name": "Canada - British Columbia", "generic_label": "GST", - "display_inclusive": true, + "display_inclusive": false, "zone": "ca_bc_vat", "tag": "CA", "rates": [ { - "id": "ca_bc_vat_standard", + "id": "ca_bc_gst_standard", "name": "Standard", "default": true, "amounts": [ { - "id": "ca_bc_vat_standard_2013", + "id": "ca_bc_gst_standard_2013", "amount": 0.05, "start_date": "2013-04-01" } diff --git a/resources/tax_type/ca_bc_pst.json b/resources/tax_type/ca_bc_pst.json new file mode 100644 index 0000000..a5a4ff5 --- /dev/null +++ b/resources/tax_type/ca_bc_pst.json @@ -0,0 +1,21 @@ +{ + "name": "Canada - British Columbia", + "generic_label": "PST", + "display_inclusive": false, + "zone": "ca_bc_vat", + "tag": "CA", + "rates": [ + { + "id": "ca_bc_pst_standard", + "name": "Standard", + "default": true, + "amounts": [ + { + "id": "ca_bc_pst_standard_2013", + "amount": 0.07, + "start_date": "2013-04-01" + } + ] + } + ] +} diff --git a/resources/tax_type/ca_mb_vat.json b/resources/tax_type/ca_mb_gst.json similarity index 74% rename from resources/tax_type/ca_mb_vat.json rename to resources/tax_type/ca_mb_gst.json index b36017a..d3d98d2 100644 --- a/resources/tax_type/ca_mb_vat.json +++ b/resources/tax_type/ca_mb_gst.json @@ -1,17 +1,17 @@ { "name": "Canada - Manitoba", "generic_label": "GST", - "display_inclusive": true, + "display_inclusive": false, "zone": "ca_mb_vat", "tag": "CA", "rates": [ { - "id": "ca_mb_vat_standard", + "id": "ca_mb_gst_standard", "name": "Standard", "default": true, "amounts": [ { - "id": "ca_mb_vat_standard_2013", + "id": "ca_mb_gst_standard_2013", "amount": 0.05, "start_date": "2013-04-01" } diff --git a/resources/tax_type/ca_mb_pst.json b/resources/tax_type/ca_mb_pst.json new file mode 100644 index 0000000..16a5d7d --- /dev/null +++ b/resources/tax_type/ca_mb_pst.json @@ -0,0 +1,21 @@ +{ + "name": "Canada - Manitoba", + "generic_label": "PST", + "display_inclusive": false, + "zone": "ca_mb_vat", + "tag": "CA", + "rates": [ + { + "id": "ca_mb_pst_standard", + "name": "Standard", + "default": true, + "amounts": [ + { + "id": "ca_mb_pst_standard_2013", + "amount": 0.08, + "start_date": "2013-04-01" + } + ] + } + ] +} diff --git a/resources/tax_type/ca_nb_vat.json b/resources/tax_type/ca_nb_hst.json similarity index 66% rename from resources/tax_type/ca_nb_vat.json rename to resources/tax_type/ca_nb_hst.json index d688e23..f8534a8 100644 --- a/resources/tax_type/ca_nb_vat.json +++ b/resources/tax_type/ca_nb_hst.json @@ -1,17 +1,18 @@ { "name": "Canada - New Brunswick", "generic_label": "HST", - "display_inclusive": true, + "display_inclusive": false, "zone": "ca_nb_vat", "tag": "CA", + "compound": false, "rates": [ { - "id": "ca_nb_vat_standard", - "name": "Standard", + "id": "ca_nb_hst_standard", + "name": "hst", "default": true, "amounts": [ { - "id": "ca_nb_vat_standard_2013", + "id": "ca_nb_hst_standard_2013", "amount": 0.13, "start_date": "2013-04-01" } diff --git a/resources/tax_type/ca_nl_hst.json b/resources/tax_type/ca_nl_hst.json new file mode 100644 index 0000000..c7b620f --- /dev/null +++ b/resources/tax_type/ca_nl_hst.json @@ -0,0 +1,27 @@ +{ + "name": "Canada - Newfoundland and Labrador", + "generic_label": "HST", + "display_inclusive": false, + "zone": "ca_nl_vat", + "tag": "CA", + "rates": [ + { + "id": "ca_nl_hst_standard", + "name": "Standard", + "default": true, + "amounts": [ + { + "id": "ca_nl_hst_standard_2013", + "amount": 0.13, + "start_date": "2013-04-01", + "end_date": "2015-12-31" + }, + { + "id": "ca_nl_hst_standard_2016", + "amount": 0.15, + "start_date": "2016-01-01" + } + ] + } + ] +} diff --git a/resources/tax_type/ca_nl_vat.json b/resources/tax_type/ca_nl_vat.json deleted file mode 100644 index 73ad080..0000000 --- a/resources/tax_type/ca_nl_vat.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "Canada - Newfoundland and Labrador", - "generic_label": "HST", - "display_inclusive": true, - "zone": "ca_nl_vat", - "tag": "CA", - "rates": [ - { - "id": "ca_nl_vat_standard", - "name": "Standard", - "default": true, - "amounts": [ - { - "id": "ca_nl_vat_standard_2013", - "amount": 0.13, - "start_date": "2013-04-01" - } - ] - } - ] -} diff --git a/resources/tax_type/ca_ns_vat.json b/resources/tax_type/ca_ns_hst.json similarity index 93% rename from resources/tax_type/ca_ns_vat.json rename to resources/tax_type/ca_ns_hst.json index 3b8dd98..756f066 100644 --- a/resources/tax_type/ca_ns_vat.json +++ b/resources/tax_type/ca_ns_hst.json @@ -1,7 +1,7 @@ { "name": "Canada - Nova Scotia", "generic_label": "HST", - "display_inclusive": true, + "display_inclusive": false, "zone": "ca_ns_vat", "tag": "CA", "rates": [ diff --git a/resources/tax_type/ca_nt_vat.json b/resources/tax_type/ca_nt_hst.json similarity index 75% rename from resources/tax_type/ca_nt_vat.json rename to resources/tax_type/ca_nt_hst.json index 965ce6c..b428ec7 100644 --- a/resources/tax_type/ca_nt_vat.json +++ b/resources/tax_type/ca_nt_hst.json @@ -1,17 +1,17 @@ { "name": "Canada - Northwest Territories", "generic_label": "GST", - "display_inclusive": true, + "display_inclusive": false, "zone": "ca_nt_vat", "tag": "CA", "rates": [ { - "id": "ca_nt_vat_standard", + "id": "ca_nt_gst_standard", "name": "Standard", "default": true, "amounts": [ { - "id": "ca_nt_vat_standard_2013", + "id": "ca_nt_gst_standard_2013", "amount": 0.05, "start_date": "2013-04-01" } diff --git a/resources/tax_type/ca_nu_vat.json b/resources/tax_type/ca_nu_gst.json similarity index 74% rename from resources/tax_type/ca_nu_vat.json rename to resources/tax_type/ca_nu_gst.json index b773616..560e5f9 100644 --- a/resources/tax_type/ca_nu_vat.json +++ b/resources/tax_type/ca_nu_gst.json @@ -1,17 +1,17 @@ { "name": "Canada - Nunavut", "generic_label": "GST", - "display_inclusive": true, + "display_inclusive": false, "zone": "ca_nu_vat", "tag": "CA", "rates": [ { - "id": "ca_nu_vat_standard", + "id": "ca_nu_gst_standard", "name": "Standard", "default": true, "amounts": [ { - "id": "ca_nu_vat_standard_2013", + "id": "ca_nu_gst_standard_2013", "amount": 0.05, "start_date": "2013-04-01" } diff --git a/resources/tax_type/ca_on_vat.json b/resources/tax_type/ca_on_hst.json similarity index 74% rename from resources/tax_type/ca_on_vat.json rename to resources/tax_type/ca_on_hst.json index fffdb7a..838e784 100644 --- a/resources/tax_type/ca_on_vat.json +++ b/resources/tax_type/ca_on_hst.json @@ -1,17 +1,17 @@ { "name": "Canada - Ontario", "generic_label": "HST", - "display_inclusive": true, + "display_inclusive": false, "zone": "ca_on_vat", "tag": "CA", "rates": [ { - "id": "ca_on_vat_standard", + "id": "ca_on_hst_standard", "name": "Standard", "default": true, "amounts": [ { - "id": "ca_on_vat_standard_2013", + "id": "ca_on_hst_standard_2013", "amount": 0.13, "start_date": "2013-04-01" } diff --git a/resources/tax_type/ca_pe_vat.json b/resources/tax_type/ca_pe_hst.json similarity index 75% rename from resources/tax_type/ca_pe_vat.json rename to resources/tax_type/ca_pe_hst.json index 9cc5283..e7763a9 100644 --- a/resources/tax_type/ca_pe_vat.json +++ b/resources/tax_type/ca_pe_hst.json @@ -1,17 +1,17 @@ { "name": "Canada - Prince Edward Island", "generic_label": "HST", - "display_inclusive": true, + "display_inclusive": false, "zone": "ca_pe_vat", "tag": "CA", "rates": [ { - "id": "ca_pe_vat_standard", + "id": "ca_pe_hst_standard", "name": "Standard", "default": true, "amounts": [ { - "id": "ca_pe_vat_standard_2013", + "id": "ca_pe_hst_standard_2013", "amount": 0.14, "start_date": "2013-04-01" } diff --git a/resources/tax_type/ca_qc_vat.json b/resources/tax_type/ca_qc_gst.json similarity index 74% rename from resources/tax_type/ca_qc_vat.json rename to resources/tax_type/ca_qc_gst.json index ce1b22b..c14961e 100644 --- a/resources/tax_type/ca_qc_vat.json +++ b/resources/tax_type/ca_qc_gst.json @@ -1,17 +1,17 @@ { "name": "Canada - Quebec", "generic_label": "GST", - "display_inclusive": true, + "display_inclusive": false, "zone": "ca_qc_vat", "tag": "CA", "rates": [ { - "id": "ca_qc_vat_standard", + "id": "ca_qc_gst_standard", "name": "Standard", "default": true, "amounts": [ { - "id": "ca_qc_vat_standard_2013", + "id": "ca_qc_gst_standard_2013", "amount": 0.05, "start_date": "2013-04-01" } diff --git a/resources/tax_type/ca_qc_qst.json b/resources/tax_type/ca_qc_qst.json new file mode 100644 index 0000000..fa0a3ab --- /dev/null +++ b/resources/tax_type/ca_qc_qst.json @@ -0,0 +1,21 @@ +{ + "name": "Canada - Quebec", + "generic_label": "QST", + "display_inclusive": false, + "zone": "ca_qc_vat", + "tag": "CA", + "rates": [ + { + "id": "ca_qc_qst_standard", + "name": "Standard", + "default": true, + "amounts": [ + { + "id": "ca_qc_qst_standard_2013", + "amount": 0.09975, + "start_date": "2013-04-01" + } + ] + } + ] +} diff --git a/resources/tax_type/ca_sk_vat.json b/resources/tax_type/ca_sk_gst.json similarity index 74% rename from resources/tax_type/ca_sk_vat.json rename to resources/tax_type/ca_sk_gst.json index d4d5a5b..f54f3e0 100644 --- a/resources/tax_type/ca_sk_vat.json +++ b/resources/tax_type/ca_sk_gst.json @@ -1,17 +1,17 @@ { "name": "Canada - Saskatchewan", "generic_label": "GST", - "display_inclusive": true, + "display_inclusive": false, "zone": "ca_sk_vat", "tag": "CA", "rates": [ { - "id": "ca_sk_vat_standard", + "id": "ca_sk_gst_standard", "name": "Standard", "default": true, "amounts": [ { - "id": "ca_sk_vat_standard_2013", + "id": "ca_sk_gst_standard_2013", "amount": 0.05, "start_date": "2013-04-01" } diff --git a/resources/tax_type/ca_sk_pst.json b/resources/tax_type/ca_sk_pst.json new file mode 100644 index 0000000..ded3858 --- /dev/null +++ b/resources/tax_type/ca_sk_pst.json @@ -0,0 +1,21 @@ +{ + "name": "Canada - Saskatchewan", + "generic_label": "PST", + "display_inclusive": false, + "zone": "ca_sk_vat", + "tag": "CA", + "rates": [ + { + "id": "ca_sk_pst_standard", + "name": "Standard", + "default": true, + "amounts": [ + { + "id": "ca_sk_pst_standard_2013", + "amount": 0.05, + "start_date": "2013-04-01" + } + ] + } + ] +} diff --git a/resources/tax_type/ca_yt_vat.json b/resources/tax_type/ca_yt_gst.json similarity index 74% rename from resources/tax_type/ca_yt_vat.json rename to resources/tax_type/ca_yt_gst.json index 9594ed5..8a40116 100644 --- a/resources/tax_type/ca_yt_vat.json +++ b/resources/tax_type/ca_yt_gst.json @@ -1,17 +1,17 @@ { "name": "Canada - Yukon", "generic_label": "GST", - "display_inclusive": true, + "display_inclusive": false, "zone": "ca_yt_vat", "tag": "CA", "rates": [ { - "id": "ca_yt_vat_standard", + "id": "ca_yt_gst_standard", "name": "Standard", "default": true, "amounts": [ { - "id": "ca_yt_vat_standard_2013", + "id": "ca_yt_gst_standard_2013", "amount": 0.05, "start_date": "2013-04-01" } diff --git a/tests/Resolver/TaxType/CanadaTaxTypeResolverTest.php b/tests/Resolver/TaxType/CanadaTaxTypeResolverTest.php index 5fa2aac..dbe9fa7 100644 --- a/tests/Resolver/TaxType/CanadaTaxTypeResolverTest.php +++ b/tests/Resolver/TaxType/CanadaTaxTypeResolverTest.php @@ -3,6 +3,7 @@ namespace CommerceGuys\Tax\Tests\Resolver; use CommerceGuys\Addressing\Model\AddressInterface; +use CommerceGuys\Tax\Model\TaxType; use CommerceGuys\Tax\Repository\TaxTypeRepository; use CommerceGuys\Tax\Resolver\TaxType\CanadaTaxTypeResolver; use org\bovigo\vfs\vfsStream; @@ -19,18 +20,18 @@ class CanadaTaxTypeResolverTest extends \PHPUnit_Framework_TestCase */ protected $taxTypes = [ 'ca_on_hst' => [ - 'name' => 'Ontario HST', + 'name' => 'Ontario HST', 'generic_label' => 'hst', - 'tag' => 'CA', - 'zone' => 'ca_on_hst', - 'rates' => [ + 'tag' => 'CA', + 'zone' => 'ca_on_hst', + 'rates' => [ [ - 'id' => 'ca_on_hst', - 'name' => 'Ontario HST', + 'id' => 'ca_on_hst', + 'name' => 'Ontario HST', 'amounts' => [ [ - 'id' => 'ca_on_hst_13', - 'amount' => 0.13, + 'id' => 'ca_on_hst_13', + 'amount' => 0.13, 'start_date' => '2010-07-01', ], ], @@ -38,24 +39,52 @@ class CanadaTaxTypeResolverTest extends \PHPUnit_Framework_TestCase ], ], 'ca_ns_hst' => [ - 'name' => 'Nova Scotia HST', + 'name' => 'Nova Scotia HST', 'generic_label' => 'hst', - 'tag' => 'CA', - 'zone' => 'ca_ns_hst', - 'rates' => [ + 'tag' => 'CA', + 'zone' => 'ca_ns_hst', + 'rates' => [ [ - 'id' => 'ca_ns_hst', - 'name' => 'Nova Scotia HST', + 'id' => 'ca_ns_hst', + 'name' => 'Nova Scotia HST', 'amounts' => [ [ - 'id' => 'ca_ns_hst_15', - 'amount' => 0.15, + 'id' => 'ca_ns_hst_15', + 'amount' => 0.15, 'start_date' => '2010-07-01', ], ], ], ], ], + "ca_mb_gst" => [ + "name" => "Manitoba GST", + "generic_label" => "gst", + "tag" => "CA", + "zone" => "ca_mb_vat", + "rates" => [ + [ + "id" => "ca_mb_gst", + "name" => "Manitoba GST", + "default" => true, + "amounts" => [["id" => "ca_mb_gst_2013", "amount" => 0.05]] + ] + ] + ], + "ca_mb_pst" => [ + "name" => "Manitoba PST", + "generic_label" => "pst", + "tag" => "CA", + "zone" => "ca_mb_vat", + "rates" => [ + [ + "id" => "ca_mb_pst", + "name" => "Manitoba PST", + "default" => true, + "amounts" => [["id" => "ca_mb_pst_2013", "amount" => 0.08]] + ] + ] + ] ]; /** @@ -65,29 +94,41 @@ class CanadaTaxTypeResolverTest extends \PHPUnit_Framework_TestCase */ protected $zones = [ 'ca_on_hst' => [ - 'name' => 'Ontario (HST)', + 'name' => 'Ontario (HST)', 'members' => [ [ - 'type' => 'country', - 'id' => '1', - 'name' => 'Canada - Ontario', - 'country_code' => 'CA', + 'type' => 'country', + 'id' => '1', + 'name' => 'Canada - Ontario', + 'country_code' => 'CA', 'administrative_area' => 'CA-ON', ], ], ], 'ca_ns_hst' => [ - 'name' => 'Nova Scotia (HST)', + 'name' => 'Nova Scotia (HST)', 'members' => [ [ - 'type' => 'country', - 'id' => '2', - 'name' => 'Canada - Nova Scotia', - 'country_code' => 'CA', + 'type' => 'country', + 'id' => '2', + 'name' => 'Canada - Nova Scotia', + 'country_code' => 'CA', 'administrative_area' => 'CA-NS', ], ], ], + 'ca_mb_vat' => [ + 'name' => 'Manitoba Tax', + 'members' => [ + [ + 'type' => 'country', + 'id' => '1', + 'name' => 'Canada - Manitoba', + 'country_code' => 'CA', + 'administrative_area' => 'CA-MB', + ], + ], + ], ]; /** @@ -97,7 +138,7 @@ class CanadaTaxTypeResolverTest extends \PHPUnit_Framework_TestCase */ public function testConstructor() { - $root = vfsStream::setup('resources'); + $root = vfsStream::setup('resources'); $directory = vfsStream::newDirectory('tax_type')->at($root); foreach ($this->taxTypes as $id => $definition) { $filename = $id . '.json'; @@ -110,7 +151,7 @@ public function testConstructor() } $taxTypeRepository = new TaxTypeRepository('vfs://resources/'); - $resolver = new CanadaTaxTypeResolver($taxTypeRepository); + $resolver = new CanadaTaxTypeResolver($taxTypeRepository); $this->assertSame($taxTypeRepository, $this->getObjectAttribute($resolver, 'taxTypeRepository')); return $resolver; @@ -120,16 +161,16 @@ public function testConstructor() * @covers ::resolve * @covers ::getTaxTypes * - * @uses \CommerceGuys\Tax\Resolver\TaxType\StoreRegistrationCheckerTrait - * @uses \CommerceGuys\Tax\Repository\TaxTypeRepository - * @uses \CommerceGuys\Tax\Model\TaxType - * @uses \CommerceGuys\Tax\Model\TaxRate - * @uses \CommerceGuys\Tax\Model\TaxRateAmount + * @uses \CommerceGuys\Tax\Resolver\TaxType\StoreRegistrationCheckerTrait + * @uses \CommerceGuys\Tax\Repository\TaxTypeRepository + * @uses \CommerceGuys\Tax\Model\TaxType + * @uses \CommerceGuys\Tax\Model\TaxRate + * @uses \CommerceGuys\Tax\Model\TaxRateAmount * @depends testConstructor */ public function testResolver($resolver) { - $taxable = $this + $taxable = $this ->getMockBuilder('CommerceGuys\Tax\TaxableInterface') ->getMock(); $usAddress = $this @@ -156,30 +197,56 @@ public function testResolver($resolver) $novaScotiaAddress->expects($this->any()) ->method('getAdministrativeArea') ->will($this->returnValue('CA-NS')); + $manitobaAddress = $this + ->getMockBuilder('CommerceGuys\Addressing\Model\Address') + ->getMock(); + $manitobaAddress->expects($this->any()) + ->method('getCountryCode') + ->will($this->returnValue('CA')); + $manitobaAddress->expects($this->any()) + ->method('getAdministrativeArea') + ->will($this->returnValue('CA-MB')); // Nova Scotia store, Ontario customer. $context = $this->getContext($ontarioAddress, $novaScotiaAddress); $results = $resolver->resolve($taxable, $context); - $result = reset($results); + $result = reset($results); $this->assertInstanceOf('CommerceGuys\Tax\Model\TaxType', $result); $this->assertEquals('ca_on_hst', $result->getId()); // Ontario store, Nova Scotia customer. $context = $this->getContext($novaScotiaAddress, $ontarioAddress); $results = $resolver->resolve($taxable, $context); - $result = reset($results); + $result = reset($results); $this->assertInstanceOf('CommerceGuys\Tax\Model\TaxType', $result); $this->assertEquals('ca_ns_hst', $result->getId()); // Ontario store, US customer. $context = $this->getContext($usAddress, $ontarioAddress); - $result = $resolver->resolve($taxable, $context); + $result = $resolver->resolve($taxable, $context); $this->assertEquals([], $result); // US store, Ontario customer. $context = $this->getContext($ontarioAddress, $usAddress); - $result = $resolver->resolve($taxable, $context); + $result = $resolver->resolve($taxable, $context); $this->assertEquals([], $result); + + // Ontario store, Manitoba customer. + $context = $this->getContext($manitobaAddress, $ontarioAddress); + $results = $resolver->resolve($taxable, $context); + reset($results); + $this->assertCount(2, $results); + $ids = []; + /** @var TaxType $result */ + foreach ($results as $result) { + $this->assertInstanceOf('CommerceGuys\Tax\Model\TaxType', $result); + $ids[] = $result->getId(); + } + + foreach (["ca_mb_gst", "ca_mb_pst"] as $id) { + $this->assertContains($id, $ids); + } + } /** From 16312bab948570515d54939b9a2226fa5d6bdbe8 Mon Sep 17 00:00:00 2001 From: Thomas Faurbye Nielsen Date: Thu, 5 Nov 2015 16:58:09 +0100 Subject: [PATCH 3/7] update composer --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 55f6005..ae54e81 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "commerceguys/tax", + "name": "archanium/tax", "type": "library", "description": "Tax library with a flexible data model, predefined tax rates, powerful resolving logic.", "keywords": ["tax", "vat"], From a6313c5c6ffc65c17d6054163a413462300d6558 Mon Sep 17 00:00:00 2001 From: Thomas Faurbye Nielsen Date: Fri, 15 Jan 2016 15:00:19 +0100 Subject: [PATCH 4/7] Rename files (remove references from vat) Remove some unneeded whitespace. --- resources/tax_type/ca_ab_gst.json | 3 +-- resources/tax_type/ca_bc_gst.json | 2 +- resources/tax_type/ca_bc_pst.json | 2 +- resources/tax_type/ca_mb_gst.json | 2 +- resources/tax_type/ca_mb_pst.json | 2 +- resources/tax_type/ca_nb_hst.json | 2 +- resources/tax_type/ca_nl_hst.json | 2 +- resources/tax_type/ca_ns_hst.json | 6 +++--- resources/tax_type/ca_nt_hst.json | 2 +- resources/tax_type/ca_nu_gst.json | 2 +- resources/tax_type/ca_on_hst.json | 2 +- resources/tax_type/ca_pe_hst.json | 2 +- resources/tax_type/ca_qc_gst.json | 2 +- resources/tax_type/ca_qc_qst.json | 2 +- resources/tax_type/ca_sk_gst.json | 2 +- resources/tax_type/ca_sk_pst.json | 6 +++--- resources/tax_type/ca_yt_gst.json | 2 +- resources/zone/{ca_ab_vat.json => ca_ab.json} | 2 +- resources/zone/{ca_bc_vat.json => ca_bc.json} | 2 +- resources/zone/{ca_mb_vat.json => ca_mb.json} | 2 +- resources/zone/{ca_nb_vat.json => ca_nb.json} | 2 +- resources/zone/{ca_nl_vat.json => ca_nl.json} | 2 +- resources/zone/{ca_ns_vat.json => ca_ns.json} | 2 +- resources/zone/{ca_nt_vat.json => ca_nt.json} | 2 +- resources/zone/{ca_nu_vat.json => ca_nu.json} | 2 +- resources/zone/{ca_on_vat.json => ca_on.json} | 2 +- resources/zone/{ca_pe_vat.json => ca_pe.json} | 2 +- resources/zone/{ca_qc_vat.json => ca_qc.json} | 2 +- resources/zone/{ca_sk_vat.json => ca_sk.json} | 2 +- resources/zone/{ca_yt_vat.json => ca_yt.json} | 2 +- tests/Resolver/TaxType/CanadaTaxTypeResolverTest.php | 10 +++++----- 31 files changed, 39 insertions(+), 40 deletions(-) rename resources/zone/{ca_ab_vat.json => ca_ab.json} (88%) rename resources/zone/{ca_bc_vat.json => ca_bc.json} (89%) rename resources/zone/{ca_mb_vat.json => ca_mb.json} (88%) rename resources/zone/{ca_nb_vat.json => ca_nb.json} (88%) rename resources/zone/{ca_nl_vat.json => ca_nl.json} (89%) rename resources/zone/{ca_ns_vat.json => ca_ns.json} (88%) rename resources/zone/{ca_nt_vat.json => ca_nt.json} (89%) rename resources/zone/{ca_nu_vat.json => ca_nu.json} (88%) rename resources/zone/{ca_on_vat.json => ca_on.json} (88%) rename resources/zone/{ca_pe_vat.json => ca_pe.json} (89%) rename resources/zone/{ca_qc_vat.json => ca_qc.json} (88%) rename resources/zone/{ca_sk_vat.json => ca_sk.json} (88%) rename resources/zone/{ca_yt_vat.json => ca_yt.json} (88%) diff --git a/resources/tax_type/ca_ab_gst.json b/resources/tax_type/ca_ab_gst.json index 45077b9..5339013 100644 --- a/resources/tax_type/ca_ab_gst.json +++ b/resources/tax_type/ca_ab_gst.json @@ -2,14 +2,13 @@ "name": "Canada - Alberta", "generic_label": "GST", "display_inclusive": false, - "zone": "ca_ab_vat", + "zone": "ca_ab", "tag": "CA", "rates": [ { "id": "ca_ab_gst_standard", "name": "Standard", "default": true, - "compound": true, "amounts": [ { "id": "ca_ab_gst_standard_2013", diff --git a/resources/tax_type/ca_bc_gst.json b/resources/tax_type/ca_bc_gst.json index bbdbbc1..b85c9f8 100644 --- a/resources/tax_type/ca_bc_gst.json +++ b/resources/tax_type/ca_bc_gst.json @@ -2,7 +2,7 @@ "name": "Canada - British Columbia", "generic_label": "GST", "display_inclusive": false, - "zone": "ca_bc_vat", + "zone": "ca_bc", "tag": "CA", "rates": [ { diff --git a/resources/tax_type/ca_bc_pst.json b/resources/tax_type/ca_bc_pst.json index a5a4ff5..c7fd071 100644 --- a/resources/tax_type/ca_bc_pst.json +++ b/resources/tax_type/ca_bc_pst.json @@ -2,7 +2,7 @@ "name": "Canada - British Columbia", "generic_label": "PST", "display_inclusive": false, - "zone": "ca_bc_vat", + "zone": "ca_bc", "tag": "CA", "rates": [ { diff --git a/resources/tax_type/ca_mb_gst.json b/resources/tax_type/ca_mb_gst.json index d3d98d2..c2fedea 100644 --- a/resources/tax_type/ca_mb_gst.json +++ b/resources/tax_type/ca_mb_gst.json @@ -2,7 +2,7 @@ "name": "Canada - Manitoba", "generic_label": "GST", "display_inclusive": false, - "zone": "ca_mb_vat", + "zone": "ca_mb", "tag": "CA", "rates": [ { diff --git a/resources/tax_type/ca_mb_pst.json b/resources/tax_type/ca_mb_pst.json index 16a5d7d..37ce27f 100644 --- a/resources/tax_type/ca_mb_pst.json +++ b/resources/tax_type/ca_mb_pst.json @@ -2,7 +2,7 @@ "name": "Canada - Manitoba", "generic_label": "PST", "display_inclusive": false, - "zone": "ca_mb_vat", + "zone": "ca_mb", "tag": "CA", "rates": [ { diff --git a/resources/tax_type/ca_nb_hst.json b/resources/tax_type/ca_nb_hst.json index f8534a8..b319939 100644 --- a/resources/tax_type/ca_nb_hst.json +++ b/resources/tax_type/ca_nb_hst.json @@ -2,7 +2,7 @@ "name": "Canada - New Brunswick", "generic_label": "HST", "display_inclusive": false, - "zone": "ca_nb_vat", + "zone": "ca_nb", "tag": "CA", "compound": false, "rates": [ diff --git a/resources/tax_type/ca_nl_hst.json b/resources/tax_type/ca_nl_hst.json index c7b620f..5eb6986 100644 --- a/resources/tax_type/ca_nl_hst.json +++ b/resources/tax_type/ca_nl_hst.json @@ -2,7 +2,7 @@ "name": "Canada - Newfoundland and Labrador", "generic_label": "HST", "display_inclusive": false, - "zone": "ca_nl_vat", + "zone": "ca_nl", "tag": "CA", "rates": [ { diff --git a/resources/tax_type/ca_ns_hst.json b/resources/tax_type/ca_ns_hst.json index 756f066..c4a96be 100644 --- a/resources/tax_type/ca_ns_hst.json +++ b/resources/tax_type/ca_ns_hst.json @@ -2,16 +2,16 @@ "name": "Canada - Nova Scotia", "generic_label": "HST", "display_inclusive": false, - "zone": "ca_ns_vat", + "zone": "ca_ns", "tag": "CA", "rates": [ { - "id": "ca_ns_vat_standard", + "id": "ca_ns_hst_standard", "name": "Standard", "default": true, "amounts": [ { - "id": "ca_ns_vat_standard_2013", + "id": "ca_ns_hst_standard_2013", "amount": 0.15, "start_date": "2013-04-01" } diff --git a/resources/tax_type/ca_nt_hst.json b/resources/tax_type/ca_nt_hst.json index b428ec7..17988d1 100644 --- a/resources/tax_type/ca_nt_hst.json +++ b/resources/tax_type/ca_nt_hst.json @@ -2,7 +2,7 @@ "name": "Canada - Northwest Territories", "generic_label": "GST", "display_inclusive": false, - "zone": "ca_nt_vat", + "zone": "ca_nt", "tag": "CA", "rates": [ { diff --git a/resources/tax_type/ca_nu_gst.json b/resources/tax_type/ca_nu_gst.json index 560e5f9..d325082 100644 --- a/resources/tax_type/ca_nu_gst.json +++ b/resources/tax_type/ca_nu_gst.json @@ -2,7 +2,7 @@ "name": "Canada - Nunavut", "generic_label": "GST", "display_inclusive": false, - "zone": "ca_nu_vat", + "zone": "ca_nu", "tag": "CA", "rates": [ { diff --git a/resources/tax_type/ca_on_hst.json b/resources/tax_type/ca_on_hst.json index 838e784..80a5b2b 100644 --- a/resources/tax_type/ca_on_hst.json +++ b/resources/tax_type/ca_on_hst.json @@ -2,7 +2,7 @@ "name": "Canada - Ontario", "generic_label": "HST", "display_inclusive": false, - "zone": "ca_on_vat", + "zone": "ca_on", "tag": "CA", "rates": [ { diff --git a/resources/tax_type/ca_pe_hst.json b/resources/tax_type/ca_pe_hst.json index e7763a9..0722b2a 100644 --- a/resources/tax_type/ca_pe_hst.json +++ b/resources/tax_type/ca_pe_hst.json @@ -2,7 +2,7 @@ "name": "Canada - Prince Edward Island", "generic_label": "HST", "display_inclusive": false, - "zone": "ca_pe_vat", + "zone": "ca_pe", "tag": "CA", "rates": [ { diff --git a/resources/tax_type/ca_qc_gst.json b/resources/tax_type/ca_qc_gst.json index c14961e..8c5a001 100644 --- a/resources/tax_type/ca_qc_gst.json +++ b/resources/tax_type/ca_qc_gst.json @@ -2,7 +2,7 @@ "name": "Canada - Quebec", "generic_label": "GST", "display_inclusive": false, - "zone": "ca_qc_vat", + "zone": "ca_qc", "tag": "CA", "rates": [ { diff --git a/resources/tax_type/ca_qc_qst.json b/resources/tax_type/ca_qc_qst.json index fa0a3ab..44f1574 100644 --- a/resources/tax_type/ca_qc_qst.json +++ b/resources/tax_type/ca_qc_qst.json @@ -2,7 +2,7 @@ "name": "Canada - Quebec", "generic_label": "QST", "display_inclusive": false, - "zone": "ca_qc_vat", + "zone": "ca_qc", "tag": "CA", "rates": [ { diff --git a/resources/tax_type/ca_sk_gst.json b/resources/tax_type/ca_sk_gst.json index f54f3e0..5bac878 100644 --- a/resources/tax_type/ca_sk_gst.json +++ b/resources/tax_type/ca_sk_gst.json @@ -2,7 +2,7 @@ "name": "Canada - Saskatchewan", "generic_label": "GST", "display_inclusive": false, - "zone": "ca_sk_vat", + "zone": "ca_sk", "tag": "CA", "rates": [ { diff --git a/resources/tax_type/ca_sk_pst.json b/resources/tax_type/ca_sk_pst.json index ded3858..2d21775 100644 --- a/resources/tax_type/ca_sk_pst.json +++ b/resources/tax_type/ca_sk_pst.json @@ -2,7 +2,7 @@ "name": "Canada - Saskatchewan", "generic_label": "PST", "display_inclusive": false, - "zone": "ca_sk_vat", + "zone": "ca_sk", "tag": "CA", "rates": [ { @@ -11,9 +11,9 @@ "default": true, "amounts": [ { - "id": "ca_sk_pst_standard_2013", + "id": "ca_sk_pst_standard_2006", "amount": 0.05, - "start_date": "2013-04-01" + "start_date": "2006-10-28" } ] } diff --git a/resources/tax_type/ca_yt_gst.json b/resources/tax_type/ca_yt_gst.json index 8a40116..1e9503e 100644 --- a/resources/tax_type/ca_yt_gst.json +++ b/resources/tax_type/ca_yt_gst.json @@ -2,7 +2,7 @@ "name": "Canada - Yukon", "generic_label": "GST", "display_inclusive": false, - "zone": "ca_yt_vat", + "zone": "ca_yt", "tag": "CA", "rates": [ { diff --git a/resources/zone/ca_ab_vat.json b/resources/zone/ca_ab.json similarity index 88% rename from resources/zone/ca_ab_vat.json rename to resources/zone/ca_ab.json index ef8f453..7cf6069 100644 --- a/resources/zone/ca_ab_vat.json +++ b/resources/zone/ca_ab.json @@ -4,7 +4,7 @@ "members": [ { "type": "country", - "id": "ca_ab_vat_0", + "id": "ca_ab", "name": "Canada - Alberta", "country_code": "CA", "administrative_area": "CA-AB" diff --git a/resources/zone/ca_bc_vat.json b/resources/zone/ca_bc.json similarity index 89% rename from resources/zone/ca_bc_vat.json rename to resources/zone/ca_bc.json index de410f7..5e1d82b 100644 --- a/resources/zone/ca_bc_vat.json +++ b/resources/zone/ca_bc.json @@ -4,7 +4,7 @@ "members": [ { "type": "country", - "id": "ca_bs_vat_0", + "id": "ca_bc", "name": "Canada - British Columbia", "country_code": "CA", "administrative_area": "CA-BC" diff --git a/resources/zone/ca_mb_vat.json b/resources/zone/ca_mb.json similarity index 88% rename from resources/zone/ca_mb_vat.json rename to resources/zone/ca_mb.json index 6e1993f..2222c01 100644 --- a/resources/zone/ca_mb_vat.json +++ b/resources/zone/ca_mb.json @@ -4,7 +4,7 @@ "members": [ { "type": "country", - "id": "ca_mb_vat_0", + "id": "ca_mb", "name": "Canada - Manitoba", "country_code": "CA", "administrative_area": "CA-MB" diff --git a/resources/zone/ca_nb_vat.json b/resources/zone/ca_nb.json similarity index 88% rename from resources/zone/ca_nb_vat.json rename to resources/zone/ca_nb.json index 116a6c0..b6df95d 100644 --- a/resources/zone/ca_nb_vat.json +++ b/resources/zone/ca_nb.json @@ -4,7 +4,7 @@ "members": [ { "type": "country", - "id": "ca_nb_vat_0", + "id": "ca_nb", "name": "Canada - New Brunswick", "country_code": "CA", "administrative_area": "CA-NB" diff --git a/resources/zone/ca_nl_vat.json b/resources/zone/ca_nl.json similarity index 89% rename from resources/zone/ca_nl_vat.json rename to resources/zone/ca_nl.json index df660a5..575a58c 100644 --- a/resources/zone/ca_nl_vat.json +++ b/resources/zone/ca_nl.json @@ -4,7 +4,7 @@ "members": [ { "type": "country", - "id": "ca_nl_vat_0", + "id": "ca_nl", "name": "Canada - Newfoundland and Labrador", "country_code": "CA", "administrative_area": "CA-NL" diff --git a/resources/zone/ca_ns_vat.json b/resources/zone/ca_ns.json similarity index 88% rename from resources/zone/ca_ns_vat.json rename to resources/zone/ca_ns.json index 482ebc9..2e01ccd 100644 --- a/resources/zone/ca_ns_vat.json +++ b/resources/zone/ca_ns.json @@ -4,7 +4,7 @@ "members": [ { "type": "country", - "id": "ca_ns_vat_0", + "id": "ca_ns", "name": "Canada - Nova Scotia", "country_code": "CA", "administrative_area": "CA-NS" diff --git a/resources/zone/ca_nt_vat.json b/resources/zone/ca_nt.json similarity index 89% rename from resources/zone/ca_nt_vat.json rename to resources/zone/ca_nt.json index 5083c8d..2eb8f26 100644 --- a/resources/zone/ca_nt_vat.json +++ b/resources/zone/ca_nt.json @@ -4,7 +4,7 @@ "members": [ { "type": "country", - "id": "ca_nt_vat_0", + "id": "ca_nt", "name": "Canada - Northwest Territories", "country_code": "CA", "administrative_area": "CA-NT" diff --git a/resources/zone/ca_nu_vat.json b/resources/zone/ca_nu.json similarity index 88% rename from resources/zone/ca_nu_vat.json rename to resources/zone/ca_nu.json index 1a016df..d52ae3e 100644 --- a/resources/zone/ca_nu_vat.json +++ b/resources/zone/ca_nu.json @@ -4,7 +4,7 @@ "members": [ { "type": "country", - "id": "ca_ns_vat_0", + "id": "ca_ns", "name": "Canada - Nunavut", "country_code": "CA", "administrative_area": "CA-NU" diff --git a/resources/zone/ca_on_vat.json b/resources/zone/ca_on.json similarity index 88% rename from resources/zone/ca_on_vat.json rename to resources/zone/ca_on.json index e723cfc..188bec5 100644 --- a/resources/zone/ca_on_vat.json +++ b/resources/zone/ca_on.json @@ -4,7 +4,7 @@ "members": [ { "type": "country", - "id": "ca_on_vat_0", + "id": "ca_on", "name": "Canada - Ontario", "country_code": "CA", "administrative_area": "CA-ON" diff --git a/resources/zone/ca_pe_vat.json b/resources/zone/ca_pe.json similarity index 89% rename from resources/zone/ca_pe_vat.json rename to resources/zone/ca_pe.json index 7d12965..6006ee0 100644 --- a/resources/zone/ca_pe_vat.json +++ b/resources/zone/ca_pe.json @@ -4,7 +4,7 @@ "members": [ { "type": "country", - "id": "ca_pe_vat_0", + "id": "ca_pe", "name": "Canada - Prince Edward Island", "country_code": "CA", "administrative_area": "CA-PE" diff --git a/resources/zone/ca_qc_vat.json b/resources/zone/ca_qc.json similarity index 88% rename from resources/zone/ca_qc_vat.json rename to resources/zone/ca_qc.json index d357231..ca4dc6b 100644 --- a/resources/zone/ca_qc_vat.json +++ b/resources/zone/ca_qc.json @@ -4,7 +4,7 @@ "members": [ { "type": "country", - "id": "ca_qc_vat_0", + "id": "ca_qc", "name": "Canada - Quebec", "country_code": "CA", "administrative_area": "CA-QC" diff --git a/resources/zone/ca_sk_vat.json b/resources/zone/ca_sk.json similarity index 88% rename from resources/zone/ca_sk_vat.json rename to resources/zone/ca_sk.json index 3edf605..0723fbe 100644 --- a/resources/zone/ca_sk_vat.json +++ b/resources/zone/ca_sk.json @@ -4,7 +4,7 @@ "members": [ { "type": "country", - "id": "ca_sk_vat_0", + "id": "ca_sk", "name": "Canada - Saskatchewan", "country_code": "CA", "administrative_area": "CA-SK" diff --git a/resources/zone/ca_yt_vat.json b/resources/zone/ca_yt.json similarity index 88% rename from resources/zone/ca_yt_vat.json rename to resources/zone/ca_yt.json index 18b1d7d..9d8c232 100644 --- a/resources/zone/ca_yt_vat.json +++ b/resources/zone/ca_yt.json @@ -4,7 +4,7 @@ "members": [ { "type": "country", - "id": "ca_yt_vat_0", + "id": "ca_yt", "name": "Canada - Yukon", "country_code": "CA", "administrative_area": "CA-YT" diff --git a/tests/Resolver/TaxType/CanadaTaxTypeResolverTest.php b/tests/Resolver/TaxType/CanadaTaxTypeResolverTest.php index dbe9fa7..e2851c1 100644 --- a/tests/Resolver/TaxType/CanadaTaxTypeResolverTest.php +++ b/tests/Resolver/TaxType/CanadaTaxTypeResolverTest.php @@ -161,11 +161,11 @@ public function testConstructor() * @covers ::resolve * @covers ::getTaxTypes * - * @uses \CommerceGuys\Tax\Resolver\TaxType\StoreRegistrationCheckerTrait - * @uses \CommerceGuys\Tax\Repository\TaxTypeRepository - * @uses \CommerceGuys\Tax\Model\TaxType - * @uses \CommerceGuys\Tax\Model\TaxRate - * @uses \CommerceGuys\Tax\Model\TaxRateAmount + * @uses \CommerceGuys\Tax\Resolver\TaxType\StoreRegistrationCheckerTrait + * @uses \CommerceGuys\Tax\Repository\TaxTypeRepository + * @uses \CommerceGuys\Tax\Model\TaxType + * @uses \CommerceGuys\Tax\Model\TaxRate + * @uses \CommerceGuys\Tax\Model\TaxRateAmount * @depends testConstructor */ public function testResolver($resolver) From 201abc9d3b6debdb829961db14d9caab13c375bf Mon Sep 17 00:00:00 2001 From: Thomas Faurbye Nielsen Date: Fri, 15 Jan 2016 15:04:17 +0100 Subject: [PATCH 5/7] Remove display_inclusive: false, as it's the default. --- resources/tax_type/ca_ab_gst.json | 1 - resources/tax_type/ca_bc_gst.json | 1 - resources/tax_type/ca_bc_pst.json | 1 - resources/tax_type/ca_mb_gst.json | 1 - resources/tax_type/ca_mb_pst.json | 1 - resources/tax_type/ca_nb_hst.json | 1 - resources/tax_type/ca_nl_hst.json | 1 - resources/tax_type/ca_ns_hst.json | 1 - resources/tax_type/ca_nt_hst.json | 1 - resources/tax_type/ca_nu_gst.json | 1 - resources/tax_type/ca_on_hst.json | 1 - resources/tax_type/ca_pe_hst.json | 1 - resources/tax_type/ca_qc_gst.json | 1 - resources/tax_type/ca_qc_qst.json | 1 - resources/tax_type/ca_sk_gst.json | 1 - resources/tax_type/ca_sk_pst.json | 1 - resources/tax_type/ca_yt_gst.json | 1 - 17 files changed, 17 deletions(-) diff --git a/resources/tax_type/ca_ab_gst.json b/resources/tax_type/ca_ab_gst.json index 5339013..6c6d290 100644 --- a/resources/tax_type/ca_ab_gst.json +++ b/resources/tax_type/ca_ab_gst.json @@ -1,7 +1,6 @@ { "name": "Canada - Alberta", "generic_label": "GST", - "display_inclusive": false, "zone": "ca_ab", "tag": "CA", "rates": [ diff --git a/resources/tax_type/ca_bc_gst.json b/resources/tax_type/ca_bc_gst.json index b85c9f8..cf45c1f 100644 --- a/resources/tax_type/ca_bc_gst.json +++ b/resources/tax_type/ca_bc_gst.json @@ -1,7 +1,6 @@ { "name": "Canada - British Columbia", "generic_label": "GST", - "display_inclusive": false, "zone": "ca_bc", "tag": "CA", "rates": [ diff --git a/resources/tax_type/ca_bc_pst.json b/resources/tax_type/ca_bc_pst.json index c7fd071..105011b 100644 --- a/resources/tax_type/ca_bc_pst.json +++ b/resources/tax_type/ca_bc_pst.json @@ -1,7 +1,6 @@ { "name": "Canada - British Columbia", "generic_label": "PST", - "display_inclusive": false, "zone": "ca_bc", "tag": "CA", "rates": [ diff --git a/resources/tax_type/ca_mb_gst.json b/resources/tax_type/ca_mb_gst.json index c2fedea..d2ce5d0 100644 --- a/resources/tax_type/ca_mb_gst.json +++ b/resources/tax_type/ca_mb_gst.json @@ -1,7 +1,6 @@ { "name": "Canada - Manitoba", "generic_label": "GST", - "display_inclusive": false, "zone": "ca_mb", "tag": "CA", "rates": [ diff --git a/resources/tax_type/ca_mb_pst.json b/resources/tax_type/ca_mb_pst.json index 37ce27f..a568f4c 100644 --- a/resources/tax_type/ca_mb_pst.json +++ b/resources/tax_type/ca_mb_pst.json @@ -1,7 +1,6 @@ { "name": "Canada - Manitoba", "generic_label": "PST", - "display_inclusive": false, "zone": "ca_mb", "tag": "CA", "rates": [ diff --git a/resources/tax_type/ca_nb_hst.json b/resources/tax_type/ca_nb_hst.json index b319939..57d8b7f 100644 --- a/resources/tax_type/ca_nb_hst.json +++ b/resources/tax_type/ca_nb_hst.json @@ -1,7 +1,6 @@ { "name": "Canada - New Brunswick", "generic_label": "HST", - "display_inclusive": false, "zone": "ca_nb", "tag": "CA", "compound": false, diff --git a/resources/tax_type/ca_nl_hst.json b/resources/tax_type/ca_nl_hst.json index 5eb6986..2369357 100644 --- a/resources/tax_type/ca_nl_hst.json +++ b/resources/tax_type/ca_nl_hst.json @@ -1,7 +1,6 @@ { "name": "Canada - Newfoundland and Labrador", "generic_label": "HST", - "display_inclusive": false, "zone": "ca_nl", "tag": "CA", "rates": [ diff --git a/resources/tax_type/ca_ns_hst.json b/resources/tax_type/ca_ns_hst.json index c4a96be..c50714b 100644 --- a/resources/tax_type/ca_ns_hst.json +++ b/resources/tax_type/ca_ns_hst.json @@ -1,7 +1,6 @@ { "name": "Canada - Nova Scotia", "generic_label": "HST", - "display_inclusive": false, "zone": "ca_ns", "tag": "CA", "rates": [ diff --git a/resources/tax_type/ca_nt_hst.json b/resources/tax_type/ca_nt_hst.json index 17988d1..d8dd5f2 100644 --- a/resources/tax_type/ca_nt_hst.json +++ b/resources/tax_type/ca_nt_hst.json @@ -1,7 +1,6 @@ { "name": "Canada - Northwest Territories", "generic_label": "GST", - "display_inclusive": false, "zone": "ca_nt", "tag": "CA", "rates": [ diff --git a/resources/tax_type/ca_nu_gst.json b/resources/tax_type/ca_nu_gst.json index d325082..a8d72cf 100644 --- a/resources/tax_type/ca_nu_gst.json +++ b/resources/tax_type/ca_nu_gst.json @@ -1,7 +1,6 @@ { "name": "Canada - Nunavut", "generic_label": "GST", - "display_inclusive": false, "zone": "ca_nu", "tag": "CA", "rates": [ diff --git a/resources/tax_type/ca_on_hst.json b/resources/tax_type/ca_on_hst.json index 80a5b2b..d8f2d28 100644 --- a/resources/tax_type/ca_on_hst.json +++ b/resources/tax_type/ca_on_hst.json @@ -1,7 +1,6 @@ { "name": "Canada - Ontario", "generic_label": "HST", - "display_inclusive": false, "zone": "ca_on", "tag": "CA", "rates": [ diff --git a/resources/tax_type/ca_pe_hst.json b/resources/tax_type/ca_pe_hst.json index 0722b2a..ffd73d4 100644 --- a/resources/tax_type/ca_pe_hst.json +++ b/resources/tax_type/ca_pe_hst.json @@ -1,7 +1,6 @@ { "name": "Canada - Prince Edward Island", "generic_label": "HST", - "display_inclusive": false, "zone": "ca_pe", "tag": "CA", "rates": [ diff --git a/resources/tax_type/ca_qc_gst.json b/resources/tax_type/ca_qc_gst.json index 8c5a001..359fdf2 100644 --- a/resources/tax_type/ca_qc_gst.json +++ b/resources/tax_type/ca_qc_gst.json @@ -1,7 +1,6 @@ { "name": "Canada - Quebec", "generic_label": "GST", - "display_inclusive": false, "zone": "ca_qc", "tag": "CA", "rates": [ diff --git a/resources/tax_type/ca_qc_qst.json b/resources/tax_type/ca_qc_qst.json index 44f1574..9acf684 100644 --- a/resources/tax_type/ca_qc_qst.json +++ b/resources/tax_type/ca_qc_qst.json @@ -1,7 +1,6 @@ { "name": "Canada - Quebec", "generic_label": "QST", - "display_inclusive": false, "zone": "ca_qc", "tag": "CA", "rates": [ diff --git a/resources/tax_type/ca_sk_gst.json b/resources/tax_type/ca_sk_gst.json index 5bac878..820d870 100644 --- a/resources/tax_type/ca_sk_gst.json +++ b/resources/tax_type/ca_sk_gst.json @@ -1,7 +1,6 @@ { "name": "Canada - Saskatchewan", "generic_label": "GST", - "display_inclusive": false, "zone": "ca_sk", "tag": "CA", "rates": [ diff --git a/resources/tax_type/ca_sk_pst.json b/resources/tax_type/ca_sk_pst.json index 2d21775..ef692ce 100644 --- a/resources/tax_type/ca_sk_pst.json +++ b/resources/tax_type/ca_sk_pst.json @@ -1,7 +1,6 @@ { "name": "Canada - Saskatchewan", "generic_label": "PST", - "display_inclusive": false, "zone": "ca_sk", "tag": "CA", "rates": [ diff --git a/resources/tax_type/ca_yt_gst.json b/resources/tax_type/ca_yt_gst.json index 1e9503e..c8d9657 100644 --- a/resources/tax_type/ca_yt_gst.json +++ b/resources/tax_type/ca_yt_gst.json @@ -1,7 +1,6 @@ { "name": "Canada - Yukon", "generic_label": "GST", - "display_inclusive": false, "zone": "ca_yt", "tag": "CA", "rates": [ From e4c6f5c35f11205b336f65aa3c8cc3d26e6ce924 Mon Sep 17 00:00:00 2001 From: Thomas Faurbye Nielsen Date: Fri, 15 Jan 2016 15:04:58 +0100 Subject: [PATCH 6/7] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ae54e81..55f6005 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "archanium/tax", + "name": "commerceguys/tax", "type": "library", "description": "Tax library with a flexible data model, predefined tax rates, powerful resolving logic.", "keywords": ["tax", "vat"], From 65ff413750b0f86f62bdbf083c83eee5452c345c Mon Sep 17 00:00:00 2001 From: Thomas Faurbye Nielsen Date: Fri, 1 Apr 2016 16:32:26 +0200 Subject: [PATCH 7/7] Remove some references to VAT. --- tests/Resolver/TaxType/CanadaTaxTypeResolverTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Resolver/TaxType/CanadaTaxTypeResolverTest.php b/tests/Resolver/TaxType/CanadaTaxTypeResolverTest.php index e2851c1..fd97895 100644 --- a/tests/Resolver/TaxType/CanadaTaxTypeResolverTest.php +++ b/tests/Resolver/TaxType/CanadaTaxTypeResolverTest.php @@ -61,7 +61,7 @@ class CanadaTaxTypeResolverTest extends \PHPUnit_Framework_TestCase "name" => "Manitoba GST", "generic_label" => "gst", "tag" => "CA", - "zone" => "ca_mb_vat", + "zone" => "ca_mb", "rates" => [ [ "id" => "ca_mb_gst", @@ -75,7 +75,7 @@ class CanadaTaxTypeResolverTest extends \PHPUnit_Framework_TestCase "name" => "Manitoba PST", "generic_label" => "pst", "tag" => "CA", - "zone" => "ca_mb_vat", + "zone" => "ca_mb", "rates" => [ [ "id" => "ca_mb_pst", @@ -117,7 +117,7 @@ class CanadaTaxTypeResolverTest extends \PHPUnit_Framework_TestCase ], ], ], - 'ca_mb_vat' => [ + 'ca_mb' => [ 'name' => 'Manitoba Tax', 'members' => [ [