Inventory Management — Overview & module guide

Module: Inventory Management v1.1.0

Enterprise inventory management module for BIXCRM

Screen-by-screen guides (each tab explained)

Click a menu item below for step-by-step instructions on that Inventory Management screen:

How to use in BIXCRM (daily operations)

  1. Sign in to the admin area with a role that includes Inventory Management permissions.
  2. Open Inventory Management (sidebar) or search for Inventory Management in the admin menu.
  3. Start on the Dashboard (if available) to see open tasks, pending approvals, and KPIs.
  4. Review Settings after upgrades — new options may need defaults for your company.
  5. Create or import master data first; most modules block transactions until masters exist.
  6. Run the main business flow (create → submit → approve → post/complete) using the screens listed in Admin menu below.
  7. Use Reports / Analytics screens to reconcile stock, finance, compliance, or SLA metrics.
  8. For integrations (API, EDI, gateways, tax), confirm credentials in Settings and monitor logs or webhook delivery screens.
  9. Train staff with role-based access — give approvers approve permissions only, operators create/edit on their area.
  10. If something fails overnight, check BIXCRM cron ran and open the module log / failed queue screen if present.

Admin menu — where to work

Open the Inventory Management section in the admin sidebar. Screens your staff may use (depending on role):

  • Audit Logs
  • Batch & Serial Tracking
  • Dashboard
  • Inventory
  • Locations / Bins
  • Low Stock Alerts
  • Opening Stock
  • Purchase Receiving
  • Reorder Rules
  • Reports
  • Settings
  • Stock
  • Stock Adjustments
  • Stock Movements
  • Stock Overview
  • Stock Transfers
  • Warehouses

Detailed guide — features, workflows, API & FAQ

Features

Dashboard & stock

  • Live dashboard with stock value, movement trends, low-stock count, and expiring items
  • Multi-warehouse stock overview with batch/serial/expiry columns
  • Opening stock entry
  • Stock movements ledger (full audit trail)

Warehouses & locations

  • Warehouse CRUD with manager assignment
  • Bin/location management (zone, aisle, rack, shelf, bin code)

Operations

  • Stock transfers — draft → approval → in transit → received workflow
  • Stock adjustments — increase/decrease with optional approval
  • Reorder rules — min/max qty per item/warehouse
  • Low stock alerts — in-app notifications and email (realtime + cron)

Batch, serial & expiry

  • Batch/serial tracking on stock rows
  • Batch/serial CRUD with status badges
  • Expiry alerts for stock nearing expiration

Purchase integration

  • Syncs with Purchase Management module (modules/purchase_management/)
  • GRN posting updates inventory stock and creates movements
  • GRN cancel reverses stock correctly
  • Mirrors GRN records in inventory_purchase_receives

Reports & audit

  • Stock valuation, movement, transfer, adjustment, and expiry reports
  • CSV export on supported reports
  • Full audit log viewer with detail view and CSV export

BIXCRM integration

  • Invoice stock deduction (configurable trigger: manual, creation, sent, paid)
  • Credit note stock restoration (v1.1.0)
  • Invoice cancel/delete stock restoration (v1.1.0)
  • Estimate stock reservation (optional)
  • “Manage Stock” link on invoice item modal and items list

REST API (v1.1.0)

  • Read-only endpoints for warehouses, stock, movements, and low stock
  • API key authentication (X-INV-API-Key)
  • Disabled by default — enable in Settings

Cron & email alerts

  • Low stock alerts from reorder rules
  • Expiry alerts from stock rows within alert window
  • Cooldown deduplication via inventory_alert_logs
  • Recipients: warehouse manager, optional extra staff IDs, active admins

---

Requirements

RequirementNotes
--------------------
BIXCRM2.3.x or later
PHP7.4+ (8.x supported)
MySQL / MariaDBInnoDB
BIXCRM cronRequired for scheduled alerts
Purchase ManagementOptional — for GRN sync

---

Permissions

Feature keyCapabilitiesMenu area
--------------------------------------
inventory_managementviewDashboard
inventory_dashboardviewDashboard widget
inventory_warehouseview, create, edit, deleteWarehouses, Locations
inventory_stockview, create, edit, adjustStock, Movements, Transfers*, Adjustments*, Batches, Reorder, Purchases
inventory_transferview, create, approve, receiveStock transfers
inventory_adjustmentview, create, approveStock adjustments
inventory_reportsview, exportReports, Audit logs
inventory_settingsview, editSettings

\* Transfer and adjustment capabilities use their own feature keys when approval workflows apply.

---

