Prevent Negative Inventory #21

Open
opened 2026-02-25 18:15:40 +00:00 by Vylpes · 0 comments
Owner

Epic: #4


As a seller,
I want the system to prevent me from setting on-hand quantity below zero,
so that my inventory data stays accurate and trustworthy.

Blocked by: STORY-2.1 (Create a Product), STORY-3.4 (Inline Edit Available Quantity)

Acceptance criteria:

  • Entering a negative quantity on a product is rejected with a validation error
  • Available quantity on a listing cannot be set below 0 via inline edit

Subtasks:

  • Add database-level constraint (qty ≥ 0) on listing available_quantity and product on_hand_qty
  • Add application-level validation before any write to these fields
  • Treat import rows with qty < 0 as errors (skip row, include in errors CSV with reason)
  • Return clear user-facing validation error messages on inline edit attempts
  • Write automated tests (unit: validation; integration: DB constraint enforced, import error logged)
  • Write/update documentation
Epic: #4 --- **As a** seller, **I want** the system to prevent me from setting on-hand quantity below zero, **so that** my inventory data stays accurate and trustworthy. **Blocked by:** STORY-2.1 (Create a Product), STORY-3.4 (Inline Edit Available Quantity) **Acceptance criteria:** - Entering a negative quantity on a product is rejected with a validation error - Available quantity on a listing cannot be set below 0 via inline edit **Subtasks:** - [ ] Add database-level constraint (qty ≥ 0) on listing `available_quantity` and product `on_hand_qty` - [ ] Add application-level validation before any write to these fields - [ ] Treat import rows with qty < 0 as errors (skip row, include in errors CSV with reason) - [ ] Return clear user-facing validation error messages on inline edit attempts - [ ] Write automated tests (unit: validation; integration: DB constraint enforced, import error logged) - [ ] Write/update documentation
Vylpes added this to the (deleted) milestone 2026-02-25 18:15:40 +00:00
Vylpes modified the milestone from (deleted) to 0.1.0 2026-03-02 17:23:35 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
RabbitLabs/droplet-next#21
No description provided.