CRMconnect Azuvio · Docs

Workflow: Warehouse Inbound → Outbound

Modules involved: Warehouse (Goods Receipt · Goods Issue · Delivery Notes · Internal Transfers · Physical Inventory · Loss & Adjustments)
Who uses it: Warehouse keeper, Logistics operator, Warehouse manager, Finance
Typical duration: Ongoing (daily operational flow)

Overview

All stock movements in CRMConnect pass through a central transaction register (goods_transaction_detail) that records every inbound and outbound movement with the before and after quantities. Any warehouse document (goods receipt note, goods issue note, delivery note, internal transfer) only modifies stock after approval, with a complete audit trail.


Flow diagram

INBOUND
  │
  ├── [GOODS RECEIPT NOTE]
  │     │  sources: Purchase Order / Manual
  │     │  approval: 0=Draft → 1=Approved
  │     │  transaction status: 1 (Receipt)
  │     │  stock += received quantity
  │
  └── [DELIVERY RETURN]
        │  product returned by client → re-entry into stock
        │  transaction status: negative (negative quantity on Delivery)

INTERNAL MOVEMENTS
  │
  └── [INTERNAL TRANSFER]
        │  from Warehouse A → Warehouse B
        │  approval: 0=Draft → 1=Approved
        │  transaction status: 4 (Internal)

OUTBOUND
  │
  ├── [GOODS ISSUE NOTE]
  │     │  internal consumption (manufacturing, own use)
  │     │  approval: 0=Draft → 1=Approved
  │     │  transaction status: 3 (Issue)
  │     │  stock -= consumed quantity
  │
  └── [DELIVERY NOTE]
        │  delivery to client (linked to invoice / order)
        │  approval: 0=Draft → 1=Approved
        │  transaction status: 2 (Delivery)
        │  stock -= delivered quantity

CORRECTIONS
  │
  ├── [PHYSICAL INVENTORY]
  │     │  physical count → adjustment against book stock
  │     │  approval: 0=Draft → 1=Approved
  │
  └── [LOSS & ADJUSTMENTS]
        │  damage, expired goods, identified shortages
        │  status: 1=Approved / -1=Rejected
        │  transaction status: 6 (Loss)

Central stock register

All warehouse documents record a line in goods_transaction_detail upon approval. This is the source of truth for the balance of each product in each warehouse.

Transaction codes (status):

Code Movement type Source document Stock effect
1 Goods Receipt Goods Receipt Note + inbound
2 Goods Delivery Delivery Note outbound
3 Goods Issue Goods Issue Note outbound
4 Internal Transfer Internal Transfer Note from source / + at destination
6 Loss / Adjustment Loss & Adjustments + or

Fields recorded per transaction:

Field Description
commodity_id The product / commodity
warehouse_id Affected warehouse
quantity Quantity moved
old_quantity Balance before movement
date_add Transaction timestamp
lot_number / expiry_date Lot and expiry tracking
serial_number Product serial number (if applicable)
from_stock_name / to_stock_name Source/destination warehouse (for transfers)

Step by step

1. Goods Receipt Note — Receiving goods

Where: /admin/warehouse/manage_purchase

Creation:

  • Automatically from an approved Purchase Order (if auto_create_goods_received = 1 in settings)
  • Manually: Add Goods Receipt Note button
  • From the Purchase module: Create Goods Receipt Note button on the PO

Key fields:

Field Notes
goods_receipt_code Auto-generated code (prefix NK + number)
warehouse_id Destination warehouse
supplier_code / name The vendor
pr_order_id Associated purchase order
lot_number Lot number (for FIFO tracking)
date_manufacture / expiry_date Manufacturing date / expiry date

Approval:

  • approval = 0 (Draft) → warehouse keeper review
  • approval = 1 (Approved) → stock is automatically updated: inventory_manage.inventory_number += quantity
  • If the approval workflow is configured (wh_approval_setting): manager approves via notification
  • Cannot be edited after approval (stock integrity protection)

2. Goods Issue Note — Internal outbound

Where: /admin/warehouse/goods_issue_note

When it is used:
Consumption of materials for internal purposes: manufacturing (linked to MO), own use, departments.

Key fields:

Field Notes
goods_delivery_code Generated code (prefix XK + number)
warehouse_id Source warehouse
rel_type / rel_document Origin document (Manufacturing Order, etc.)
project / department Consumption context

Effect: On approval → stock decreases: inventory_number -= quantity (transaction code 3)


3. Delivery Note — Delivery to client

Where: /admin/warehouse/manage_delivery

Creation:

  • From invoice or OmniSales order (automatically if auto_create_goods_delivery = 1)
  • Manually from the Warehouse module

Delivery types:

  • type_of_delivery = 'total' — complete delivery
  • type_of_delivery = 'partial' — partial delivery (the rest will be delivered later)

Key fields:

