Module — Procurement¶
The end-to-end purchasing chain: raise a Purchase Request against a project budget line, solicit quotations through an RFQ with cost/benefit (CBA) supplier analysis, issue a Purchase Order, record a Goods Received Note, and generate a Payment Order — plus the supplier (Provider) registry.
Source: NKO.Main/NKO.Main/Controllers/{PurchaseRequest,PurchaseOrder,RFQ,GRN,Providers,PaymentOrder}Controller.cs,
NKO.Main/NKO.Main/BAL/{BPurchaseRequest,BPurchaseOrder,BRFQ,BGRN,BProvider,BPaymentOrder,ProcBudgetLineHandler}.cs,
NKO.Lib/NKO.Shared/ViewModels/RFQ/BestPriceVM.cs.
Purpose & scope¶
- In scope: PR / RFQ / PO / GRN / Payment Order documents and their material lines, CBA scoring and auto-award, provider justification, the Provider registry, and the procurement lifecycle tracker.
- Out of scope: the step-by-step approval chains (Procurement Cycle),
the budget lines the documents charge against (Grant), and putting received goods
into stock (Logistics — via
GRN → Transfer to Warehouse). - Database:
NKO_DB(core), contextNKO_DBEntities1.
Key features¶
- Purchase Request — a multi-material request tied to a Project; each line references a
procurement budget line (
Materials.ProcBudgetLineId); an auto-generatedFullId=branch / projectCode / seq; Excel import / export of the material template; attachments and comments; segregation-of-duty (SOD) approval tiers driven by the USD value; a PR "period" (SLA days) derived from the value. - RFQ — Procurement / Technical / Opening committees with managers; the quotation type (single / simple / formal / tender) is chosen automatically from the value; provider quotations with per-material pricing, sales tax, delivery & other charges and lead time; a technical assessment (Yes/No or calculation marking); the comparative analysis (CBA) with automatic winner selection; a verification passcode; threshold and committee changes; a provider justification for a non-lowest award.
- Purchase Order — created from a winning RFQ provider (or a provider justification); PO material lines copy price and budget line from the RFQ; sequence-numbered per RFQ; a "Justification" sub-document for alternative suppliers; ProcTracker & Tracker dashboards.
- GRN — created from an Accepted PO; copies PO material lines with a received quantity; a
"Transfer to Warehouse" hand-off that writes stock / asset rows into
NKO_DB_Warehouse. - Payment Order — created from an Accepted GRN, or entered manually (
CreateManual) for a direct vendor payment (name / IBAN / method / currency). - Providers — a supplier registry with Excel import and a quotations history.
Screens¶
Route = /{Controller}/{Action}; primary screens only. Each document also has material-line
add / edit / delete partials, an AddComment, attachment endpoints, and a ContextActions POST
(the workflow transition — see Procurement Cycle).
PurchaseRequestController — /PurchaseRequest/*¶
| Feature | Route | View | Permission key |
|---|---|---|---|
| PR list | / |
Purchase |
Purchase |
| Create | / |
Create. |
Purchase |
| Detail | / |
Details. |
Purchase |
| Material template import / export | /, / |
Export |
Purchase |
RFQController — /RFQ/*¶
| Feature | Route | View | Permission key |
|---|---|---|---|
| RFQ list | / |
RFQ/ |
RFQIndex |
| Create / edit | /, / |
_Create., Edit. |
RFQCreate, RFQEdit |
| Providers & quotations | /, /, / |
Providers*. |
RFQProviders, RFQProviders, RFQProviders |
| Comparative analysis (CBA) | / |
Compare. / Compare |
RFQProviders |
| Technical assessment / report | /, / |
Technical*. |
RFQProviders |
| Provider justification | / |
_Set |
RFQProviders |
| Verify (passcode) | / |
_Verify. |
RFQVerify |
| Detail | / |
Details. |
RFQDetails |
PurchaseOrderController — /PurchaseOrder/*¶
| Feature | Route | View | Permission key |
|---|---|---|---|
| PO list | / |
Purchase |
Purchase |
| Create from RFQ / from justification | /, / |
(redirect) | Purchase |
| Detail / sheet edit | /, / |
Details. |
Purchase |
| Justification queue / detail | /, / |
Justification*. |
RFQProviders |
| Procurement lifecycle tracker | /, / |
Proc, Tracker. |
Purchase, Purchase |
GRNController — /GRN/* · PaymentOrderController — /PaymentOrder/* · ProvidersController — /Providers/*¶
| Feature | Route | View | Permission key |
|---|---|---|---|
| GRN list / create from PO / detail | /, /, / |
GRN/ |
Purchase, Purchase, Purchase |
| Transfer received goods to warehouse | / |
(redirect) | Purchase |
| Payment Order list / create from GRN | /, / |
Payment |
Purchase, Purchase |
| Manual (direct vendor) payment | /, / |
Create, Edit |
Purchase, Purchase |
| Payment Order detail | / |
Details. |
Purchase |
| Provider registry / quotations / import | /, /, / |
Providers/ |
RFQIndex |
Business logic¶
| Class | File | Responsibility & notable logic |
|---|---|---|
BPurchase |
NKO. (~2290 ln) |
Create — status Draft; Full from Bsettings.; per material Est, Area, Proc stored (no availability gate). Value thresholds (USD): SOD1 > 1 000, SOD2 > 5 000, SOD3 > 10 000, SOD4 > 100 000. Quotation type by value: ≤ 500 single, ≤ 3 000 simple, ≤ 20 000 formal, > 20 000 tender; Needs when <; Is when > 250 000. Calculate (SLA days) — <, <, <, ≥ 10 000 → 25. Usd converts non-USD via TRYRate / EURRate of the enabled Exchange row. Workflow: Set, Set, Set, Set, Set, Get (PRTracker). |
BRFQ |
NKO. (~3840 ln — the largest) |
Analyse — per provider builds a Provider (Due), ordered cheapest-first; Get = the lowest. CBA scoring (Best): Technical; Finance; Final. Set — the scored auto-award: AutoProvider winner = max Final (tie-break Lead), all its mats Is; AutoMat winning provider-mat = max (Price where Price. Set — Yes/No pattern picks the lowest Amount / Total. Justify — write-back of the technical assessment; Mat ⇒ Is. Verification: Set / Verify(id,. Many Set*Committee1/ and Set workflow methods. |
BPurchase |
NKO. (~1450 ln) |
Create(rfq — guard: provider Win or an Accepted RFQProvider, and the RFQ Accepted (or single-quotation). Copies Sale / Delivery / Other from the RFQ provider; Po from Get; builds one Purchase per RFQ provider-mat (Budget from Materials.). Create — only mats where Is, also copies warranty / brand / model / country-of-origin. Create. Workflow: Set, Set, Set, Set. |
BGRN |
NKO. (~1225 ln) |
Create(po — from a Purchase; Full; one Good per Purchase. Transfare — resolves BWarehouse. and writes Center + Stock (consumables) or Asset rows (assets) into NKO_DB_Warehouse, then sets Good. Workflow: Set, Set, Set, Set. |
BPayment |
NKO. (~1325 ln) |
Create(grn — only if the GRN is Accepted; Is; copies Sale / Other / Delivery from the PO; one Payment per GRN mat. Create — Is; vendor name / address / e-mail / mobile, Payment, Transfer, Currency; Total = Quantity × Price. Workflow: Set, Set, Set, Set. |
BProvider |
NKO. (~86 ln) |
Get, Get(guid), Get (Accepted RFQs), Update. |
Proc |
NKO. |
The finance bridge — Budget (per line: Accepted PR / PO / PTO / PTO-paid totals) is what the Finance BudgetLines screens show. See Grant. |
Data¶
PurchaseRequest, PurchaseOrder, PurchaseOrderMat, RFQs, RFQMat, RFQProvider,
RFQProviderMats, RFQProviderJustification, RFQJustifiedMat, RFQJustifiedProvider,
RFQTechnical, GoodReceivedNote, GoodReceivedNoteMat, PaymentOrder, PaymentOrderMat,
Provider, Materials (AreaId, ReferenceId, ProcBudgetLineId, EstPrice, EstTotalPrice,
SeqId). BudgetLine (Grant) exposes the NotMapped Balance / IsAvailable used advisorily on
the PR detail screen.
Full column detail: Procurement database.
Permissions¶
Distinct keys: PurchaseRequest, PurchaseRequestCreate, PurchaseRequestAddMat,
PurchaseRequestEditMat, PurchaseRequestDeleteMat, PurchaseRequestDelete, PurchaseRequestEdit,
PurchaseRequestDetails, PurchaseRequestAddComment, PurchaseOrderIndex, PurchaseOrderCreate,
PurchaseOrderDetails, PurchaseOrderEdit, PurchaseOrderEditMat, PurchaseOrderDelete,
PurchaseOrderDeleteMat, PurchaseOrderProcTracker, RFQIndex, RFQCreate, RFQEdit,
RFQEditProvider, RFQDetails, RFQProviders, RFQProvidersAnalyse, RFQProvidersDetails,
RFQVerify. Data scoping: SharedPermissions.{PR = 4, PO = 13}. Every workflow action first
requires an approved e-signature (BSign.HasSign) — except the provider-justification step,
/PurchaseOrder/JustificationContextActions, which does not check it (R3-9).
Screenshots¶
PR list, lifecycle tracker, and the PO / Payment-Order signature timelines
(/PurchaseRequest, /PurchaseOrder/Tracker, /PurchaseOrder/Details, /PaymentOrder/Details):

Purchase Orders — /PurchaseOrder:

RFQs — /RFQ?type=2 (the bare /RFQ shows an empty state; pick Open or Closed — see
Recommendations R7-11):

Goods Received Notes — /GRN ("Prepared By" name masked):

Supplier registry — /Providers (contact name / e-mail / phone / address masked; ~520 suppliers
across 26 pages):

Related¶
- Procurement Cycle — the approval chains, statuses and edge cases.
- Grant module — budget lines and the PR/PO/PTO consumption report.
- Logistics module —
GRN → Transfer to Warehouseand the separate warehouseGRNReport(asset return). - Procurement API · Procurement database.