Module: Purchase Management v1.0.0
What is Purchase Management?
Enterprise purchase and procurement management for Perfex CRM
This module installs into modules/purchase_management/ and adds its own admin menus, permissions, and database tables — without editing Perfex CRM core files.
Who should use this module?
- Admins — activate the module, configure Settings, assign roles, and manage integrations.
- Operators / day-to-day staff — create and update records (orders, attendance, shipments, messages, etc.).
- Managers / approvers — review queues, approve workflows, and monitor dashboards/KPIs.
- Finance / compliance / ops leads — run reports, exports, and audit trails when the module supports them.
What you can achieve
- Keep all related work in one place inside Perfex CRM instead of spreadsheets.
- Control who can view, create, edit, approve, or export with role permissions.
- Use dashboards and reports to see status, bottlenecks, and history.
- Connect to other CRM data (customers, invoices, items, staff) where the module integrates.
Recommended learning path
- Read How to Install and activate the module.
- Skim Features so you know what screens exist.
- Complete the Quick Start checklist on this page (Settings → masters → first sample record).
- Open each screen guide under Screen-by-screen guides when you need step-by-step help.
- Check Version & Changelog after upgrades for new options.
Tip: Train one admin first, then create a limited role for operators so they only see the screens they need.
5-minute Quick Start
Follow this short path the first time you use Purchase Management:
- Activate — Setup → Modules → activate Purchase Management (run Upgrade if prompted).
- Permissions — Setup → Staff → Roles → enable view/create/edit (and approve/settings if needed) for this module.
- Settings — Open Purchase Management → Settings and save company defaults, prefixes, and integrations.
- Master data — Create the first required masters (products, warehouses, templates, channels, accounts, routes, etc.).
- First transaction — Create one sample record end-to-end (save → submit/approve → complete) and confirm it appears in lists/reports.
- Cron — If the module uses alerts, sync, queues, or AI, confirm Perfex CRM cron is scheduled on the server.
Full how-to guide (from module package)
The steps below come from the module author's printable guide — follow them in order for best results.
HOW TO USE — Purchase Management v1.0.0
Author: Nasbix Technologies (https://nasbix.com)
For Perfex CRM 2.3+ (3.x recommended)
1. INSTALLATION
- Upload the "purchase_management" folder into your Perfex CRM /modules/ directory
(FTP / cPanel / Setup → Modules → Upload).
- Log in as administrator.
- Go to Setup → Modules.
- Find "Purchase Management" and click Activate.
5. On activate the module:
- Creates all pm_* database tables
- Adds default settings (prefixes, approvals, API key, etc.)
- Sets installed version to 1.0.0 / DB schema 100
2. ASSIGN PERMISSIONS
- Go to Setup → Staff → Roles (or edit a staff member).
2. Under permissions, enable the Purchase Management features your team needs:
- Dashboard, Suppliers, Purchase Requests, RFQ, Purchase Orders
- GRN, Supplier Bills, Payments, Returns, Reports, Settings
- Admins have full access automatically.
3. CONFIGURE SETTINGS
Path: Purchase Management → Settings
(or Setup → Modules → Purchase Management → Settings link)
Recommended first setup:
- Document prefixes (SUP-, PR-, RFQ-, PO-, GRN-, BILL-, PAY-, PRN-)
- Number padding
- Default payment terms / tax
- Enable or disable PR, RFQ, Returns
- Approval routing: Staff-based OR Role-based (multi-level)
- Warehouse integration mode: auto / required / disabled
- Optional: REST API key + rate limit
- Optional: Webhook URL + HMAC secret
Optional: click "Load Demo Data" to seed sample suppliers / PR / RFQ for testing.
4. TYPICAL WORKFLOW (PROCURE-TO-PAY)
1. Suppliers
- Create suppliers under Purchase Management → Suppliers
- Add contacts and attachments as needed
2. Purchase Request (optional)
- Create PR → Submit → Approve
- Convert approved PR to PO or RFQ
3. RFQ & Quotations (optional)
- Create RFQ, invite suppliers, send (email + PDF)
- Enter supplier quotations, compare, award
4. Purchase Order
- Create PO (from PR / RFQ / or standalone if allowed)
- Submit for approval → Approve → Send to supplier (email + PDF)
5. Goods Receipt (GRN)
- Receive against PO (partial or full)
- Post GRN (stock sync if Inventory Management is installed)
6. Supplier Bill
- Create bill from PO / GRN
- Three-way match → Approve
7. Payment
- Record payment (single bill or multi-bill allocation)
- Void reverses allocations if needed
8. Return (optional)
- Create purchase return → Approve → Complete
Approvals inbox: Purchase Management → Approvals
5. REPORTS
Purchase Management → Reports
Export CSV / Excel / PDF where available (requires export permission).
6. REST API & WEBHOOKS (OPTIONAL)
Enable in Settings:
- REST API: send header X-PM-API-Key
Example: GET /purchase_management/api/suppliers
- Webhooks: enable separately, set public HTTPS URL + optional secret
Signature header: X-PM-Signature (when secret is set)
7. UNINSTALL (REMOVES ALL MODULE DATA)
1. Setup → Modules → Purchase Management → Deactivate
2. Click Uninstall
3. This permanently removes:
- All pm_* database tables
- All pm_* options
- uploads/purchase_management/ files
Backup your database before uninstalling if you need to keep purchase data.
8. DOCUMENTATION
- documentation/index.html (buyer-friendly HTML docs)
- docs/DOCUMENTATION.md (developer / admin reference)
- README.md (overview)
- CHANGELOG.md (version history)
9. SUPPORT
Nasbix Technologies — 6 months support via CodeCanyon item comments.
Please include: purchase code, Perfex CRM version, PHP version, module version 1.0.0.
Perfex CRM is sold separately and is not included with this item.
Setup & usage notes from README
Typical workflow
PR (optional) → RFQ (optional) → PO → GRN → Supplier Bill → Payment
↘ Return (optional)
Each document type supports draft, approval (when enabled), and status-specific actions. See [docs/DOCUMENTATION.md](docs/DOCUMENTATION.md) for step-by-step usage.
---
Module documentation index
Start here — full guides for Purchase Management:
- Overview & How to Use — what it is, who uses it, daily workflow
- Quick Start Guide — first 5 minutes + printable how-to
- How to Install — upload, activate, permissions, verify
- Features (Full Detail) — every capability explained
- FAQ & Tips — common questions and best practices
- Version & Changelog — version history
Screen-by-screen guides (each tab explained)
Click a menu item below for step-by-step instructions on that Purchase Management screen:
- Dashboard
- Suppliers
- Purchase Requests
- RFQ / Quotations
- Purchase Orders
- Goods Receipt
- Supplier Bills
- Payments
- Returns
- Approvals
- Reports
- Settings
How to use in Perfex CRM (daily operations)
- Sign in to the admin area with a role that includes Purchase Management permissions.
- Open Purchase Management (sidebar) or search for Purchase Management in the admin menu.
- Start on the Dashboard (if available) to see open tasks, pending approvals, and KPIs.
- Review Settings after upgrades — new options may need defaults for your company.
- Create or import master data first; most modules block transactions until masters exist.
- Run the main business flow (create → submit → approve → post/complete) using the screens listed in Admin menu below.
- Use Reports / Analytics screens to reconcile stock, finance, compliance, or SLA metrics.
- For integrations (API, EDI, gateways, tax), confirm credentials in Settings and monitor logs or webhook delivery screens.
- Train staff with role-based access — give approvers approve permissions only, operators create/edit on their area.
- If something fails overnight, check Perfex CRM cron ran and open the module log / failed queue screen if present.
Admin menu — where to work
Open the Purchase Management section in the admin sidebar. Screens your staff may use (depending on role):
- Approvals
- Dashboard
- Goods Receipt
- Payments
- Purchase Orders
- Purchase Requests
- Purchasing
- Reports
- Returns
- RFQ / Quotations
- Settings
- Supplier Bills
- Suppliers
Screens map — what each menu is for
These are the admin screens registered by Purchase Management. Click a name in the Knowledge Base for a full how-to, or open the path in admin.
| # | Screen | Admin path | Guide |
|---|---|---|---|
| 1 | Dashboard | admin/purchase_management | How to use |
| 2 | Suppliers | admin/purchase_management/purchase_management_suppliers | How to use |
| 3 | Purchase Requests | admin/purchase_management/purchase_management_requests | How to use |
| 4 | RFQ / Quotations | admin/purchase_management/purchase_management_rfqs | How to use |
| 5 | Purchase Orders | admin/purchase_management/purchase_management_orders | How to use |
| 6 | Goods Receipt | admin/purchase_management/purchase_management_grn | How to use |
| 7 | Supplier Bills | admin/purchase_management/purchase_management_bills | How to use |
| 8 | Payments | admin/purchase_management/purchase_management_payments | How to use |
| 9 | Returns | admin/purchase_management/purchase_management_returns | How to use |
| 10 | Approvals | admin/purchase_management/purchase_management_approvals | How to use |
| 11 | Reports | admin/purchase_management/purchase_management_reports | How to use |
| 12 | Settings | admin/purchase_management/purchase_management_settings | How to use |
Detailed guide — features, workflows, API & FAQ
Status
| Area | Status |
|---|---|
| ------ | -------- |
| Core procurement workflow (PR → RFQ → PO → GRN → Bill → Payment → Return) | Complete |
| Approvals, dashboard, reports, settings | Complete |
| Security hardening (POST/CSRF, upload validation, rate limits, webhook URL validation) | Complete |
| Unit tests (helper, payment, extension logic) | Complete — 57 tests |
| CodeCanyon packaging (LICENSE, CHANGELOG, HTML docs, demo data) | Complete |
Production-ready for standard procurement use. See [docs/ROADMAP.md](docs/ROADMAP.md) for migration history and future ideas.
---
Features
Suppliers
- Supplier master with contacts, attachments, ledger, and statement PDF
- CSV and Excel export
- Opening balance and credit tracking
Purchase requests (PR)
- Draft → submit → approval workflow
- Line items (catalog or manual when enabled)
- Attachments and convert-to-PO
RFQ & quotations
- RFQ creation from PR or standalone
- Supplier quotation entry, comparison, and award
- Email invitation to suppliers
- RFQ PDF download
Purchase orders (PO)
- Tax, discount, shipping, terms
- Email with PDF attachment
- Receipt tracking (partial / full)
- Billing status — PO marked
billedonly when all lines are fully billed
Goods receipt (GRN)
- Warehouse integration modes:
auto,required,disabled - Stock movement hooks for Inventory Management module
- PDF export
Supplier bills
- Three-way match (PO qty/price vs GRN received qty)
- Partial billing support
- Approve / reject / cancel workflow
Payments
- Multi-bill split allocations (on-account supported)
- Void reverses all allocations and bill balances
- Payment receipt PDF
Returns
- Purchase return documents with approval workflow
- PDF export
Approvals
- Multi-level approval (configurable staff per level)
- Delegation sync across PR, PO, Bill, Return
- Dedicated approvals inbox
Dashboard & reports
- KPI dashboard and top suppliers widget
- 13 report types with CSV, Excel, and PDF export
- Supplier statement and aging
Security
- Destructive actions require POST (+ CSRF for module URLs)
- Upload MIME and
rel_typevalidation - Export rate limiting
- No generic admin bypass on assigned approval steps
---
Requirements
| Requirement | Notes |
|---|---|
| ------------- | ------- |
| Perfex CRM | 2.3.x or later |
| PHP | 7.4+ (8.x supported) |
| MySQL / MariaDB | InnoDB |
| TCPDF | Bundled with Perfex CRM (application/vendor/tecnickcom/tcpdf) |
| Perfex CRM cron | Recommended — overdue bill checks |
| Inventory Management | Optional — GRN warehouse stock sync |
---
Permissions
| Feature key | Capabilities |
|---|---|
| ------------- | -------------- |
purchase_dashboard | view |
purchase_suppliers | view, create, edit, delete |
purchase_request | view, create, edit, delete, approve |
purchase_rfq | view, create, edit, delete |
purchase_order | view, create, edit, delete, approve |
purchase_grn | view, create, edit, delete |
purchase_bill | view, create, edit, delete, approve |
purchase_payment | view, create, edit, delete |
purchase_return | view, create, edit, delete, approve |
purchase_reports | view, export |
purchase_settings | view, edit, manage |
Approvals inbox: staff with purchase_dashboard view or document approve permissions (pm_can_access_approvals()).
---
Typical workflow
PR (optional) → RFQ (optional) → PO → GRN → Supplier Bill → Payment
↘ Return (optional)
Each document type supports draft, approval (when enabled), and status-specific actions. See [docs/DOCUMENTATION.md](docs/DOCUMENTATION.md) for step-by-step usage.
---
Documentation
| Document | Description |
|---|---|
| ---------- | ------------- |
| [docs/DOCUMENTATION.md](docs/DOCUMENTATION.md) | User guide, admin settings, reports, PDFs, integrations, security |
| [docs/ROADMAP.md](docs/ROADMAP.md) | Optional enhancements and known limitations |
---
Extended module documentation
Table of contents
- [Overview](#overview)
- [Menu & navigation](#menu--navigation)
- [Document workflow](#document-workflow)
- [Module settings](#module-settings)
- [Approvals](#approvals)
- [Payments & allocations](#payments--allocations)
- [Reports & exports](#reports--exports)
- [PDF documents](#pdf-documents)
- [Integrations](#integrations)
- [Security](#security)
- [Cron & automation](#cron--automation)
- [Database schema](#database-schema)
- [Developer reference](#developer-reference)
---
Overview
Purchase Management covers the full procure-to-pay cycle inside Perfex CRM admin:
| Phase | Document | Purpose |
|---|---|---|
| ------- | ---------- | --------- |
| 1 | Suppliers | Vendor master data |
| 2 | Purchase Request (PR) | Internal requisition |
| 3 | RFQ | Request quotations from suppliers |
| 4 | Purchase Order (PO) | Commitment to supplier |
| 5 | GRN | Goods received note |
| 6 | Supplier Bill | Accounts payable invoice |
| 7 | Payment | Pay supplier (multi-bill split) |
| 8 | Return | Return goods to supplier |
All 17 implementation phases (foundation through testing) are complete. Post-phase polish (RFQ PDF, partial PO billing, supplier Excel export, deactivation logging) is also complete.
---
Menu & navigation
Admin path: Purchase Management (sidebar)
| Menu item | URL segment | Permission |
|---|---|---|
| ----------- | ------------- | ------------ |
| Dashboard | purchase_management | purchase_dashboard → view |
| Suppliers | .../suppliers | purchase_suppliers |
| Purchase Requests | .../requests | purchase_request |
| RFQ & Quotations | .../rfqs | purchase_rfq |
| Purchase Orders | .../orders | purchase_order |
| Goods Receipt | .../grn | purchase_grn |
| Supplier Bills | .../bills | purchase_bill |
| Payments | .../payments | purchase_payment |
| Returns | .../returns | purchase_return |
| Approvals | .../approvals | dashboard view or approve caps |
| Reports | .../reports | purchase_reports |
| Settings | .../settings | purchase_settings |
Routes are defined in config/routes.php.
---
Document workflow
Purchase request (PR)
Statuses: draft → submitted → pending_approval → approved / rejected → converted / cancelled
- Create PR with line items (catalog items or manual lines if
pm_allow_manual_itemsis enabled). - Upload attachments on the PR view page.
- Submit for approval (when
pm_require_approvalis on and amount exceeds limit). - Approved PR can be converted to PO or used as source for RFQ.
Actions on view: Edit (draft/rejected), Submit, Approve/Reject (inbox), Cancel, Convert to PO.
RFQ
Statuses: draft → sent → closed / cancelled
- Create RFQ manually or link from an approved PR.
- Add invited suppliers and line items (qty, UOM, specifications).
- Send — emails suppliers with quotation link (no PDF attachment; see [ROADMAP.md](ROADMAP.md)).
- Enter supplier quotations; use Compare to evaluate; Award winning quotation.
- Download PDF from list or view page.
Feature toggle: pm_enable_rfq in settings.
Purchase order (PO)
Statuses: draft → pending_approval → approved → sent → partially_received / fully_received → billed → closed / cancelled
- Create from PR, RFQ award, or directly (if
pm_allow_po_without_pr). - Set supplier, lines, tax, shipping, payment terms.
- Approve and Send — email includes PO PDF attachment.
- Create GRN against PO as goods arrive.
- PO billing status:
- Partial bill: PO stays at partially_received or fully_received.
- Full bill: All line billed_qty ≥ line quantity → status becomes billed.
GRN (Goods receipt)
Statuses: draft → posted / cancelled
- Select PO and received quantities per line.
- Warehouse field behaviour depends on
pm_warehouse_integration:
- auto — optional warehouse
- required — warehouse mandatory
- disabled — no warehouse validation; no stock sync
- Posting updates PO received quantities and may sync inventory (Inventory Management module).
Supplier bill
Statuses: draft → pending_approval → approved → partially_paid / paid / overdue / cancelled
- Create from PO (pulls unbilled quantities) or manually.
- Three-way match checks PO price/qty vs GRN received qty (unless
pm_allow_bill_without_grn). - On approval, PO line
billed_qtyincreases; PO billing status refreshes automatically. - Download bill PDF from list or document view.
Payment
- Record payment against one or more approved bills (allocation UI).
- On-account payments (no bill allocation) supported.
- Void reverses all allocations and restores bill balances/status.
- Payment receipt PDF available.
Database: allocations stored in pm_supplier_payment_allocations (migration 101).
Return
Statuses: draft → pending_approval → approved → posted / cancelled
Create return against GRN/bill context. Approval workflow and PDF export supported.
Feature toggle: pm_enable_returns.
---
Module settings
Path: Purchase Management → Settings
Prefix & numbering
| Setting | Default | Purpose |
|---|---|---|
| --------- | --------- | --------- |
pm_supplier_code_prefix | SUP- | Supplier code |
pm_pr_prefix | PR- | Purchase request |
pm_rfq_prefix | RFQ- | RFQ |
pm_po_prefix | PO- | Purchase order |
pm_grn_prefix | GRN- | Goods receipt |
pm_bill_prefix | BILL- | Supplier bill |
pm_payment_prefix | PAY- | Payment |
pm_return_prefix | PRN- | Return |
pm_number_padding | 6 | Numeric padding |
General
| Setting | Description |
|---|---|
| --------- | ------------- |
pm_default_currency | Default document currency |
pm_default_payment_terms | e.g. Net 30 |
pm_default_tax | Default tax name for lines |
pm_required_supplier_fields | Comma-separated required fields |
pm_warehouse_integration | auto / required / disabled |
pm_terms_conditions | Default PO terms |
pm_pdf_footer | Footer text on all module PDFs |
Approval
| Setting | Description |
|---|---|
| --------- | ------------- |
pm_require_approval | Enable approval workflows |
pm_approval_amount_limit | Amount threshold |
pm_approval_level1_staff | Level 1 approver (staff ID) |
pm_approval_level2_staff | Level 2 approver |
pm_approval_level3_staff | Level 3 approver |
pm_approval_routing_mode | staff or role |
pm_approval_level1_role | Level 1 Perfex CRM role (when mode = role) |
pm_approval_level2_role | Level 2 Perfex CRM role |
pm_approval_level3_role | Level 3 Perfex CRM role |
When role mode is selected, any active staff member with the configured Perfex CRM role can approve that step from the inbox.
API & webhooks
| Setting | Description |
|---|---|
| --------- | ------------- |
pm_api_enabled | Enable REST API |
pm_api_key | API authentication key |
pm_webhook_url | Webhook receiver URL |
pm_webhook_secret | HMAC signing secret |
Feature toggles
| Setting | Default | Description |
|---|---|---|
| --------- | --------- | ------------- |
pm_enable_purchase_requests | 1 | PR module |
pm_enable_rfq | 1 | RFQ module |
pm_enable_returns | 1 | Returns module |
pm_allow_manual_items | 1 | Free-text line items |
pm_allow_po_without_pr | 1 | Direct PO creation |
pm_allow_bill_without_grn | 0 | Skip GRN qty check on bills |
---
Approvals
Supported document types
- Purchase request (
purchase_request) - Purchase order (
purchase_order) - Supplier bill (
purchase_bill) - Purchase return (
purchase_return)
Inbox
Purchase Management → Approvals lists pending steps assigned to the current user.
Rules
- Assigned approver must hold the document's
approvepermission. - Generic admin bypass is disabled — only assigned approver or settings manager (
purchase_settings→ manage) on unassigned steps may act. - Delegation:
pm_delegate_approval_action()keeps document status in sync withApproval_model.
`approver_role` column
The pm_purchase_approval_steps.approver_role field stores role hints (manager, admin, staff) when fallback approvers are used. Settings UI assigns staff IDs, not roles. Role-based routing is partially implemented — see [ROADMAP.md](ROADMAP.md).
---
Payments & allocations
Recording a payment
- Open Payments → New payment.
- Select supplier and payment amount/method/date.
- Allocate amounts to one or more open bills (AJAX loads bill balances).
- Save — allocations inserted into
pm_supplier_payment_allocations; billpaid_amountand status updated.
Void
Voiding a payment:
- Deletes all allocation rows for that payment
- Reverses
paid_amounton each affected bill - Restores bill status (
unpaid,partially_paid, oroverdueif past due)
On-account
Payment with zero allocations is stored as supplier on-account credit (no bill linkage).
---
Reports & exports
Path: Purchase Management → Reports
| Report key | Name |
|---|---|
| ------------ | ------ |
supplier_statement | Supplier statement |
supplier_ledger | Supplier ledger |
po | Purchase orders |
grn | Goods receipts |
pending_receiving | Pending receiving |
bills | Supplier bills |
payments | Payments |
returns | Returns |
by_item | Purchases by item |
by_supplier | Purchases by supplier |
tax | Tax summary |
aging | AP aging |
approval_history | Approval history |
Export formats: CSV, Excel (.xls), PDF — via Pm_export library.
Suppliers list: CSV and Excel export from Suppliers → Export buttons.
Export endpoints use pm_export_rate_limit() to reduce abuse.
---
PDF documents
Generated via libraries/Pm_pdf.php (TCPDF + module view templates).
| Document | Template | Controller action |
|---|---|---|
| ---------- | ---------- | ------------------- |
| Purchase order | views/orders/pdf.php | orders/pdf/{id} |
| GRN | views/grn/pdf.php | grn/pdf/{id} |
| Supplier bill | views/bills/pdf.php | bills/pdf/{id} |
| Payment receipt | views/payments/pdf.php | payments/pdf/{id} |
| Return | views/returns/pdf.php | returns/pdf/{id} |
| Purchase request | views/requests/pdf.php | requests/pdf/{id} |
| RFQ | views/rfqs/pdf.php | rfqs/pdf/{id} |
| Supplier statement | views/suppliers/statement_pdf.php | via supplier view |
PO email send attaches PDF via Pm_pdf::save_purchase_order_file().
Optional query: ?output_type=I (inline) or D (download, default).
---
Integrations
Inventory Management
When pm_warehouse_integration is not disabled and the Inventory Management module is active:
- GRN post creates stock movements
- GRN cancel reverses movements
Setting: Settings → Warehouse integration.
Perfex CRM items & taxes
Line items can reference Perfex CRM catalog items (pm_get_items()). Tax rates resolve via pm_resolve_line_tax_rate() and Perfex CRM tax settings.
RFQ send and PO send use pm_send_email(). Both include PDF attachments when sending.
---
REST API & webhooks
Configure under Settings → API & Webhooks.
| Setting | Purpose |
|---|---|
| --------- | --------- |
pm_api_enabled | Enable read-only REST API |
pm_api_key | Send as header X-PM-API-Key |
pm_webhook_url | Outbound webhook endpoint |
pm_webhook_secret | HMAC SHA256 signature in X-PM-Signature |
API endpoints
| Method | URL | Description |
|---|---|---|
| -------- | ----- | ------------- |
| GET | /purchase_management/api | API info |
| GET | /purchase_management/api/suppliers | Supplier list |
| GET | /purchase_management/api/purchase_orders/{id} | PO + lines |
| GET | /purchase_management/api/supplier_bills/{id} | Bill + lines |
| GET | /purchase_management/api/payments/{id} | Payment + allocations |
Webhook events
| Event | When |
|---|---|
| ------- | ------ |
rfq.sent | RFQ emailed to suppliers |
supplier_bill.approved | Bill approved |
supplier_bill.cancelled | Approved bill cancelled |
supplier_payment.recorded | Payment saved |
supplier_payment.voided | Payment voided |
---
Security
Implemented in Phase 15:
| Control | Implementation |
|---|---|
| --------- | ---------------- |
| POST-only destructive actions | pm_require_post(), pm_require_post_or_ajax() on delete/void/approve/reject/cancel/submit/send/post |
| CSRF on delete links | assets/js/purchase_management.js converts _delete links to POST with token |
| Upload validation | MIME check + pm_get_allowed_attachment_rel_types() whitelist |
| Approval integrity | pm_can_act_on_approval_step() — no admin bypass |
| Export throttling | pm_export_rate_limit() on reports and supplier export |
---
Cron & automation
Hook: after_cron_run → purchase_management_cron_tasks()
- Overdue bills:
Supplier_bill_model::check_overdue_bills()marks approved unpaid bills past due date asoverdue.
Ensure Perfex CRM cron is configured and running.
---
Database schema
Prefix: {db_prefix}pm_*
DB version option: pm_db_version = 100
Tables (25)
| Table | Purpose |
|---|---|
| ------- | --------- |
pm_suppliers | Supplier master |
pm_supplier_contacts | Supplier contacts |
pm_supplier_attachments | Supplier files |
pm_purchase_requests | PR header |
pm_purchase_request_items | PR lines |
pm_rfqs | RFQ header |
pm_rfq_items | RFQ lines |
pm_rfq_suppliers | RFQ invited suppliers |
pm_supplier_quotations | Quotation header |
pm_supplier_quotation_items | Quotation lines |
pm_purchase_orders | PO header |
pm_purchase_order_items | PO lines |
pm_goods_receipts | GRN header |
pm_goods_receipt_items | GRN lines |
pm_supplier_bills | Bill header |
pm_supplier_bill_items | Bill lines |
pm_supplier_payments | Payment header |
pm_supplier_payment_allocations | Payment-to-bill splits |
pm_purchase_returns | Return header |
pm_purchase_return_items | Return lines |
pm_purchase_approvals | Approval header |
pm_purchase_approval_steps | Approval steps |
pm_purchase_logs | Audit log |
pm_purchase_settings | Module settings key/value |
pm_stock_movements | GRN stock movement log |
Foreign keys
Applied on install via pm_install_foreign_keys() for core parent/child tables. Failures are logged and skipped on restrictive hosts.
---
Developer reference
Key helpers (`helpers/purchase_management_helper.php`)
| Function | Purpose |
|---|---|
| ---------- | --------- |
pm_can() / pm_require_permission() | Permission checks |
pm_generate_number() | Document numbering |
pm_calculate_line_total() | Line math |
pm_resolve_po_billing_status() | PO billed vs partial logic |
pm_validate_catalog_item() | Manual item enforcement |
pm_validate_grn_warehouse() | Warehouse rules |
pm_get_configured_approvers() | Approval chain |
pm_can_act_on_approval_step() | Approval authorization |
pm_handle_upload() | Secure uploads |
pm_log() | Audit trail + activity log |
Libraries
Pm_pdf— TCPDF document generationPm_export— CSV/Excel/PDF report export
Migrations
Add new file migrations/XXX_version_XXX.php with function pm_run_migration_XXX($CI), register in pm_maybe_upgrade_database().
Tests
tests/
├── bootstrap.php # CI stubs, loads helper
├── LogicTest.php # 26 helper/security tests
├── PaymentLogicTest.php # 14 payment/billing tests
├── ExtensionTest.php # 12 API/role/cancel tests
├── IntegrationTest.php # Optional live DB verification
└── run_all.php
Hooks (module file)
| Hook | Function |
|---|---|
| ------ | ---------- |
admin_init | Menu + permissions + DB upgrade |
get_dashboard_widgets | Dashboard widget |
app_admin_head / app_admin_footer | Assets |
after_cron_run | Overdue bills |
---
Manual QA checklist (recommended)
Before go-live, verify:
- [ ] Activate module; confirm
pm_db_version= 100 - [ ] Role permissions assigned for each team
- [ ] Settings: prefixes, approvers, feature toggles
- [ ] Full cycle: PR → PO → GRN → Bill → Payment (partial + full bill)
- [ ] Multi-bill payment allocation and void
- [ ] Approval approve/reject on PR, PO, Bill
- [ ] Report CSV/Excel/PDF export
- [ ] RFQ send email + PDF download
- [ ] Supplier CSV/Excel export
- [ ] Cron marks overdue bills
- [ ] Run
php modules/purchase_management/tests/run_all.php
---
Nasbix Technologies — Purchase Management v1.0.0
Extended module documentation
Table of contents
- [Overview](#overview)
- [Menu & navigation](#menu--navigation)
- [Document workflow](#document-workflow)
- [Module settings](#module-settings)
- [Approvals](#approvals)
- [Payments & allocations](#payments--allocations)
- [Reports & exports](#reports--exports)
- [PDF documents](#pdf-documents)
- [Integrations](#integrations)
- [Security](#security)
- [Cron & automation](#cron--automation)
- [Database schema](#database-schema)
- [Developer reference](#developer-reference)
---
Overview
Purchase Management covers the full procure-to-pay cycle inside Perfex CRM admin:
| Phase | Document | Purpose |
|---|---|---|
| ------- | ---------- | --------- |
| 1 | Suppliers | Vendor master data |
| 2 | Purchase Request (PR) | Internal requisition |
| 3 | RFQ | Request quotations from suppliers |
| 4 | Purchase Order (PO) | Commitment to supplier |
| 5 | GRN | Goods received note |
| 6 | Supplier Bill | Accounts payable invoice |
| 7 | Payment | Pay supplier (multi-bill split) |
| 8 | Return | Return goods to supplier |
All 17 implementation phases (foundation through testing) are complete. Post-phase polish (RFQ PDF, partial PO billing, supplier Excel export, deactivation logging) is also complete.
---
Menu & navigation
Admin path: Purchase Management (sidebar)
| Menu item | URL segment | Permission |
|---|---|---|
| ----------- | ------------- | ------------ |
| Dashboard | purchase_management | purchase_dashboard → view |
| Suppliers | .../suppliers | purchase_suppliers |
| Purchase Requests | .../requests | purchase_request |
| RFQ & Quotations | .../rfqs | purchase_rfq |
| Purchase Orders | .../orders | purchase_order |
| Goods Receipt | .../grn | purchase_grn |
| Supplier Bills | .../bills | purchase_bill |
| Payments | .../payments | purchase_payment |
| Returns | .../returns | purchase_return |
| Approvals | .../approvals | dashboard view or approve caps |
| Reports | .../reports | purchase_reports |
| Settings | .../settings | purchase_settings |
Routes are defined in config/routes.php.
---
Document workflow
Purchase request (PR)
Statuses: draft → submitted → pending_approval → approved / rejected → converted / cancelled
- Create PR with line items (catalog items or manual lines if
pm_allow_manual_itemsis enabled). - Upload attachments on the PR view page.
- Submit for approval (when
pm_require_approvalis on and amount exceeds limit). - Approved PR can be converted to PO or used as source for RFQ.
Actions on view: Edit (draft/rejected), Submit, Approve/Reject (inbox), Cancel, Convert to PO.
RFQ
Statuses: draft → sent → closed / cancelled
- Create RFQ manually or link from an approved PR.
- Add invited suppliers and line items (qty, UOM, specifications).
- Send — emails suppliers with quotation link (no PDF attachment; see [ROADMAP.md](ROADMAP.md)).
- Enter supplier quotations; use Compare to evaluate; Award winning quotation.
- Download PDF from list or view page.
Feature toggle: pm_enable_rfq in settings.
Purchase order (PO)
Statuses: draft → pending_approval → approved → sent → partially_received / fully_received → billed → closed / cancelled
- Create from PR, RFQ award, or directly (if
pm_allow_po_without_pr). - Set supplier, lines, tax, shipping, payment terms.
- Approve and Send — email includes PO PDF attachment.
- Create GRN against PO as goods arrive.
- PO billing status:
- Partial bill: PO stays at partially_received or fully_received.
- Full bill: All line billed_qty ≥ line quantity → status becomes billed.
GRN (Goods receipt)
Statuses: draft → posted / cancelled
- Select PO and received quantities per line.
- Warehouse field behaviour depends on
pm_warehouse_integration:
- auto — optional warehouse
- required — warehouse mandatory
- disabled — no warehouse validation; no stock sync
- Posting updates PO received quantities and may sync inventory (Inventory Management module).
Supplier bill
Statuses: draft → pending_approval → approved → partially_paid / paid / overdue / cancelled
- Create from PO (pulls unbilled quantities) or manually.
- Three-way match checks PO price/qty vs GRN received qty (unless
pm_allow_bill_without_grn). - On approval, PO line
billed_qtyincreases; PO billing status refreshes automatically. - Download bill PDF from list or document view.
Payment
- Record payment against one or more approved bills (allocation UI).
- On-account payments (no bill allocation) supported.
- Void reverses all allocations and restores bill balances/status.
- Payment receipt PDF available.
Database: allocations stored in pm_supplier_payment_allocations (migration 101).
Return
Statuses: draft → pending_approval → approved → posted / cancelled
Create return against GRN/bill context. Approval workflow and PDF export supported.
Feature toggle: pm_enable_returns.
---
Module settings
Path: Purchase Management → Settings
Prefix & numbering
| Setting | Default | Purpose |
|---|---|---|
| --------- | --------- | --------- |
pm_supplier_code_prefix | SUP- | Supplier code |
pm_pr_prefix | PR- | Purchase request |
pm_rfq_prefix | RFQ- | RFQ |
pm_po_prefix | PO- | Purchase order |
pm_grn_prefix | GRN- | Goods receipt |
pm_bill_prefix | BILL- | Supplier bill |
pm_payment_prefix | PAY- | Payment |
pm_return_prefix | PRN- | Return |
pm_number_padding | 6 | Numeric padding |
General
| Setting | Description |
|---|---|
| --------- | ------------- |
pm_default_currency | Default document currency |
pm_default_payment_terms | e.g. Net 30 |
pm_default_tax | Default tax name for lines |
pm_required_supplier_fields | Comma-separated required fields |
pm_warehouse_integration | auto / required / disabled |
pm_terms_conditions | Default PO terms |
pm_pdf_footer | Footer text on all module PDFs |
Approval
| Setting | Description |
|---|---|
| --------- | ------------- |
pm_require_approval | Enable approval workflows |
pm_approval_amount_limit | Amount threshold |
pm_approval_level1_staff | Level 1 approver (staff ID) |
pm_approval_level2_staff | Level 2 approver |
pm_approval_level3_staff | Level 3 approver |
pm_approval_routing_mode | staff or role |
pm_approval_level1_role | Level 1 Perfex CRM role (when mode = role) |
pm_approval_level2_role | Level 2 Perfex CRM role |
pm_approval_level3_role | Level 3 Perfex CRM role |
When role mode is selected, any active staff member with the configured Perfex CRM role can approve that step from the inbox.
API & webhooks
| Setting | Description |
|---|---|
| --------- | ------------- |
pm_api_enabled | Enable REST API |
pm_api_key | API authentication key |
pm_webhook_url | Webhook receiver URL |
pm_webhook_secret | HMAC signing secret |
Feature toggles
| Setting | Default | Description |
|---|---|---|
| --------- | --------- | ------------- |
pm_enable_purchase_requests | 1 | PR module |
pm_enable_rfq | 1 | RFQ module |
pm_enable_returns | 1 | Returns module |
pm_allow_manual_items | 1 | Free-text line items |
pm_allow_po_without_pr | 1 | Direct PO creation |
pm_allow_bill_without_grn | 0 | Skip GRN qty check on bills |
---
Approvals
Supported document types
- Purchase request (
purchase_request) - Purchase order (
purchase_order) - Supplier bill (
purchase_bill) - Purchase return (
purchase_return)
Inbox
Purchase Management → Approvals lists pending steps assigned to the current user.
Rules
- Assigned approver must hold the document's
approvepermission. - Generic admin bypass is disabled — only assigned approver or settings manager (
purchase_settings→ manage) on unassigned steps may act. - Delegation:
pm_delegate_approval_action()keeps document status in sync withApproval_model.
`approver_role` column
The pm_purchase_approval_steps.approver_role field stores role hints (manager, admin, staff) when fallback approvers are used. Settings UI assigns staff IDs, not roles. Role-based routing is partially implemented — see [ROADMAP.md](ROADMAP.md).
---
Payments & allocations
Recording a payment
- Open Payments → New payment.
- Select supplier and payment amount/method/date.
- Allocate amounts to one or more open bills (AJAX loads bill balances).
- Save — allocations inserted into
pm_supplier_payment_allocations; billpaid_amountand status updated.
Void
Voiding a payment:
- Deletes all allocation rows for that payment
- Reverses
paid_amounton each affected bill - Restores bill status (
unpaid,partially_paid, oroverdueif past due)
On-account
Payment with zero allocations is stored as supplier on-account credit (no bill linkage).
---
Reports & exports
Path: Purchase Management → Reports
| Report key | Name |
|---|---|
| ------------ | ------ |
supplier_statement | Supplier statement |
supplier_ledger | Supplier ledger |
po | Purchase orders |
grn | Goods receipts |
pending_receiving | Pending receiving |
bills | Supplier bills |
payments | Payments |
returns | Returns |
by_item | Purchases by item |
by_supplier | Purchases by supplier |
tax | Tax summary |
aging | AP aging |
approval_history | Approval history |
Export formats: CSV, Excel (.xls), PDF — via Pm_export library.
Suppliers list: CSV and Excel export from Suppliers → Export buttons.
Export endpoints use pm_export_rate_limit() to reduce abuse.
---
PDF documents
Generated via libraries/Pm_pdf.php (TCPDF + module view templates).
| Document | Template | Controller action |
|---|---|---|
| ---------- | ---------- | ------------------- |
| Purchase order | views/orders/pdf.php | orders/pdf/{id} |
| GRN | views/grn/pdf.php | grn/pdf/{id} |
| Supplier bill | views/bills/pdf.php | bills/pdf/{id} |
| Payment receipt | views/payments/pdf.php | payments/pdf/{id} |
| Return | views/returns/pdf.php | returns/pdf/{id} |
| Purchase request | views/requests/pdf.php | requests/pdf/{id} |
| RFQ | views/rfqs/pdf.php | rfqs/pdf/{id} |
| Supplier statement | views/suppliers/statement_pdf.php | via supplier view |
PO email send attaches PDF via Pm_pdf::save_purchase_order_file().
Optional query: ?output_type=I (inline) or D (download, default).
---
Integrations
Inventory Management
When pm_warehouse_integration is not disabled and the Inventory Management module is active:
- GRN post creates stock movements
- GRN cancel reverses movements
Setting: Settings → Warehouse integration.
Perfex CRM items & taxes
Line items can reference Perfex CRM catalog items (pm_get_items()). Tax rates resolve via pm_resolve_line_tax_rate() and Perfex CRM tax settings.
RFQ send and PO send use pm_send_email(). Both include PDF attachments when sending.
---
REST API & webhooks
Configure under Settings → API & Webhooks.
| Setting | Purpose |
|---|---|
| --------- | --------- |
pm_api_enabled | Enable read-only REST API |
pm_api_key | Send as header X-PM-API-Key |
pm_webhook_url | Outbound webhook endpoint |
pm_webhook_secret | HMAC SHA256 signature in X-PM-Signature |
API endpoints
| Method | URL | Description |
|---|---|---|
| -------- | ----- | ------------- |
| GET | /purchase_management/api | API info |
| GET | /purchase_management/api/suppliers | Supplier list |
| GET | /purchase_management/api/purchase_orders/{id} | PO + lines |
| GET | /purchase_management/api/supplier_bills/{id} | Bill + lines |
| GET | /purchase_management/api/payments/{id} | Payment + allocations |
Webhook events
| Event | When |
|---|---|
| ------- | ------ |
rfq.sent | RFQ emailed to suppliers |
supplier_bill.approved | Bill approved |
supplier_bill.cancelled | Approved bill cancelled |
supplier_payment.recorded | Payment saved |
supplier_payment.voided | Payment voided |
---
Security
Implemented in Phase 15:
| Control | Implementation |
|---|---|
| --------- | ---------------- |
| POST-only destructive actions | pm_require_post(), pm_require_post_or_ajax() on delete/void/approve/reject/cancel/submit/send/post |
| CSRF on delete links | assets/js/purchase_management.js converts _delete links to POST with token |
| Upload validation | MIME check + pm_get_allowed_attachment_rel_types() whitelist |
| Approval integrity | pm_can_act_on_approval_step() — no admin bypass |
| Export throttling | pm_export_rate_limit() on reports and supplier export |
---
Cron & automation
Hook: after_cron_run → purchase_management_cron_tasks()
- Overdue bills:
Supplier_bill_model::check_overdue_bills()marks approved unpaid bills past due date asoverdue.
Ensure Perfex CRM cron is configured and running.
---
Database schema
Prefix: {db_prefix}pm_*
DB version option: pm_db_version = 100
Tables (25)
| Table | Purpose |
|---|---|
| ------- | --------- |
pm_suppliers | Supplier master |
pm_supplier_contacts | Supplier contacts |
pm_supplier_attachments | Supplier files |
pm_purchase_requests | PR header |
pm_purchase_request_items | PR lines |
pm_rfqs | RFQ header |
pm_rfq_items | RFQ lines |
pm_rfq_suppliers | RFQ invited suppliers |
pm_supplier_quotations | Quotation header |
pm_supplier_quotation_items | Quotation lines |
pm_purchase_orders | PO header |
pm_purchase_order_items | PO lines |
pm_goods_receipts | GRN header |
pm_goods_receipt_items | GRN lines |
pm_supplier_bills | Bill header |
pm_supplier_bill_items | Bill lines |
pm_supplier_payments | Payment header |
pm_supplier_payment_allocations | Payment-to-bill splits |
pm_purchase_returns | Return header |
pm_purchase_return_items | Return lines |
pm_purchase_approvals | Approval header |
pm_purchase_approval_steps | Approval steps |
pm_purchase_logs | Audit log |
pm_purchase_settings | Module settings key/value |
pm_stock_movements | GRN stock movement log |
Foreign keys
Applied on install via pm_install_foreign_keys() for core parent/child tables. Failures are logged and skipped on restrictive hosts.
---
Developer reference
Key helpers (`helpers/purchase_management_helper.php`)
| Function | Purpose |
|---|---|
| ---------- | --------- |
pm_can() / pm_require_permission() | Permission checks |
pm_generate_number() | Document numbering |
pm_calculate_line_total() | Line math |
pm_resolve_po_billing_status() | PO billed vs partial logic |
pm_validate_catalog_item() | Manual item enforcement |
pm_validate_grn_warehouse() | Warehouse rules |
pm_get_configured_approvers() | Approval chain |
pm_can_act_on_approval_step() | Approval authorization |
pm_handle_upload() | Secure uploads |
pm_log() | Audit trail + activity log |
Libraries
Pm_pdf— TCPDF document generationPm_export— CSV/Excel/PDF report export
Migrations
Add new file migrations/XXX_version_XXX.php with function pm_run_migration_XXX($CI), register in pm_maybe_upgrade_database().
Tests
tests/
├── bootstrap.php # CI stubs, loads helper
├── LogicTest.php # 26 helper/security tests
├── PaymentLogicTest.php # 14 payment/billing tests
├── ExtensionTest.php # 12 API/role/cancel tests
├── IntegrationTest.php # Optional live DB verification
└── run_all.php
Hooks (module file)
| Hook | Function |
|---|---|
| ------ | ---------- |
admin_init | Menu + permissions + DB upgrade |
get_dashboard_widgets | Dashboard widget |
app_admin_head / app_admin_footer | Assets |
after_cron_run | Overdue bills |
---
Manual QA checklist (recommended)
Before go-live, verify:
- [ ] Activate module; confirm
pm_db_version= 100 - [ ] Role permissions assigned for each team
- [ ] Settings: prefixes, approvers, feature toggles
- [ ] Full cycle: PR → PO → GRN → Bill → Payment (partial + full bill)
- [ ] Multi-bill payment allocation and void
- [ ] Approval approve/reject on PR, PO, Bill
- [ ] Report CSV/Excel/PDF export
- [ ] RFQ send email + PDF download
- [ ] Supplier CSV/Excel export
- [ ] Cron marks overdue bills
- [ ] Run
php modules/purchase_management/tests/run_all.php
---
Nasbix Technologies — Purchase Management v1.0.0
Requirements
| Component | Minimum |
|---|---|
| Perfex CRM | 2.3.0+ (tested on 3.x) |
| PHP | 7.4+ (recommended 8.1+) |
| MySQL / MariaDB | 5.7+ / 10.3+ |
| PHP extensions | mysqli, json, mbstring, curl |
| Perfex CRM cron | Required for overdue bill checks |
Optional modules: Inventory Management (GRN stock sync), Accounting Pro (AP/GL sync), Supplier Portal (supplier linking).
Zero core modifications
Procure-to-Pay Workflow
PR (optional) → RFQ (optional) → PO → GRN → Supplier Bill → Payment
↘ Return (optional)
Document statuses
- PR / PO / Bill / Return: draft → pending approval → approved → (completed/cancelled)
- RFQ: draft → sent → quotations_received → awarded / cancelled
- GRN: draft → posted / cancelled
On create/edit forms, use Save Draft or the primary action button (Submit for Approval, Send, Post GRN) to save and trigger the workflow in one step.
Permissions
11 permission groups under Setup → Staff → Permissions → Purchase Management. Admins bypass all checks.
| Feature | Capabilities |
|---|---|
| Dashboard | view |
| Suppliers | view, create, edit, delete |
| Purchase Requests | view, create, edit, delete, approve |
| RFQ | view, create, edit, delete |
| Purchase Orders | view, create, edit, delete, approve |
| GRN | view, create, edit, delete |
| Supplier Bills | view, create, edit, delete, approve |
| Payments | view, create, edit, delete |
| Returns | view, create, edit, delete, approve |
| Reports | view, export |
| Settings | view, edit, manage |
Key Settings
| Setting | Description |
|---|---|
| Feature toggles | Enable/disable PR, RFQ, returns |
| Approval routing | Staff-based or role-based multi-level approvers |
| Warehouse integration | auto / required / disabled for GRN |
| REST API | Enable + API key (read-only endpoints) |
| Webhooks | Independent toggle + HTTPS endpoint URL + HMAC secret |
REST API
Read-only API. Enable in Settings, then send header X-PM-API-Key: your-key.
GET /purchase_management/api/suppliers
GET /purchase_management/api/purchase_orders/{id}
GET /purchase_management/api/supplier_bills/{id}
GET /purchase_management/api/payments/{id}
Rate limited (default 60 requests/minute). Returns JSON.
Outbound Webhooks
Enable webhooks separately from the API. Configure a public HTTPS endpoint URL and optional HMAC secret.
Events: rfq.sent, supplier_bill.approved, supplier_bill.cancelled, supplier_payment.recorded, supplier_payment.voided
Payload includes event, timestamp, and payload. Signature in X-PM-Signature header when secret is set.
Module Integrations
- Inventory Management — GRN posting increases stock; cancellation reverses
- Accounting Pro — Approved bills and payments sync to accounts payable
- Supplier Portal — Link PM suppliers to portal accounts (admin-side)
FAQ
Do I need to edit Perfex CRM core files?
No. The module is fully self-contained under /modules/purchase_management/.
What happens when I uninstall?
Uninstall drops all pm_* database tables, removes module options, and deletes uploads/purchase_management/.
How do RFQ supplier invitations work?
Select invited suppliers when creating an RFQ. On send, only invited suppliers receive the email (with PDF). If none selected, all active suppliers with email addresses are notified. Quotations are entered by staff in the admin panel.
Can suppliers submit quotations online?
Staff enter quotations in admin. External supplier self-service is planned for the optional Supplier Portal module.
After activation — configuration checklist
- Go to Setup → Modules and click Activate.
- Open any Purchase menu — schema migration runs automatically (DB v100).
- Configure Purchase Management → Settings.
- Optional: click Load Demo Data in Settings to seed sample records.
- Assign permissions under Setup → Staff → Permissions.
One-time setup (first time only)
- Setup → Modules → activate Purchase Management.
- Setup → Staff → Roles → assign Purchase Management permissions (view, create, edit, delete, approve, export, settings as needed).
- Open Purchase Management → Settings and complete company defaults, prefixes, integrations, and notification options.
- Create master data (warehouses, products, templates, accounts, routes, etc.) before processing live transactions.
- Enable Perfex CRM cron (
php /path/to/perfex/index.php cron/index) for sync, retries, alerts, and scheduled jobs. - Optionally enable REST API / webhooks in module settings if you integrate external systems.
Tips for success
- Always configure Settings before creating live transactions.
- Create master data (items, warehouses, templates, channels, accounts) first — most modules block incomplete records.
- Use a test/sample record before going live with real customers or production stock.
- Separate roles: operators create/edit; managers approve; finance/reporting get view/export only.
- After any module upgrade, reopen Settings and confirm new options have sensible defaults.
- If overnight jobs fail, verify Perfex CRM cron and check the module log / failed queue screen.
Common questions (FAQ)
Where do I find the module after activation?
In the admin sidebar look for Purchase Management. If missing, your role may lack view permission — fix under Setup → Staff → Roles.
Do I need to edit core Perfex CRM files?
No. Keep all custom code under modules/purchase_management/. Activate/deactivate from Setup → Modules.
What happens if I uninstall?
Deactivate keeps data. Uninstall usually removes module tables/options (see the Install article). Core customers, invoices, and items are not deleted by well-built modules.
Why can't my staff see a screen?
Almost always a permissions issue. Give the role at least view on that feature, then ask the user to log out and back in.
Reports/export buttons do nothing
Confirm the role has export (or view reports) permission, and that filters return at least one row. Try PDF/CSV from a wider date range.
FAQ from module documentation
Support
For implementation questions, refer to docs/DOCUMENTATION.md and inline pm_* helper functions in helpers/purchase_management_helper.php.
Nasbix Technologies
Perfex CRM Knowledge Base — detailed usage guide generated from module README, HOW_TO_USE, and documentation.