Fixes #13625 --- > [!NOTE] > Ensure `reserved_quantity` is adjusted when deleting reservation items via `deleteReservationItems`, with new integration tests covering deletion and inventory updates. > > - **Inventory Module Service (`packages/modules/inventory/src/services/inventory-module.ts`)**: > - Add `deleteReservationItems` API (and transactional `_` variant) that hard-deletes reservations, then updates related inventory levels via `adjustInventoryLevelsForReservationsDeletion`. > - Wire through event emission/manager decorators consistent with existing patterns. > - **Integration Tests (`packages/modules/inventory/integration-tests/__tests__/inventory-module-service.spec.ts`)**: > - Add tests for `deleteReservationItems` to verify deletion by id and `reserved_quantity` adjustments on inventory levels. > - Minor import update to include `ReservationItemDTO`. > - **Changeset**: > - Patch release note for `@medusajs/inventory` documenting the fix. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit ac6641a9ec9543115504407f708f81bd427c3444. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup>
179 B
179 B
@medusajs/inventory
| @medusajs/inventory |
|---|
| patch |
fix(inventory): Adjust inventory level required_quantity when reservation item is deleted through deleteReservationItems from module service