David E Jones wrote:
That does sound like a good solution Ean.
Currently the only way to refund against an order is to choose an OrderItem
(through ReturnItem) or OrderAdjustment (through ReturnAdjustment) and attach
the refund to that.
I was thinking you could use ReturnItem for this, but it has a FK to OrderItem
(ie you can't populate the orderId and leave the orderItemSeqId null), and
while I haven't looked into it I think the code for returns depends on a
productId being present for a ReturnItem and such.
On the other hand, it might be easier to change the return code to allow a
ReturnItem to not have a orderItemSeqId than it would be to add the orderId and
related functionality to the ReturnAdjustment.
I have an implementation here that will successfully return an
adjustment only return all the way through to crediting a billing
account. I am having trouble with having the return payment capture to
an invoice but I'm not sure whether that is related. Adding the orderId
was pretty straightforward.