driesvints / vat-calculator

Handle all the hard stuff related to EU MOSS tax/vat regulations, the way it should be.
MIT License
1.2k stars 88 forks source link

Added functionality for high and low tax types #49

Closed SebastiaanKloos closed 6 years ago

SebastiaanKloos commented 7 years ago

In the Netherlands we have more than one tax rate.

High: 21% and Low: 6%.

https://www.belastingdienst.nl/wps/wcm/connect/bldcontentnl/belastingdienst/zakelijk/internationaal/btw_voor_buitenlandse_ondernemers/btw_berekenen/btw_tarieven/

I've added this functionality to this repository to help Dutch users.

mpociot commented 7 years ago

Thank you! Can you add a test for this too?

codecov-io commented 7 years ago

Codecov Report

Merging #49 into master will increase coverage by 0.05%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #49      +/-   ##
==========================================
+ Coverage   94.66%   94.71%   +0.05%     
==========================================
  Files           5        5              
  Lines         206      208       +2     
==========================================
+ Hits          195      197       +2     
  Misses         11       11
Impacted Files Coverage Δ
src/Mpociot/VatCalculator/VatCalculator.php 93.23% <100%> (+0.1%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 86776da...5e688a7. Read the comment docs.

SebastiaanKloos commented 7 years ago

@mpociot I'll try to add a test to it!

SebastiaanKloos commented 7 years ago

I've added some tests. @mpociot

SebastiaanKloos commented 7 years ago

@mpociot Can you please review my code and merge if accepted?

mxmtsk commented 6 years ago

I was just about to open an issue for this. Any updates on when this will be merged? Germany also has two tax types, 19% and 7%

SebastiaanKloos commented 6 years ago

@mxmtsk no response yet from moderators

mxmtsk commented 6 years ago

@mpociot Any thoughts on this, it's been a while? :) @SebastiaanKloos would you consider adding another checkin to make it more complete and reflect Germany also?

            'rate'   => 0.19,
            'rates' => [
                'high' => 0.19,
                'low' => 0.07,
            ],