By Isaac Muthui, CEO, Tamalaki Business Network Ltd. Originally published at factoraerp.com.
If you build inventory or ERP software for manufacturers, here is a failure mode worth designing out: raw material is booked into free stock before anyone has finished receiving checks, so production can consume a lot that should have been held or rejected at the gate.
In small food and agro factories in Kenya, where I work, the weak point is rarely "we have no idea that intake matters." The weak point is that accept / hold / reject lives on a clipboard (or in a chat) while the quantity row in the system already looks available.
This post covers how to model goods receipt, lot status and quarantine so the system enforces the gate, plus the eight-point operational checklist that receiving teams run. The checklist is the spec; the data model is how you enforce it.
Model receiving as a decision, not a quantity bump
A common anti-pattern:
- User enters a purchase receipt.
- Quantity increases in the default store location.
- Optional
notesfield mentions "COA pending" or "bags dirty." - MRP, batching and picking all read the same available quantity.
The note is ignored. The lot is already in a blend sheet.
A sturdier approach:
-
Receipt lines carry lot identity. Every received quantity has
lot_id(or creates one) with supplier lot code, manufacture/expiry dates where required, and link to PO line. -
Each lot has a receiving / QA status with an explicit set, for example
PENDING_RECEIPT,ACCEPTED,ON_HOLD,QUARANTINED,REJECTED. -
Pending is the default at GRN. When the truck is booked in, status is not
ACCEPTEDuntil the intake checks complete. -
Available-for-production excludes non-accepted lots. Production issues, backflush and reservation queries only see
ACCEPTED(or your equivalent released-for-use status). Enforce this in the shared stock view every consumer uses. - Quarantine is location + status. Rejected or held lots move to a quarantine location and a non-available status. Either alone is not enough.
- Transitions are audited. Who accepted, held or rejected; when; against which checklist / COA reference.
Illustrative sketch (not a production schema):
CREATE TYPE receipt_lot_status AS ENUM (
'PENDING_RECEIPT', 'ACCEPTED', 'ON_HOLD', 'QUARANTINED', 'REJECTED'
);
CREATE TABLE supplier_lot (
id uuid PRIMARY KEY,
item_id uuid NOT NULL,
supplier_id uuid NOT NULL,
supplier_lot_code text,
manufactured_on date,
expires_on date,
status receipt_lot_status NOT NULL DEFAULT 'PENDING_RECEIPT'
);
CREATE TABLE goods_receipt (
id uuid PRIMARY KEY,
po_id uuid NOT NULL,
received_at timestamptz NOT NULL,
receiver_id uuid NOT NULL
);
CREATE TABLE goods_receipt_line (
id uuid PRIMARY KEY,
goods_receipt_id uuid NOT NULL REFERENCES goods_receipt(id),
po_line_id uuid NOT NULL,
supplier_lot_id uuid NOT NULL REFERENCES supplier_lot(id),
qty numeric NOT NULL,
uom text NOT NULL
);
-- production and MRP read this, never raw stock alone
CREATE VIEW available_for_production AS
SELECT s.item_id, s.supplier_lot_id AS lot_id, s.location_id, s.qty
FROM stock s
JOIN supplier_lot l ON l.id = s.supplier_lot_id
WHERE l.status = 'ACCEPTED'
AND s.location_id NOT IN (SELECT id FROM location WHERE is_quarantine);
Design test: can a blender operator consume a lot that failed vehicle/packaging checks without a second person's release? If yes, you built a quantity tracker, not intake control.
Map the 8-point gate checklist to system fields
Operations side (Kenyan food factories: mills, dairies' non-milk materials, juice, bakeries, packers) should answer these before put-away. Your product should make each answer hard to skip:
- Supplier approved / identity matches PO — block GRN against unknown suppliers; match party on PO.
- Documents match the load — require PO reference; variance workflow for qty/description mismatches.
-
Vehicle and packaging condition — structured checklist fields; fail →
QUARANTINEDorREJECTED, not a free-text footnote. - Product identity (item, grade, pack size) — scan or select item from PO lines only; grade as item attribute.
- Quantity and UOM — capture counted/weighed qty; over/under receipt reasons.
- Batch/lot and expiry or manufacture date — mandatory attributes per item category; reject if remaining shelf life below item rule.
-
Spec / COA / sensory or simple QC — attach COA, record pass/fail; pending tests keep
ON_HOLD. -
GRN before put-away; rejects quarantined — inventory move to free stock only on
ACCEPTED; quarantine location enforced on reject/hold.
Public process context (operations guidance, not legal advice): KEBS Standardization Mark evaluations look at process controls including raw materials; KEBS initial factory inspection forms ask for raw material specs/origin and QC records; Ministry of Health food hygiene licensing checklists expect hazard monitoring at receiving. Build software that makes those records easy to produce, without pretending to be a compliance engine.
Related operational controls to wire the same way
- Finished-goods QA hold before dispatch is the outbound twin of intake status.
- Mock recall / traceability only works if supplier lots were recorded at GRN.
- FEFO and expiry need dates captured at intake, not invented at month-end.
- Dairy milk intake adds platform tests; same status machine, richer check set.
- In Kenya, goods receipts also sit next to eTIMS document reality for finance.
Soft CTA
FactoraERP links POs, goods receipts, lot status and production consumption so held or rejected material does not quietly become available. Walkthroughs at factoraerp.com.
FAQ for implementers
Should GRN create stock immediately?
Create stock in a receiving or quarantine location with PENDING_RECEIPT / ON_HOLD if you need quantity visibility, but do not expose it to production availability until ACCEPTED.
Where do partial accepts live?
Split the receipt into accepted qty on an accepted lot (or status) and held/rejected qty on separate lot rows or split lines. Never leave mixed decisions on one available bucket.
Who is allowed to transition status?
Permission by role (receiver vs QA). External lab pending results should not be closable by a store clerk alone if your SOP separates those duties.
Isaac Muthui, CEO, Tamalaki Business Network Ltd
Top comments (0)