ERP Core / Purchase

Purchase - Operational Workflows & State Machines

Procurement lifecycle, discrepancy and return flow, and state transition tables for procurement documents.

Operational Workflows & State Machines

The Purchases & Procurement domain defines explicit workflows and state machines to ensure that every document moves through a controlled, auditable lifecycle from internal need to financial settlement.


1. Full Procurement Lifecycle

flowchart LR
    A[Internal Request / PR] --> B{Requires Tendering?}
    B -->|Yes| C[RFQ & Quotation]
    B -->|No| D[Direct PO]
    C --> E[Quotation Selection]
    E --> D
    D --> F[PO Approval]
    F --> G[Send to Supplier]
    G --> H[GRN Receipt / WMS]
    H --> I[Vendor Bill Receipt]
    I --> J{3-Way Match?}
    J -->|Match| K[Approve for Payment]
    J -->|Mismatch| L[Discrepancy Workflow]
    L -->|Resolved| K
    L -->|Rejected| M[Debit Note / RTV]
StageBusiness Responsibility
Internal Request (PR)An internal user requests goods or services and specifies required quantity, target date, and budget center.
RFQ & QuotationProcurement invites competitive bids from approved suppliers for the requirement.
Quotation SelectionProcurement evaluates bids and selects a supplier based on price, lead time, quality, and terms.
PO ApprovalThe commitment is routed through the approval matrix based on value, category, and cost center.
Send to SupplierThe approved PO is transmitted to the supplier and becomes legally binding.
GRN ReceiptWMS records physical receipt and generates receiving evidence consumed by Procurement.
Vendor Bill ReceiptThe supplier’s invoice is captured and matched against PO and GRN.
3-Way MatchThe system verifies parity between PO, GRN, and Bill within tolerance.
Approve for PaymentThe bill is approved and passed to Treasury for settlement.

2. Discrepancy & Return Flow

flowchart TB
    A[Inspection / Receipt] --> B{Acceptable?}
    B -->|Yes| C[GRN Confirmed]
    B -->|No| D{Rejection Type}
    D -->|Quality Reject| E[Debit Note Issuance]
    D -->|Over-Delivery| F[Return Authorization]
    D -->|Price Discrepancy| G[Supplier Re-negotiation]
    E --> H[Return to Vendor / RTV]
    F --> H
    G --> I[Credit Note or Corrected Bill]
    H --> J[AP Adjustment]
    I --> J
StageBusiness Responsibility
Inspection / ReceiptReceived goods are inspected for quantity, quality, and conformity to PO terms.
Quality RejectNon-conforming goods trigger a debit note and return authorization.
Over-DeliveryExcess quantity beyond tolerance is rejected or quarantined pending authorization.
Price DiscrepancyInvoiced price differs from PO price and requires supplier correction or debit/credit note.
Return to Vendor (RTV)Physical goods are returned to the supplier with accompanying financial adjustment.
AP AdjustmentAccounts payable balance is reduced through debit note or credit memo.

3. State Transition Tables

Purchase Requisition

Current StateTrigger / EventNext StateBusiness Validation Rule
DraftSubmit for approvalPending ApprovalRequester and cost center are valid.
Pending ApprovalApprover rejectsRejectedRejection reason is mandatory.
Pending ApprovalApprover approvesApprovedValue is within requester’s delegation.
ApprovedConvert to POConvertedSelected supplier is on the AVL.
ApprovedCancelCancelledNo active PO line references the PR.

Purchase Order

Current StateTrigger / EventNext StateBusiness Validation Rule
DraftSubmit for approvalPending ApprovalLines reference approved suppliers and budgets.
Pending ApprovalApprover rejectsRejectedRejection reason is mandatory.
Pending ApprovalApprover approvesApprovedApproval tier matches PO value and category.
ApprovedSupplier confirmsConfirmedSupplier acknowledgment is recorded.
ConfirmedPartial GRN receivedPartially ReceivedReceived quantity does not exceed ordered quantity.
Partially ReceivedFull GRN receivedFully ReceivedCumulative GRN equals PO quantity.
Fully ReceivedVendor bill matchedClosedAll bills matched and no open variances.
Approved / ConfirmedCancelCancelledNo received quantity exists.

Vendor Bill

Current StateTrigger / EventNext StateBusiness Validation Rule
DraftCapture invoicePending MatchingSupplier and PO references are valid.
Pending MatchingMatch against PO & GRNMatchedQuantities and prices fall within tolerance.
Pending MatchingVariance detectedDiscrepancyVariance exceeds configured tolerance.
DiscrepancyDispute resolvedMatchedAuthorized approver accepts the variance.
MatchedApprove for paymentApproved3-way match is complete.
ApprovedPayment scheduledPaidTreasury confirms payment execution.
DiscrepancyReturn authorizedRejected / Debit NoteDebit note is issued and RTV processed.

Our Premium Sponsors

Obelaw is proudly open-source. Continued development, bug fixes, and community support are made possible by the generosity of our sponsors.

Sponsor Obelaw