tables · table
podtl
The podtl table serves as the granular transaction layer for Purchase Orders (POs) within the ERP system. It stores line-item details for each order, including quantities, unit rates, part numbers, and delivery schedules. This table is central to sales and distribution, providing the "per-item" logic for order fulfillment, scheduling, and invoicing.
Row count
4,330
Last entry
2026-01-15
Source
tables
Columns
18| Column | Type | Nullable | Meaning |
|---|---|---|---|
compcode | string | No | Unique identifier for the company/branch. |
pono | string | No | Purchase Order Number assigned by the customer. |
custcode | string | No | Internal identifier for the Customer. |
itemcode | string | No | Internal system code for the product. |
itemqty | number | Yes | Total quantity ordered for this specific line item. |
itemrate | number | Yes | Unit price for the item as agreed in the PO. |
uom | string | Yes | Unit of Measure. |
discount | number | Yes | Percentage or fixed discount applied to the item rate. |
partno | string | Yes | External/Customer part number for reference. |
lock | string | Yes | Status flag indicating if the item is frozen for changes. |
amndno | number | Yes | Revision/Amendment number of the PO line item. |
amnddate | datetime | Yes | Date when the specific amendment was performed. |
modepack | string | Yes | Specific packing instructions/mode for the item. |
packqty | string | Yes | Quantity per package/container. |
directdespatch | string | Yes | Flag indicating if the item ships directly to a site. |
remarks | string | Yes | Operational comments for the specific line item. |
deliverydate | datetime | Yes | Target date for the item to be delivered. |
Gross_Rate | number | Yes | Base rate before any adjustments (often identical to itemrate). |
Full documentation
### 1) Overview The `podtl` table serves as the granular transaction layer for Purchase Orders (POs) within the ERP system. It stores line-item details for each order, including quantities, unit rates, part numbers, and delivery schedules. This table is central to sales and distribution, providing the "per-item" logic for order fulfillment, scheduling, and invoicing. ### 2) Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **compcode** | string | No | Unique identifier for the company/branch. | e.g., "DAS" | Primary join key and filter for multi-tenant data. | | **pono** | string | No | Purchase Order Number assigned by the customer. | e.g., "P22917" | Major join key to link line items to `pohdr`. | | **custcode** | string | No | Internal identifier for the Customer. | e.g., "EBR" | Join key to `cust` table. | | **itemcode** | string | No | Internal system code for the product. | e.g., "EBR" | Join key to `itemmas` or `saleitemmas`. | | **itemqty** | number | Yes | Total quantity ordered for this specific line item. | > 0 | Used for balance calculations and fulfillment tracking. | | **itemrate** | number | Yes | Unit price for the item as agreed in the PO. | e.g., 105.44 | Used for calculating order and invoice values. | | **uom** | string | Yes | Unit of Measure. | "Nos", "KGS", "MTR" | Determines quantity logic in reporting. | | **discount** | number | Yes | Percentage or fixed discount applied to the item rate. | 0.00 | Revenue calculation logic. | | **partno** | string | Yes | External/Customer part number for reference. | e.g., "G0120.HIBB" | Used for cross-referencing with customer documents. | | **lock** | string | Yes | Status flag indicating if the item is frozen for changes. | "N" (No), "Y" (Yes) | Control flag for order amendments. | | **amndno** | number | Yes | Revision/Amendment number of the PO line item. | 0, 1, 2... | Versioning of order details. | | **amnddate** | datetime | Yes | Date when the specific amendment was performed. | ISO Date | Audit trailing. | | **modepack** | string | Yes | Specific packing instructions/mode for the item. | Likely Nullable | Shipping instructions. | | **packqty** | string | Yes | Quantity per package/container. | Numeric String | Logistics planning. | | **directdespatch** | string | Yes | Flag indicating if the item ships directly to a site. | "Y", "N" | Logistics/Dispatch routing. | | **remarks** | string | Yes | Operational comments for the specific line item. | Free text | Internal notes. | | **deliverydate** | datetime | Yes | Target date for the item to be delivered. | ISO Date | Used in `PendSchDateWise` and scheduling reports. | | **Gross_Rate** | number | Yes | Base rate before any adjustments (often identical to itemrate). | e.g., 105.44 | Pricing audits. | ### 3) Relationships & Join Map The `podtl` table functions as a child table to Purchase Order headers and a parent/reference to Order Allocation and Invoicing details. #### Primary Joins (SCHEMA_MAP Authoritative) * **pohdr**: Join on `(compcode, pono, custcode)`. Used to link item details to order-level terms (locked status, currency). * **itemmas**: Join on `(compcode, itemcode)`. Used to fetch internal item descriptions, finish weights, and HSN codes. * **cust**: Join on `(compcode, custcode)`. Used to retrieve customer names and group categories. * **oadtl (Order Allocation)**: Join on `(compcode, pono, itemcode)`. Links customer POs to internal production/sales schedules. #### Secondary Joins (Inferred/Reference Grounded) * **invdtl**: Join on `(compcode, pono, itemcode)`. Used to track fulfilled vs. pending quantities (Scheduled vs. Despatched). * **saleitemmas**: Join on `(compcode, itemcode)`. (Likely) used in sales reporting to correlate raw item codes with sales-specific attributes. * **podtlamnd**: Join on `(compcode, pono, itemcode, amndno)`. To compare current details against previous order versions.