Feature: #916 - Cancellations and returns with lines
See Issue 916
Description
Ordered products can be canceled before they are shipped and returned after they are shipped, both for a part of the ordered count. This change adds the data model, like Feature: #902 - Shipments with lines did for shipments. Creating cancellations and returns, the quantities, deriving the shipping status, restocking and the backend UI follow separately.
tx_: order item, type (cart_ domain_ model_ order_ return cancellationorreturn), status, reason, return number, received date, the reason why a product was canceled or returned although it is not cancelable or not returnable, and a note.tx_: the products of a cancellation or return, the count of an ordered product, whether it is restocked and its condition (cart_ domain_ model_ order_ return_ product new,usedordamaged).
Cancellations and returns are stored in one table, because they share their
fields and their products; "return" alone is a reserved word in PHP and
MySQL. They are no Extbase models. The readonly objects
\Extcode\ and
\Extcode\ are read and
stored by \Extcode\.
The type is the enum \Extcode\,
the condition the enum \Extcode\.
The TCA of both tables is read only, the cancellations and returns are shown
in the order item record.
New status (see Payment and shipping status):
- The new type
cancellationwith the statusrequested,acceptedandrejected(\Extcode\).Cart\ Domain\ Order\ Fulfillment\ Cancellation Status - The new type
returnwith the statusrequested,received,acceptedandrejected(\Extcode\).Cart\ Domain\ Order\ Fulfillment\ Return Status - The shipping status
canceled(all ordered products are canceled).
Impact
The database schema has to be updated. Nothing changes for existing orders.
The select of the shipping status in the backend module offers the new status
canceled. Own shipping status which are registered after shipped are
listed after canceled now.
\Extcode\ has the new cases
Cancellation and Return. Code that matches all cases of the enum has to
handle them.