Since #3521071: The provided prices have mismatched currencies, OrderForm::validateForm() compares each order item's unit price currency. A NULL unit price on the first item is skipped via empty($currency_code), but a NULL unit price on any later item is compared as $currency_code !== NULL and raises "This order contains items in different currencies", even though no mismatch exists.

Steps to reproduce: edit an existing order whose items have a unit price, add an order item that has no unit price (e.g. a variation without a price, on a non-draft order), save.

Proposed resolution: skip order items with a NULL unit price when determining and comparing the currency.

Issue fork commerce-3627381

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

intrafusion created an issue. See original summary.

intrafusion’s picture

Status: Active » Needs review

jsacksick made their first commit to this issue’s fork.

jsacksick’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.