mollie / spree-mollie-gateway

Mollie payments for Spree Commerce.
https://www.mollie.com
16 stars 23 forks source link

Only use eligible adjustments to calculate discount and vat amounts f… #74

Closed sekretarot closed 5 years ago

sekretarot commented 5 years ago

…or line items

sekretarot commented 5 years ago

Using all adjustments for line items with multiple promotions causes a mismatch in the order totals and Mollie totals since Spree uses only the eligible adjustments for the calculation while Mollie uses all of them.

vernondegoede commented 5 years ago

@Oldharlem Can you take a look? 👍

Oldharlem commented 5 years ago

@sekretarot has a point here. Spree applies the best value promotion when multiple are applicable. In the end the eligible scope returns the promotions that have been applied.

Tested with multiple applicable promotions and works as expected.