white-nl / commerce-mollie-plus

Mollie Klarna integration for Craft Commerce
Other
3 stars 5 forks source link

Orders with other tax rate have incorrect unit prices in the resulting Mollie order #9

Closed rbrv closed 2 years ago

rbrv commented 2 years ago

Description

We have set up 2 Tax Zones and 2 Tax Rates in Craft commerce

Screenshot 2022-06-02 at 11 22 47

This enables us to have:

Example

Craft commerce order Mollie order
2022-06-02_11-03_2 2022-06-02_11-03_1_2

Additional info

Latest Craft 3 and Craft Commerce 3 and latest Mollie plus plugin voor Craft Commerce 3

WHITE-developer commented 2 years ago

Hi @rbrv, The unit price in Mollie should be The price of a single item including VAT in the order line.. In your case that is €121+€21 = €142, After that the discount of €21 is applied. In the discount adjuster Craft isn't adding any data that it is a discount applied by a negative tax adjuster, so we have now way of ignoring this.

But if I see correctly, all your prices in Craft are already included VAT? Then if you would remove the Remove from price on your 21% NL tax rate and add the Include in price on your 21% EU tax rate, then for this order you would only get 1 adjuster what would be a tax adjuster for 21% EU included. If you would have a EU order with valid Tax ID you would only get 1 adjuster what would be a discount adjuster that would remove 21% VAT

An example from on of our shops: VAT Settings Non business EU order Business order with valid Tax ID NL order
image image image image
rbrv commented 2 years ago

@WHITE-developer I've just implemented your suggestions, and it's working brilliantly! Thanks!