Field Notes
goods_delivery_code Auto-generated code
customer_code / name Recipient client
rel_type 1=invoice, 2=sales order, 3=manual
rel_document ID of the origin document
invoice_id Associated invoice
delivery_status ready_for_packingwh_ready_to_deliver (after Packing List)
shipping_fee Shipping cost included in the document

Approval → Packing List → AWB:
The approved delivery note feeds the packing and delivery workflow (see Workflow 3 — OmniSales Fulfillment).

Effect: On approval → stock decreases (transaction code 2)


4. Internal Transfer — Moving between warehouses

Where: /admin/warehouse/manage_internal_delivery

When it is used:
Moving stock from warehouse A to warehouse B (e.g. from central warehouse to a work site, from WIP to finished goods).

Key fields:

Field Notes
internal_delivery_code Prefix ID + number
from_stock_name Source warehouse (ID)
to_stock_name Destination warehouse (ID)
available_quantity Available stock at source
quantities Quantity transferred

Effect: On approval → two transactions code 4:

  • Source warehouse: inventory_number -= quantity
  • Destination warehouse: inventory_number += quantity

5. Physical Inventory — Stock reconciliation

Where: /admin/warehouse/physical_inventory

Process:

  1. Create an inventory session for a warehouse / category
  2. Enter the physically counted quantities per product
  3. System compares with book stock from inventory_manage
  4. Differences (surpluses/shortages) are visible per product
  5. On approval (approval = 1) → adjustments are automatically applied to stock

Session fields:

Field Notes
stock_take_code Document code
warehouse_id Warehouse being inventoried
date_stock_take Inventory date
Details: current_number Book stock at time of inventory
Details: updates_number Physically counted quantity

6. Loss & Adjustments — Spot corrections

Where: /admin/warehouse/loss_adjustment

Types:

type Description Examples
loss Loss / damage Expired, broken, stolen products
adjustment Book adjustment Correction of a previous recording error

Statuses:

status Description
1 Approved — adjustment applied to stock
-1 Rejected — no stock change

Fields:

Field Notes
type loss or adjustment
reason Reason for adjustment (required)
warehouses Affected warehouse
current_number Stock before adjustment
updates_number Stock after adjustment

Lot and serial number tracking

CRMConnect supports advanced tracking:

Feature Field Where it is set
Lot number lot_number At receipt; tracked per delivery (FIFO)
Manufacturing date date_manufacture At receipt
Expiry date expiry_date At receipt; configurable alert
Serial number serial_number Per unit; separate table wh_inventory_serial_numbers

Delivery automatically selects lots in FIFO order (first in, first out) when lot_number is filled in.


Approval workflow (configurable)

Any warehouse document can go through a multi-level approval workflow:

  1. Document created → approval = 0
  2. Notification sent to approvers from wh_approval_setting
  3. Approver reviews and approves/rejects in wh_approval_details
  4. On approval: approval = 1 → stock is modified
  5. On rejection: document remains at approval = 0, can be edited and resubmitted

Document types with configurable approval: goods_receipt · goods_delivery · internal_delivery_note · stock_take


What is created automatically

Event Created automatically
Purchase Order approved (if enabled) Draft Goods Receipt Note
OmniSales invoice generated (if enabled) Draft Delivery Note
Goods Receipt Note approved Transaction code 1 in goods_transaction_detail
Delivery Note approved Transaction code 2; stock deducted
Goods Issue Note approved Transaction code 3; stock deducted
Internal Transfer approved Two transactions code 4 (source − / destination +)
Physical Inventory approved Adjustments automatically applied per product
Manufacturing Order → done Finished product added to warehouse; stock transaction

Points where the workflow may stall

Problem Likely cause Solution
Stock not updated after receipt Receipt note is at approval = 0 (draft) Approve the document
Cannot edit an approved receipt note Integrity protection — approval = 1 blocks editing Create a separate adjustment/correction note
Stock drops below 0 on delivery Shortage in stock or wrong lot Check availability per lot in Warehouse History
Internal transfer does not appear at destination Document not approved Approve the transfer note
Inventory shows large differences from physical count Pending unapproved transactions Check all documents at approval = 0 before inventory

Relevant reports

  • Inventory History/admin/warehouse/warehouse_history — all transactions per product/warehouse
  • Warehouse Reports/admin/warehouse/manage_report — current stock levels, movements by period
  • Current Inventory — real-time balances per warehouse and product

Modules involved — detailed documentation

← Back to Workflows

Tip

Create the Goods Receipt Note on the same day goods arrive — delayed GRN creation means stock is physically present but not in the system, leading to incorrect availability data for sales quoting and purchase reorder triggers.

Warning

Never dispatch goods without a finalised Delivery Note. Stock does not decrement in the system without a confirmed delivery note — a shipment that leaves without one creates phantom stock that surfaces as a discrepancy at the next physical inventory count.