All tables
tables · table

joboahdr

The joboahdr table serves as the Job Order Advice Header. It records the high-level metadata for advice documents issued to vendors regarding job orders. It acts as the primary link between a vendor (vendcode) and a specific Job Purchase Order (jobpono), facilitating tracking of authorized job work schedules and their corresponding receipts in the manufacturing and inspection modules.

Row count
913
Last entry
2026-01-15
Source
tables

Columns

8
ColumnTypeNullableMeaning
indexintegerNoInternal primary key for the record.
compcodestringNoUnique identifier for the company/branch.
joboanointegerNo**Job Order Advice Number**: The unique document ID for the advice.
joboadatedatetimeNoThe date the Job Order Advice was created.
vendcodestringNoForeign key to the Vendor Master table.
jobponostringYesThe associated Job Purchase Order Number.
jobpodatedatetimeYesThe date of the associated Job Purchase Order.
auth_flagstringYesAuthorization status of the advice document.

Full documentation

### 1. Overview
 The `joboahdr` table serves as the **Job Order Advice Header**. It records the high-level metadata for advice documents issued to vendors regarding job orders. It acts as the primary link between a vendor (`vendcode`) and a specific Job Purchase Order (`jobpono`), facilitating tracking of authorized job work schedules and their corresponding receipts in the manufacturing and inspection modules.
 
 ### 2. Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | No | Internal primary key for the record. | Auto-incrementing | `PRIMARY KEY` |
 | **compcode** | string | No | Unique identifier for the company/branch. | e.g., "DAS" | `JOIN`, `WHERE` |
 | **joboano** | integer | No | **Job Order Advice Number**: The unique document ID for the advice. | | `JOIN`, `GROUP BY` |
 | **joboadate** | datetime | No | The date the Job Order Advice was created. | | `RANGE`, `ORDER BY` |
 | **vendcode** | string | No | Foreign key to the Vendor Master table. | e.g., "SGI", "BP" | `JOIN`, `FILTER` |
 | **jobpono** | string | Yes | The associated Job Purchase Order Number. | | `JOIN` (Likely) |
 | **jobpodate** | datetime | Yes | The date of the associated Job Purchase Order. | | `REPORTING` |
 | **auth_flag** | string | Yes | Authorization status of the advice document. | "Y" (Authorized), "N" | `WHERE` |
 
 ---
 
 ### 3. Relationships & Join Map
 
 #### Real Physical Joins (Authoritative)
 Based on `SCHEMA_MAP` and `REFERENCE_JSON`, the following joins are verified:
 
 * **joboadtl**: Joined via `(compcode, joboano)`. This links the header to the specific line items/items being advised.
 * **vendmas**: Joined via `(compcode, vendcode)`. Used to retrieve vendor names and contact details for the advice.
 * **mrcirhdr / mrci_rep**: Joined via `(compcode, vendcode)`. Usually combined with `itemcode` from the detail table to track receipts against the advice.
 * **itemmas**: Joined via `itemcode` (through `joboadtl`) and `compcode` to fetch material descriptions.
 
 #### Likely Joins (Inferred)
 * **jobpohdr**: Likely joins on `(compcode, jobpono)` or `(compcode, pono)` to reference the original Job Purchase Order contract details.
 * **cust**: Joined via `vendcode` in specific reporting contexts where a vendor acts as a customer or third-party processor.
 
 ---