grandnode / grandnode2

Open-Source eCommerce Platform on .NET Core, MongoDB, AWS DocumentDB, Azure CosmosDB, LiteDB & Vue.js
https://grandnode.com/
GNU General Public License v3.0
1.09k stars 445 forks source link

Delete vs Cancel order's item behaviour on partially shipped orders #498

Open TheFlo opened 1 month ago

TheFlo commented 1 month ago

Hi GrandNode team,

Seems that cancelling or deleting an order's item don't have the same behaviour on the order's shipping status when the order is in "PartiallyShipped" status.

Looking at the code for the cancel order item we have : https://github.com/grandnode/grandnode2/blob/b7e201d02cc78d60a428d7f594f8d505f6f16fcb/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/CancelOrderItemCommandHandler.cs#L66-L73 It handles both the "Shipped" and "Delivered" status.

Whereas for the delete order item, only the "Delivered" status is handled : https://github.com/grandnode/grandnode2/blob/b7e201d02cc78d60a428d7f594f8d505f6f16fcb/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/DeleteOrderItemCommandHandler.cs#L91-L93

Is this behaviour different by design or a well hidden bug ?

Kind regards,

KrzysztofPajak commented 1 month ago

@TheFlo thanks, it's looks like a bug.