tables · table
woselect4bill
The woselect4bill table serves as a selection or staging table used to store specific Work Order (WO) numbers intended for billing or vendor invoice processing. In the system's workflow, users or processes populate this table with wono values, which are then used as a filter in complex stored procedures (like vend_bill_conitem_wonowise) to aggregate data from material receipt reports (mrci_rep) and job headers.
Row count
1
Last entry
—
Source
tables
Columns
3| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | NO | Primary Key; internal unique identifier for the selection row. |
compcode | string | YES | Company Code; used to segment data by business unit/branch. |
wono | integer | YES | Work Order Number; the primary identifier used to filter billing transactions. |
Full documentation
### 1) Overview The `woselect4bill` table serves as a **selection or staging table** used to store specific Work Order (WO) numbers intended for billing or vendor invoice processing. In the system's workflow, users or processes populate this table with `wono` values, which are then used as a filter in complex stored procedures (like `vend_bill_conitem_wonowise`) to aggregate data from material receipt reports (`mrci_rep`) and job headers. ### 2) Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | NO | Primary Key; internal unique identifier for the selection row. | Auto-incrementing integers | `WHERE [index] = 1` | | **compcode** | string | YES | Company Code; used to segment data by business unit/branch. | e.g., "DAS" | `JOIN ... ON T1.compcode = T2.compcode` | | **wono** | integer | YES | Work Order Number; the primary identifier used to filter billing transactions. | e.g., 202515398 | `WHERE wono IN (SELECT wono FROM woselect4bill)` | --- ### 3) Relationships & Join Map #### Real Physical Joins (SCHEMA_MAP Verified) These joins use columns explicitly named in the `SCHEMA_MAP` for both tables. * **dbo.invdesphdr / dbo.invdespwodetail**: Join on `wono` and `compcode`. This table likely tracks the specific dispatch/invoice details associated with the work orders selected here. * **dbo.mchdr**: Join on `wono` and `compcode`. Links work order selections to machine/production headers. * **dbo.rmjobrec1st / dbo.rmjobrec2nd**: Join on `wono` and `compcode`. Relates selected work orders to raw material job receipts. #### Logical/Contextual Joins (REFERENCE_JSON Inference) Based on the provided stored procedures, the `wono` column is logically equivalent to specific columns in other tables even where names differ: * **dbo.mrci_rep**: Join `woselect4bill.wono` = `mrci_rep.jobno` (Likely). * **dbo.mrcirhdr**: Join `woselect4bill.wono` = `mrcirhdr.jobcardno` (Likely). * **dbo.job**: Join `woselect4bill.wono` = `job.jobno` (Likely). ---