Section 4

Rules and permissions

Each rule is one testable sentence with its numbers in it. On the left of every rule is where it came from (the question that produced it); on the right is what proves it (the tests). A rule with no test fails the build.

BR-01

Orders need an active vendor and active items

ST-1

An order can be submitted only when the vendor is active and not on purchasing hold, and every item is active for purchase.

From
Proved by
BR-02

Approval by order total

ST-1

Orders up to $2,500.00 are approved by the issuing buyer. Orders over $2,500.00 and up to $25,000.00 route to the purchasing manager. Orders over $25,000.00 route to the controller. The order total, not the line, sets the tier.

From
Proved by
BR-03

Material changes need approval again

ST-1

After approval, a change to vendor, item or terms, or a price or quantity change that raises the total by more than 5% or moves it into a higher tier, returns the order to Pending approval as a new revision.

From
Proved by
BR-04

No over-receipt

ST-2

A receipt line may not exceed the line's open quantity (ordered minus received minus closed short). The dock sees the open quantity in the refusal.

From
Proved by
Exercised in
BR-05

Partial receipts keep the line open

ST-2

A receipt below the open quantity leaves the remainder open on the line. The order is Partially received while any line has received quantity and open quantity, and Received when no line has open quantity.

From
Proved by
Exercised in
BR-06

Close short with a reason

ST-2

The buyer may close the open quantity of a line short. A reason is required, the closed quantity is recorded on the line, and it can no longer be received or billed.

From
Proved by
Exercised in
BR-07

Invoices reference order lines

ST-3

In release 1 every invoice line must reference an order line of the same vendor. Invoices without an order cannot be captured (decision D-01).

From
Proved by
BR-08

Exact duplicate is blocked

ST-3

Before saving, the invoice number is normalized (keep letters and digits only, uppercase, drop leading zeros). If an invoice that is not voided has the same vendor, the same normalized number and the same gross amount, the new invoice is blocked: it is never saved as payable, and the clerk is shown the original.

From
Proved by
Exercised in
BR-09

Near duplicate is held

ST-3

Same vendor and normalized number with a different gross amount, or same vendor and gross amount with an invoice date within 10 days of another invoice, puts the new invoice on a Possible duplicate hold. Only the AP lead can clear it (to matching) or reject it.

From
Proved by
Exercised in
BR-10

Never bill more than received

ST-4

For each order line, the total billed quantity across all invoices may not exceed the total received quantity. The excess opens a QTY hold for the difference in units.

From
Proved by
Exercised in
BR-11

Price tolerance

ST-4

An invoice unit price may exceed the order unit price by at most 1.0%, and the line's price variance (billed quantity times the unit difference) may not exceed $25.00. Breaking either opens a PRICE hold. A price below the order price passes, and the favorable variance is recorded.

From
Proved by
Exercised in
BR-12

Holds re-match themselves

ST-4

A held invoice is re-matched automatically whenever a receipt, an order revision, or a credit memo touches its order. Holds that no longer apply are released by the system with the triggering document as the reason. PRICE holds belong to the buyer; possible-duplicate holds to the AP lead.

From
Proved by
Exercised in
BR-13

Only clean invoices are approved

ST-5

An invoice with no open holds is approved for payment automatically. Its due date is the invoice date plus the vendor's terms (Net 30 for Kestrel Fasteners). An invoice released by a controller override needs AP lead approval.

From
Proved by
Exercised in
BR-14

Payment runs take two people

ST-6

The AP lead proposes a run from approved invoices due within the window. Treasury releases it. A run over $50,000.00 also needs the controller. Invoices with any open hold can never enter a run.

From
Proved by
Exercised in
BR-15

Postings handed to Finance

ST-2

A receipt posts an accrual at the order price (inventory against receipts-not-invoiced). A matched invoice clears the accrual into accounts payable, and any price difference posts to the price variance account. Valuation basis is pending decision D-02.

From
Proved by
Exercised in
BR-16

Every state change is recorded

all steps

Every change of state on an order, receipt, invoice, hold or payment writes one audit entry: entity, from and to state, user, timestamp and reason. Audit entries cannot be edited or deleted and are kept seven years.

From
Proved by
Exercised in

Separation of duties

Enforced by the system on the same transaction, not written as policy. Each one is tested.

SOD-01

The buyer on an order cannot post a receipt against it.

AC-12
SOD-02

The clerk who captured an invoice cannot release a payment run containing it.

AC-12
SOD-03

The user who proposed a payment run cannot release it.

AC-12
SOD-04

A user who changed a vendor's bank details in the last 90 days cannot propose or release a payment to that vendor.

AC-12

Permission matrix

Roles are job functions, not people. One person may hold several roles, subject to the separation-of-duties rules. A blank cell means no access.

ActionRequesterBuyerPurchasing managerReceiverAP clerkAP leadControllerTreasuryVendor adminRules
Create or change an order
P-CREATE-PO
request onlyYesBR-01BR-03
Approve an order
P-APPROVE-PO
up to $2,500up to $25,000any amountBR-02
Post a receipt
P-RECEIVE
YesBR-04BR-05SOD-01
Close a line short
P-CLOSE-SHORT
own orders, reason requiredreason requiredBR-06
Capture an invoice or credit memo
P-CAPTURE-INV
YesYesBR-07BR-08
Clear or reject a possible duplicate
P-RELEASE-DUP
YesBR-09
Resolve a price hold
P-RESOLVE-PRICE
confirm price, or amend within limitrequest credit memoBR-11BR-12
Override a match hold
P-OVERRIDE-HOLD
reason requiredBR-13
Propose a payment run
P-PROPOSE-RUN
YesBR-14SOD-03SOD-04
Release a payment run
P-RELEASE-RUN
second approval over $50,000YesBR-14SOD-02SOD-03SOD-04
Change vendor bank details
P-VENDOR-BANK
with call-back verificationSOD-04
Read the audit trail
P-READ-AUDIT
purchasing recordsAP recordsallBR-16