Goods Receipt Note (GRN) processing, quality inspection, three-way match (PO-GRN-Invoice), and debit note management.
The Receiving module handles material receipt at project stores. When materials arrive, a GRN is created referencing the PO. Quality inspection is performed per Material Inspection Plan. Accepted quantities update inventory stock. The three-way match engine validates PO quantity, GRN received quantity, and Invoice billed quantity before payment approval. Debit notes handle short receipts, rejections, and price discrepancies.
| Status | Description | Allowed Actions | Next States |
|---|---|---|---|
| Draft | GRN created, pending inspection | Add Lines, Edit Qty | Under Inspection |
| Under Inspection | Quality team inspecting material | Pass, Fail, Partial | Accepted, Rejected |
| Accepted | Material passed inspection | Update Stock, Match Invoice | Matched |
| Rejected | Material failed quality check | Create Debit Note, Return | — |
| Matched | 3-way match completed successfully | Process Payment | — |
| Partial | Some items accepted, some rejected | Split GRN, Debit Note | Accepted |
grn_id — PK, goods receipt note headerpo_id — FK → procurement.purchase_ordervendor_id — FK → vendor.vendor_mastergrn_number, grn_date — Document trackingstore_id — FK → inventory.store (receiving location)status, received_by — Lifecycle and user trackingline_id — PKgrn_id — FK → receiving.grnpo_line_id — FK → procurement.po_lineordered_qty, received_qty, accepted_qty, rejected_qty — Quantity breakdownrejection_reason — Free text for failed itemsinspection_id — PKgrn_line_id — FK → receiving.grn_lineinspection_type — visual | dimensional | lab_test | functionalresult — pass | fail | conditionalinspector_id — FK → admin.userremarks, test_report_url — Observations and reportsmatch_id — PKpo_id, grn_id, invoice_id — FK references for 3-way matchpo_qty, grn_qty, invoice_qty — Quantities from each documentmatch_status — matched | qty_variance | price_variancetolerance_pct — Configurable variance thresholddn_id — PK, debit note for rejections/shortagesgrn_id — FK → receiving.grnvendor_id — FK → vendor.vendor_masterdn_amount, reason_code — Financial impact and categorizationstatus — Draft → Submitted → AcknowledgedStore keeper creates GRN when material arrives. References PO for expected items and quantities. Records actual received quantities, delivery challan number, and vehicle details.
Quality team inspects each GRN line item per Material Inspection Plan. Visual, dimensional, or lab tests as applicable. Results recorded with pass/fail/conditional status.
Accepted quantities update inventory stock ledger via stock transaction. Rejected quantities flagged with reason. Debit note created for rejected/short-received material.
System compares PO ordered qty, GRN received qty, and Invoice billed qty. If all three match within tolerance (default ±2%), invoice approved for payment. Variances flagged for review.
For rejections, shortages, or price variances, debit note issued to vendor. Vendor acknowledges and either replaces material or accepts credit adjustment.
-- Check 3-way match status for pending invoices SELECT m.match_id, po.po_number, g.grn_number, m.po_qty, m.grn_qty, m.invoice_qty, CASE WHEN ABS(m.grn_qty - m.po_qty) / m.po_qty * 100 > m.tolerance_pct THEN 'QTY_VARIANCE' WHEN ABS(m.invoice_qty - m.grn_qty) / m.grn_qty * 100 > m.tolerance_pct THEN 'PRICE_VARIANCE' ELSE 'MATCHED' END AS match_result FROM receiving.three_way_match m JOIN procurement.purchase_order po ON po.po_id = m.po_id JOIN receiving.grn g ON g.grn_id = m.grn_id;