tables · table
jobpohdr
The jobpohdr table serves as the Job Purchase Order Header within the manufacturing ERP. It stores top-level information for Purchase Orders issued to external vendors (subcontractors) for job work operations (e.g., machining, heat treatment, plating).
Row count
151
Last entry
2026-01-08
Source
tables
Columns
27| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | No | Internal primary identity seed |
compcode | string | No | Unique identifier for the company/branch |
pono | integer | No | Purchase Order Number |
podate | datetime | Yes | Date the Purchase Order was issued |
quotno | string | Yes | Reference number of the vendor's quotation |
quotdate | datetime | Yes | Date of the vendor's quotation |
vendcode | string | No | Unique code for the job work vendor |
amendno | integer | No | Amendment sequence number (0 = original) |
amenddate | datetime | Yes | Date of the last PO amendment |
authflag | integer | Yes | Authorization/Approval status |
wefdate | datetime | Yes | "With Effect From" date for the PO validity |
reason | string | Yes | Reason for the PO or amendment |
povalue | number | Yes | Total base value of the PO (excluding tax) |
povalueword | string | Yes | Total value written in words |
invyear | integer | Yes | Financial/Accounting year |
po_flag | string | Yes | Internal classification flag |
vendcodeC | string | Yes | Consignee/Sub-vendor code (if applicable) |
PODoc | string | Yes | Formatted PO Document Number |
CGST_TaxPer | number | Yes | Central GST Percentage |
CGST_Amt | number | Yes | Central GST Amount |
SGST_TaxPer | number | Yes | State GST Percentage |
SGST_Amt | number | Yes | State GST Amount |
IGST_TaxPer | number | Yes | Integrated GST Percentage |
IGST_Amt | number | Yes | Integrated GST Amount |
TotalAMt | number | Yes | Grand total value (Base + Taxes) |
POLock | string | Yes | Flag indicating if the PO is locked for editing |
Location | string | Yes | Physical location/Plant associated with the PO |
Full documentation
### 1. Overview The `jobpohdr` table serves as the **Job Purchase Order Header** within the manufacturing ERP. It stores top-level information for Purchase Orders issued to external vendors (subcontractors) for job work operations (e.g., machining, heat treatment, plating). Key functionalities include: * **PO Lifecycle Management:** Tracking PO dates, quotation references, and authorization status (`authflag`). * **Amendment Tracking:** Managing version history of orders via `amendno` and `amenddate`. * **Financial & Tax Compliance:** Recording the total value and detailed GST components (CGST, SGST, IGST). * **Contractual Terms:** Storing standardized and custom terms/conditions (`term_1` through `term_6`) for the legal agreement with the vendor. ### 2. Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | No | Internal primary identity seed | | Primary Key | | **compcode** | string | No | Unique identifier for the company/branch | e.g., "DAS" | Join Key | | **pono** | integer | No | Purchase Order Number | | Join Key | | **podate** | datetime | Yes | Date the Purchase Order was issued | | Filtering | | **quotno** | string | Yes | Reference number of the vendor's quotation | | Reference | | **quotdate** | datetime | Yes | Date of the vendor's quotation | | Reference | | **vendcode** | string | No | Unique code for the job work vendor | e.g., "AI", "HF" | Join Key (to `vendmas`) | | **amendno** | integer | No | Amendment sequence number (0 = original) | | Versioning | | **amenddate** | datetime | Yes | Date of the last PO amendment | | Audit | | **term_1** to **term_6** | string | Yes | Standardized contractual terms (Payment, Delivery, Tax, etc.) | | Reporting | | **authflag** | integer | Yes | Authorization/Approval status | 1 = Authorized, 0 = Draft | Logic Filter | | **wefdate** | datetime | Yes | "With Effect From" date for the PO validity | | Validity | | **reason** | string | Yes | Reason for the PO or amendment | | Audit | | **povalue** | number | Yes | Total base value of the PO (excluding tax) | | Financials | | **povalueword** | string | Yes | Total value written in words | | Printing | | **invyear** | integer | Yes | Financial/Accounting year | e.g., 2023, 2024 | Join Key | | **po_flag** | string | Yes | Internal classification flag | e.g., "I" (Inhouse/Import?) | Filtering | | **vendcodeC** | string | Yes | Consignee/Sub-vendor code (if applicable) | | Likely Join | | **PODoc** | string | Yes | Formatted PO Document Number | e.g., "JOB/2023-24/0010" | UI Display | | **CGST_TaxPer** | number | Yes | Central GST Percentage | | Calculation | | **CGST_Amt** | number | Yes | Central GST Amount | | Financials | | **SGST_TaxPer** | number | Yes | State GST Percentage | | Calculation | | **SGST_Amt** | number | Yes | State GST Amount | | Financials | | **IGST_TaxPer** | number | Yes | Integrated GST Percentage | | Calculation | | **IGST_Amt** | number | Yes | Integrated GST Amount | | Financials | | **TotalAMt** | number | Yes | Grand total value (Base + Taxes) | | Financials | | **POLock** | string | Yes | Flag indicating if the PO is locked for editing | "N", "Y" | Logic Filter | | **Location** | string | Yes | Physical location/Plant associated with the PO | | Filtering | ### 3. Relationships & Join Map #### **Primary Joins (Strictly based on SCHEMA_MAP)** * **jobpodtl (Job PO Details):** This is the most common join. * `jobpohdr.pono = jobpodtl.pono` * `jobpohdr.compcode = jobpodtl.compcode` * `jobpohdr.invyear = jobpodtl.invyear` * **vendmas (Vendor Master):** To retrieve vendor contact and address details. * `jobpohdr.vendcode = vendmas.vendcode` * `jobpohdr.compcode = vendmas.compcode` * **jobpodtlamnd (Amendment Details):** * `jobpohdr.pono = jobpodtlamnd.pono` * `jobpohdr.compcode = jobpodtlamnd.compcode` * `jobpohdr.invyear = jobpodtlamnd.invyear` * **cjobpohdr (Common/Standard Job POs):** Used in unions for cross-order reporting (as seen in `viewALLJOBOrder`). * `jobpohdr.compcode = cjobpohdr.compcode` #### **Inferred Indirect Joins (Likely)** * **mrcirhdr / mrci_rep (Job Receipting):** Although these tables link back to Job Cards (`jobno`), the stored procedures (e.g., `job_mrp_reg_j13`) frequently join `jobpohdr` to these receipting tables via `vendcode` and `compcode` to validate pricing during vendor billing. * **company:** Join on `compcode` to fetch plant headers for PO printing.