Quick start

  1. Create a warehouse — Inventory Management → Warehouses
  2. Add locations (optional) — Inventory Management → Locations / Bins
  3. Enter opening stock — Inventory Management → Opening Stock
  4. Set reorder rules — Inventory Management → Reorder Rules
  5. Review dashboard — Inventory Management → Dashboard

---

Settings reference

OptionDefaultDescription
------------------------------
inventory_enable_negative_stock0Allow stock to go below zero
inventory_stock_deduction_triggermanualWhen invoices deduct stock
inventory_enable_batch_tracking1Track batch numbers on stock
inventory_enable_serial_tracking1Track serial numbers on stock
inventory_enable_expiry_alerts1Include expiry in cron alerts
inventory_expiry_alert_days30Days ahead for expiry alerts
inventory_default_warehouse0Default warehouse for operations
inventory_valuation_methodaverageaverage or fifo
inventory_auto_reorder_alerts1Low stock notifications
inventory_transfer_approval_required1Transfers need approval
inventory_adjustment_approval_required1Adjustments need approval
inventory_show_item_tab1Show stock links on items
inventory_enable_estimate_reservation0Reserve stock on estimates
inventory_sync_purchase_management1Sync GRN from Purchase Management
inventory_cron_alerts_enabled1Run alerts on BIXCRM cron
inventory_cron_email_alerts1Send email in addition to notifications
inventory_cron_alert_cooldown_hours24Hours before same alert repeats
inventory_cron_alert_staff_ids(empty)Comma-separated extra staff IDs
inventory_restore_stock_on_credit_note1Restore stock when credit note is created
inventory_restore_stock_on_invoice_cancel1Restore stock when invoice cancelled/deleted
inventory_api_enabled0Enable read-only REST API
inventory_api_key(auto-generated)Send as header X-INV-API-Key

Configure under Inventory Management → Settings. Use Run Alerts Now to test cron alerts without waiting for the scheduler.

---

Workflows

Stock transfer

Draft → Request approval → Approved → In transit → Received
                ↓                              ↓
            Rejected                        Cancelled

When approval is required (default), stock is reserved/deducted at the appropriate stage and received into the destination warehouse.

Stock adjustment

Draft → Pending approval → Approved (stock updated)
                ↓
            Rejected

Low stock alert

Triggered when available_qty <= min_qty on an active reorder rule:

  • Realtime — on stock update via inventory_management_notify_low_stock()
  • Cron — scans all reorder rules on each cron run
  • Respects cooldown per item/warehouse combination

Expiry alert

Triggered when stock has expiry_date within inventory_expiry_alert_days and qty_available > 0.

---

Purchase Management integration

When Purchase Management is installed and sync is enabled:

HookAction
--------------
pm_after_grn_postedIncrease stock, create movement, mirror receive record
pm_after_grn_cancelledReverse stock (deduct qty added by GRN)
pm_after_purchase_return_completedAudit log entry

Stock updates are idempotent — duplicate movements for the same reference are prevented.

Manual purchase receiving is still available under Inventory Management → Purchase Receiving for non-GRN workflows.

---

Cron alerts

Registered with BIXCRM via:

  • after_cron_run → inventory_management_cron_handler
  • numbers_of_features_using_cron_job — counts this module when enabled
  • used_cron_features — shows “Inventory Management stock & expiry alerts”

Recipients (in order):

  1. Warehouse manager (inventory_warehouses.manager_id)
  2. Extra staff from inventory_cron_alert_staff_ids
  3. All active admin staff

Deduplication: Alerts are logged in inventory_alert_logs. The same alert key is not sent again within the cooldown window.

---

BIXCRM hooks used

Outbound (this module registers)

HookHandler
---------------
after_invoice_addedStock deduction on invoice creation
invoice_status_changedStock deduction on sent/paid
after_payment_addedStock deduction when invoice paid
after_estimate_added/updated/deletedStock reservation
before_invoice_item_modal_form_close“Manage Stock” button
app_admin_footerItem list stock link
pm_after_grn_postedPurchase sync
pm_after_grn_cancelledPurchase sync reversal
pm_after_purchase_return_completedPurchase return audit
after_invoice_deletedRestore stock on invoice delete
invoice_marked_as_cancelledRestore stock on invoice cancel
after_create_credit_noteRestore stock on credit note
created_credit_note_from_invoiceRestore stock (idempotent)
after_cron_runLow stock & expiry alerts

Filters

FilterPurpose
-----------------
get_dashboard_widgetsDashboard widget
numbers_of_features_using_cron_jobCron feature count
used_cron_featuresCron feature label

---

Development notes

Items table column

