Skip to content

fix: fixes #307 - #308

Merged
Naoray merged 1 commit into
mollie:mainfrom
Naoray:fix/307-percentage-discount-handler
Feb 9, 2026
Merged

fix: fixes #307#308
Naoray merged 1 commit into
mollie:mainfrom
Naoray:fix/307-percentage-discount-handler

Conversation

@Naoray

@Naoray Naoray commented Dec 23, 2025

Copy link
Copy Markdown
Collaborator

Problem

When applying a percentage coupon (e.g., 50% off), the discount was calculated from the total price including tax (e.g., 50% of €181.50 = -€90.75) instead of the subtotal excluding tax (50% of €150.00 = -€75.00). This led to:

  • Incorrect subtotal calculations
  • Incorrect VAT/tax calculations
  • Incorrect invoice totals (or coincidentally correct totals with wrong breakdowns)

s. #307 for detailed description of the issue

Solution

Calculate unit price of the coupon using $item->getSubtotal() instead of $item->getTotal()

@Naoray
Naoray merged commit 2e101d9 into mollie:main Feb 9, 2026
12 checks passed
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

Successfully merging this pull request may close these issues.

1 participant