Skip to main content

Business systems

Inventory deduction: settle the rules before writing code

Negative stock is a rules problem, not a coding problem. Define when stock is deducted, how it is reserved and how differences are handled.

English summary. The full project note is published in Chinese.

Four questions first

When is stock deducted: on order, on approval or on dispatch? Is stock reserved or blocked, and how is it released on cancellation? Are negatives allowed, and who approves them? How are stocktake, returns and gifts handled?

One movement ledger

We listed every action that changes stock with its trigger, quantity impact and approver, then defined document states and validation points. Every change writes a movement record with source document, operator and before/after quantity.

The outcome

Negative stock stopped appearing. More importantly, when returns and transfers were added later, the client could place each new action under an existing rule instead of reopening the discussion.

Read the full note in Chinese

Does this resemble a problem you are facing?

Describe your current process and systems. We will give an initial view on scope and delivery order.