BIXCRM stores items in tblitems with primary key id, not itemid. Dropdowns alias id AS itemid via inventory_management_get_items(). Always join on items.id.

Date filters in queries

Avoid CodeIgniter query builder with DATE() or DATE_FORMAT() in WHERE clauses — use raw SQL or datetime ranges. This prevents DataTables infinite loading and dashboard SQL errors.

DataTables JSON format

Server-side tables must return:

{
  "draw": 1,
  "iTotalRecords": 0,
  "iTotalDisplayRecords": 0,
  "aaData": []
}

Use inventory_management_get_table_path() for table view paths.

Paths in module code

Prefer FCPATH . 'modules/inventory_management/' over module_dir_path() inside models and helpers.

Helper functions (common)

FunctionPurpose
-------------------
inventory_management_can($cap, $feature)Permission check
inventory_update_stock()Increase/decrease stock
inventory_create_movement()Log stock movement
inventory_create_audit_log()Write audit entry
inventory_get_low_stock_items()Low stock query
inventory_management_dispatch_alert()Send notification + email

---

Troubleshooting

SymptomLikely causeFix
----------------------------
Stock Overview table spins foreverWrong items join (itemid vs id)Ensure joins use items.id
Dashboard SQL errorDATE_FORMAT in query builder WHEREUse raw SQL (fixed in Stock_model)
GRN cancel adds stockWrong qty direction in purchase syncUpdate Purchase Management helper
No cron alertsCron not running or alerts disabledEnable cron + settings; use Run Alerts Now
Duplicate alert emailsCooldown too lowIncrease inventory_cron_alert_cooldown_hours
Purchase sync not workingPM module inactive or sync disabledEnable PM module + setting
Item stock link missingSetting disabled or wrong pageEnable inventory_show_item_tab; check invoice items page

Check Setup → Activity Log for inventory cron summaries and sync errors.

---

Extended module documentation

Requirements

ItemVersion
---------------
BIXCRM2.3.x+
PHP7.4+ (8.x supported)
MySQL / MariaDBInnoDB
BIXCRM cronRequired for scheduled alerts

Optional: Purchase Management module for GRN sync.

---

Permissions

FeatureCapabilities
----------------------
inventory_managementview (dashboard)
inventory_warehouseview, create, edit, delete
inventory_stockview, create, edit, adjust
inventory_transferview, create, approve, receive
inventory_adjustmentview, create, approve
inventory_reportsview, export
inventory_settingsview, edit

---

Workflows

Stock transfer

Draft → Requested → Approved → In transit → Completed
              ↓
          Rejected / Cancelled

Stock adjustment

Draft → Pending approval → Approved
              ↓
          Rejected

Sales integration

EventStock action
--------------------
Invoice (per trigger setting)Deduct stock (sale_issue)
Credit note createdRestore stock (stock_return)
Invoice cancelled/deletedRestore net remaining stock

Settings control credit note and invoice restoration independently.

---

REST API

Enable under Settings → API Settings.

EndpointDescription
-----------------------
GET /inventory_management/apiModule info
GET /inventory_management/api/warehousesAll warehouses
GET /inventory_management/api/stockStock rows (filter: warehouse_id)
GET /inventory_management/api/stock/{item_id}Stock for one item
GET /inventory_management/api/movementsRecent movements (filters: item_id, warehouse_id, movement_type, limit)
GET /inventory_management/api/low_stockLow stock from reorder rules

Authentication: Header X-INV-API-Key: your-key or query ?api_key=your-key

API is read-only and disabled by default.

---

Purchase Management integration

HookAction
--------------
pm_after_grn_postedIncrease stock + mirror receive
pm_after_grn_cancelledAudit (stock reversed by PM)
pm_after_purchase_return_completedAudit log

---

Cron alerts

Registered on after_cron_run. Sends low-stock and expiry alerts with cooldown deduplication via inventory_alert_logs.

---

Extended module documentation

Requirements

ItemVersion
---------------
BIXCRM2.3.x+
PHP7.4+ (8.x supported)
MySQL / MariaDBInnoDB
BIXCRM cronRequired for scheduled alerts

Optional: Purchase Management module for GRN sync.

---

Permissions

FeatureCapabilities
----------------------
inventory_managementview (dashboard)
inventory_warehouseview, create, edit, delete
inventory_stockview, create, edit, adjust
inventory_transferview, create, approve, receive
inventory_adjustmentview, create, approve
inventory_reportsview, export
inventory_settingsview, edit

---

Workflows

Stock transfer

Draft → Requested → Approved → In transit → Completed
              ↓
          Rejected / Cancelled

Stock adjustment

Draft → Pending approval → Approved
              ↓
          Rejected

