Requisition Business Rules¶
This document outlines the business rules for requisitions in the PRS system.
Requisition Entity¶
A requisition is a formal request for goods or materials.
Requisition Types¶
- OFM: Owner Furnished Material
- Non-OFM: Non-Owner Furnished Material
- OFM-TOM: Owner Furnished Material - Transfer of Material
- Non-OFM-TOM: Non-Owner Furnished Material - Transfer of Material
Requisition Status Flow¶
| Text Only | |
|---|---|
- RS can be REJECTED during FOR APPROVAL status
- RS can be CANCELLED by the requester if the most progressed/advanced status of its PURCHASE ORDER/S is FOR_SENDING
- RS will be set to RS_IN_PROGRESS once a canvass is submitted
- RS will be set to CLOSED_RS when all POs are closed and no items left to canvass
Requisition Fields¶
| Field | Description | Validation Rules |
|---|---|---|
| rsNumber | Requisition number | Auto-generated based on company code |
| rsLetter | Requisition letter | Auto-generated |
| category | Requisition category | Must be one of the defined categories |
| type | Requisition type | Must be one of the defined types |
| companyId | Company ID | Required |
| departmentId | Department ID | Required |
| projectId | Project ID | Optional |
| dateRequired | Required date | Required, must be a valid date |
| deliverTo | Delivery address | Required, max 100 characters |
| purpose | Purpose of requisition | Required, max 100 characters |
| chargeTo | Charge to entity | Must be one of: supplier, project, association, company |
| chargeToId | ID of charge to entity | Required if chargeTo is specified |
| status | Current status | Must be one of the defined statuses |
| createdBy | User ID of creator | Required |
| assignedTo | User ID of assignee | Required for certain statuses |
Business Rules¶
1. Requisition Creation¶
- A requisition can be created as a draft or submitted immediately
- If not a draft, all required fields must be filled
- If not a draft, at least one item must be added
- RS Number is auto-generated based on company code
- RS Letter is auto-generated
- Creator is set to the current user
- Status is set to DRAFT based on isDraft flag
2. Requisition Submission¶
- All required fields must be filled
- At least one item must be added
- Upon submission, status changes to FOR_RS_APPROVAL
- Approvers are assigned based on category, project, department and quantity (GFQs)
3. Requisition Approval¶
- Only FOR_RS_APPROVAL requisitions can be approved
- User must be an assigned approver for the requisition
- If all approvers approve, status changes to ASSIGNING
- Status will remain as FOR APPROVAL until fully approved
- Additional approvers can be added during the approval process
- Approvers can input a note during approval
- Approvers can edit item quantity or delete an item from the table
4. Requisition Rejection¶
- Only FOR_APPROVAL requisitions can be rejected
- User must be an assigned approver for the requisition
- Rejection requires a reason/comment
- Upon rejection, status changes to RS_REJECTED
- Requester should be able to edit RS once rejected
- Can resubmit RS and will undergo approval process again with status FOR_RS_APPROVAL
5. Requisition Assignment¶
- Only fully approved requisitions can be assigned with status ASSIGNING
- Only Purchasing Head and Purchasing Staff can assign an RS to himself or another staff
- Upon assignment, status changes to ASSIGNED
- Once assigned, only Purchasing Head can re-assign / update assignments for various statuses
6. Requisition Items¶
- Adding of items will be based on RS_TYPE
- Each requisition must have at least one item (if not a draft)
- Items must have a valid quantity, unit, and description
- Items can have notes (optional)
- Items can be added, updated, or deleted while the requisition is in DRAFT status
- Steelbars are shown in a seperate tab
- OFM Items are filtered based on user's trade and project
- Requested quantity will be deducted from item's Remaining GFQ once submitted
Validation Rules¶
Detailed validation rules are defined in the Zod schema: