Invoice price splitter needed

Created on 4 April 2023, about 1 year ago

Problem/Motivation

The commerce order splitter can't be used to split invoice item adjustments, as it expects OrderInterface and OrderItemInterface.

Proposed resolution

Provide an invoice price splitter. (Patch to follow.)

✨ Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States TomTech

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @TomTech
  • Status changed to Needs review about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States TomTech

    This patch clones the Order PriceSplitter class and interface, and modifies it to support InvoiceInterface and InvoiceItemInterface.

    It also replicates the PriceSplitterTest class to provide test coverage.

    (It also adds a .gitignore file, also copied from commerce core.)

  • πŸ‡ΊπŸ‡ΈUnited States TomTech

    Try that one more time with the complete diff on the patch. :)

  • πŸ‡ΊπŸ‡ΈUnited States TomTech
  • πŸ‡ΊπŸ‡ΈUnited States TomTech

    There is actually an issue in the order price splitter when splitting a negative fixed amount, that was carried over into this implementation.

    This patch addresses that issue, along with adding an additional test case to test that scenario.

    I'll also be submitting a similar patch in commerce core to keep them in sync.

Production build 0.69.0 2024