Sales integration

EventStock action
--------------------
Invoice (per trigger setting)Deduct stock (sale_issue)
Credit note createdRestore stock (stock_return)
Invoice cancelled/deletedRestore net remaining stock

Settings control credit note and invoice restoration independently.

---

REST API

Enable under Settings → API Settings.

EndpointDescription
-----------------------
GET /inventory_management/apiModule info
GET /inventory_management/api/warehousesAll warehouses
GET /inventory_management/api/stockStock rows (filter: warehouse_id)
GET /inventory_management/api/stock/{item_id}Stock for one item
GET /inventory_management/api/movementsRecent movements (filters: item_id, warehouse_id, movement_type, limit)
GET /inventory_management/api/low_stockLow stock from reorder rules

Authentication: Header X-INV-API-Key: your-key or query ?api_key=your-key

API is read-only and disabled by default.

---

Purchase Management integration

HookAction
--------------
pm_after_grn_postedIncrease stock + mirror receive
pm_after_grn_cancelledAudit (stock reversed by PM)
pm_after_purchase_return_completedAudit log

---

Cron alerts

Registered on after_cron_run. Sends low-stock and expiry alerts with cooldown deduplication via inventory_alert_logs.

---

Features

Enterprise inventory management module for BIXCRM

  • Live dashboard with stock value, movement trends, low-stock count, and expiring items
  • Multi-warehouse stock overview with batch/serial/expiry columns
  • Opening stock entry
  • Stock movements ledger (full audit trail)
  • Warehouse CRUD with manager assignment
  • Bin/location management (zone, aisle, rack, shelf, bin code)
  • **Stock transfers** — draft → approval → in transit → received workflow
  • **Stock adjustments** — increase/decrease with optional approval
  • **Reorder rules** — min/max qty per item/warehouse
  • **Low stock alerts** — in-app notifications and email (realtime + cron)
  • Batch/serial tracking on stock rows
  • Batch/serial CRUD with status badges
  • Expiry alerts for stock nearing expiration
  • Syncs with **Purchase Management** module (`modules/purchase_management/`)
  • GRN posting updates inventory stock and creates movements
  • GRN cancel reverses stock correctly
  • Mirrors GRN records in `inventory_purchase_receives`
  • Stock valuation, movement, transfer, adjustment, and expiry reports
  • CSV export on supported reports
  • Full audit log viewer with detail view and CSV export

Permissions

Granular staff capabilities are registered on activation. Assign them under Setup → Staff → Roles for the Inventory Management capability group.

Typical capabilities include view, create, edit, delete, plus module-specific actions (approve, export, settings, API access).

Cron Jobs

Background tasks (if enabled) run through BIXCRM's main cron. Example crontab (every 5 minutes):

* * * * * php /path/to/bixcrm/index.php cron/index > /dev/null 2>&1

Check module settings for scheduled jobs (alerts, sync, reports, retention).

After activation — configuration checklist

  1. Go to Setup → Modules and activate Inventory Management.
  2. If prompted, click Upgrade Database or reload admin — migrations run automatically.
  3. Assign permissions under Setup → Staff → Roles.
  4. Open the module menu and configure settings.
  5. BIXCRM 3.0+
  6. PHP 7.4+ (8.1+ recommended)
  7. MySQL 5.7+ / MariaDB 10.3+ (InnoDB)
  8. PHP extensions: mysqli, json, mbstring, curl, fileinfo

Staff permissions (from module)

Assign under Setup → Staff → Roles. Each feature can expose different actions:

FeatureActions
Inventory
inventory_management
view
Dashboard
inventory_dashboard
view
Warehouses
inventory_warehouse
view, create, edit, delete
Stock
inventory_stock
view, create, edit, adjust
Stock Transfers
inventory_transfer
view, create, approve, receive
Stock Adjustments
inventory_adjustment
view, create, approve
Reports
inventory_reports
view, export
Settings
inventory_settings
view, edit

One-time setup (first time only)

  1. Setup → Modules → activate Inventory Management.
  2. Setup → Staff → Roles → assign Inventory Management permissions (view, create, edit, delete, approve, export, settings as needed).
  3. Open Inventory Management → Settings and complete company defaults, prefixes, integrations, and notification options.
  4. Create master data (warehouses, products, templates, accounts, routes, etc.) before processing live transactions.
  5. Enable BIXCRM cron (php /path/to/bixcrm/index.php cron/index) for sync, retries, alerts, and scheduled jobs.
  6. Optionally enable REST API / webhooks in module settings if you integrate external systems.

BIXCRM Knowledge Base — usage guide generated from module README and documentation.

Did you find this article useful?