Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VAT in Norway #97

Open
mmihalev opened this issue Oct 15, 2024 · 0 comments
Open

VAT in Norway #97

mmihalev opened this issue Oct 15, 2024 · 0 comments

Comments

@mmihalev
Copy link

Hello,
The code bellow produces empty results var_dump($amounts) when store and customer addresses are in Norway.
Am I doing something wrong here?

$taxTypeRepository = new TaxTypeRepository();
$chainTaxTypeResolver = new ChainTaxTypeResolver();
$chainTaxTypeResolver->addResolver(new CanadaTaxTypeResolver($taxTypeRepository));
$chainTaxTypeResolver->addResolver(new EuTaxTypeResolver($taxTypeRepository));
$chainTaxTypeResolver->addResolver(new DefaultTaxTypeResolver($taxTypeRepository));
$chainTaxRateResolver = new ChainTaxRateResolver();
$chainTaxRateResolver->addResolver(new DefaultTaxRateResolver());
$resolver = new TaxResolver($chainTaxTypeResolver, $chainTaxRateResolver);

$customerAddress = new Address();
$storeAddress = new Address();

$storeAddress = $storeAddress->withCountryCode('NO');
$customerAddress = $customerAddress->withCountryCode('NO');

$context = new Context($customerAddress, $storeAddress);
$taxable = new MyTaxable();

$amounts = $resolver->resolveAmounts($taxable, $context);
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

No branches or pull requests

1 participant