Advanced Order Manager (AOM)
Changelog

Version 1.2.0 - 28 October 2026

Added
- Manual Discount / Credit mode for custom product lines on both Create Order
  and Edit Order.
- Support for deliberately entered negative custom-product values without
  permitting negative catalogue-product prices.
- Precision-safe manual-credit handling: the entered VAT-inclusive amount is
  authoritative and AOM derives the four-decimal ex-VAT value server-side.
- Optional Phoenix Option Types v2 Text and Text area support. AOM now displays
  an entry field rather than the reserved [Customer supplied value] dropdown,
  restores entered text on edit, honours the configured length and price
  adjustment, and validates the option server-side.
- Clearer Edit Order search guidance and a dedicated replacement-customer
  search shown only after an order is loaded and its customer fields unlocked.
- Optional Fancy Invoice replacement file, separately packaged, for correct
  VAT-inclusive display of negative product lines.

Fixed
- The saved shipping-method title is retained and displayed when an existing
  order is reopened in AOM.
- Existing catalogue-product weights are restored when an order is loaded and
  supplied correctly to shipping-module quotations.
- Manual credits now participate correctly in subtotal, VAT and grand-total
  calculations in the browser and on the server.
- Manual-credit values remain stable through repeated edits instead of losing
  precision between gross and net calculations.
- Customer-entered option text is escaped when displayed in AOM.
- Stale customer-search responses can no longer alter an order after the
  replacement-customer search has been locked or hidden.

Compatibility and safety
- No Phoenix core changes or AOM database tables are introduced.
- Discount Codes 6.3 support remains optional and separate from manual-credit
  lines; manual credits do not alter discount-code usage records.
- Option Types v2 support is feature-detected. Standard Phoenix attributes
  continue to use the existing selector when that addon is absent.
- AOM V1.2 supports Option Types v2 Text and Text area fields; customer file
  uploads remain outside the AOM workflow.
- The Fancy Invoice file is optional and must not be installed on shops that
  do not use that separate invoice addon.

Version 1.1.0 - 11 August 2026

Added
- Full optional compatibility with a separately supplied Discount Codes 6.3
  addon for CE Phoenix Cart 1.1.0.6 / PHP 8.2, with no Phoenix core changes.
- Discount Code controls on AOM create and edit screens when the compatible
  addon is detected.
- Detection and display of an existing order's discount code and ot_discount
  total.
- Live discount preview, VAT correction, Total Tax and Grand Total updates.
- Server-side validation of discount status, dates, minimum order, customer
  eligibility, newsletter requirement, customer order number, product,
  category and manufacturer eligibility, excluded products, specials,
  usage limits and maximum eligible product quantity.
- Support for fixed-value, percentage, mixed-VAT and supported shipping
  discounts.
- Safe creation, replacement and removal of ot_discount rows and recalculation
  of ot_total.
- Usage-record reconciliation when a discount code is added, changed or
  removed.
- Automated discount tests, including support for renamed Phoenix admin
  directories.

Fixed
- Editing an existing discounted order no longer removes its ot_discount row
  or leaves orders.discount_codes inconsistent.
- Repeatedly saving an order with the same discount no longer increases the
  code's usage count.
- Discount VAT is now deducted from Total Tax and the validated discount is
  included in the browser and server Grand Total.
- Existing Phoenix gross shipping values are reconciled correctly when a
  discounted order is reopened, preventing VAT being counted twice.
- Per Item shipping is given the item-count and physical-order context needed
  to return its configured quotation.
- Currency output now renders configured HTML entities correctly instead of
  displaying literal entity text such as &nbsp;.

Safety
- Browser-supplied discount amounts are never trusted.
- If an existing discount or its usage record cannot be safely recalculated,
  AOM stops the save and displays a warning rather than silently removing or
  altering the discount.
- AOM continues to operate normally when Discount Codes 6.3 is not installed;
  the discount controls are simply unavailable.

Version 1.0.0 - 4 August 2026

- First public release of Advanced Order Manager.
- Added complete manual/MOTO order creation and existing-order editing.
- Added customer and order search, catalogue products, native attributes,
  custom items, VAT, shipping, payment, stock reconciliation, email, status
  history, invoice and packing-slip workflows.
- Implemented as an addon and hook package without Phoenix core changes.
