tables · table
tempcust
The tempcust table serves as a transactional staging or reporting table used to track the flow of items from production (job cards) to billing (invoices) for specific customers. It bridges the gap between Material Requirement Planning (mrpno), production (jobcardno), raw material usage (rmcode), and financial dispatch (billno). It appears to be a summary table for customer-specific order fulfillment and returns.
Row count
1,635
Last entry
2026-01-12
Source
tables
Columns
23| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | No | Primary Key / Row Identifier |
compcode | string | No | Company Identifier |
mrpno | integer | Yes | Material Requisition/Receipt Number |
mrpdate | datetime | Yes | Date associated with the MRP record |
custcode | string | Yes | Customer Identifier |
jobcardno | integer | Yes | Production Job Card Number |
itemcode | string | Yes | Finished good / Part identifier |
rmcode | string | Yes | Raw Material Identifier |
rmweight | number | Yes | Total weight of raw material used |
pcs | integer | Yes | Total quantity in pieces |
billno | number | Yes | Invoice or Billing document number |
billdate | datetime | Yes | Date of billing/invoice |
qtysent | number | Yes | Quantity dispatched to customer |
qtyrecd | number | Yes | Quantity received (returns or reversals) |
wtrecd | number | Yes | Weight received (returns) |
retno | string | Yes | Return Document Number |
retdate | string | Yes | Date of return |
retwt | string | Yes | Weight of returned material |
uiflag | string | Yes | Interface or status flag |
chwt | number | Yes | Theoretical or Chargeable weight |
PjobDate | datetime | Yes | Previous or Processing Job Date |
CustLotNo | string | Yes | Customer-specific lot/batch identifier |
ProdLotNo | string | Yes | Internal production lot/batch identifier |
Full documentation
### 1) Overview The `tempcust` table serves as a transactional staging or reporting table used to track the flow of items from production (job cards) to billing (invoices) for specific customers. It bridges the gap between Material Requirement Planning (`mrpno`), production (`jobcardno`), raw material usage (`rmcode`), and financial dispatch (`billno`). It appears to be a summary table for customer-specific order fulfillment and returns. ### 2) Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | No | Primary Key / Row Identifier | 0, 1, 2... | `PRIMARY KEY` | | **compcode** | string | No | Company Identifier | e.g., "DAS" | `JOIN`, `WHERE` | | **mrpno** | integer | Yes | Material Requisition/Receipt Number | e.g., 14789 | `JOIN`, `GROUP BY` | | **mrpdate** | datetime | Yes | Date associated with the MRP record | ISO Date | `WHERE`, `ORDER BY` | | **custcode** | string | Yes | Customer Identifier | e.g., "BAPR" | `JOIN` | | **jobcardno** | integer | Yes | Production Job Card Number | e.g., 3891 | `JOIN` | | **itemcode** | string | Yes | Finished good / Part identifier | e.g., "DRIVESHAFT" | `JOIN` | | **rmcode** | string | Yes | Raw Material Identifier | e.g., "EN353-48" | `JOIN` | | **rmweight** | number | Yes | Total weight of raw material used | Decimal | `SUM` | | **pcs** | integer | Yes | Total quantity in pieces | Integer | `SUM` | | **billno** | number | Yes | Invoice or Billing document number | e.g., 2388 | `JOIN` (Likely `invno`) | | **billdate** | datetime | Yes | Date of billing/invoice | ISO Date | `WHERE` | | **qtysent** | number | Yes | Quantity dispatched to customer | Decimal | `SUM` | | **qtyrecd** | number | Yes | Quantity received (returns or reversals) | Decimal | `SUM` | | **wtrecd** | number | Yes | Weight received (returns) | Decimal | `SUM` | | **retno** | string | Yes | Return Document Number | | `JOIN` | | **retdate** | string | Yes | Date of return | | `WHERE` | | **retwt** | string | Yes | Weight of returned material | | `SUM` | | **uiflag** | string | Yes | Interface or status flag | e.g., "*" | `FILTER` | | **chwt** | number | Yes | Theoretical or Chargeable weight | Decimal | `MATH` | | **PjobDate** | datetime | Yes | Previous or Processing Job Date | | `WHERE` | | **CustLotNo** | string | Yes | Customer-specific lot/batch identifier | | `FILTER` | | **ProdLotNo** | string | Yes | Internal production lot/batch identifier | | `FILTER` | ### 3) Relationships & Join Map #### Logical Joins * **Customer Master**: Join to `dbo.cust` on `custcode` and `compcode`. * **Item Master**: Join to `dbo.itemmas` on `itemcode` and `compcode`. * **Job Card Details**: Join to `dbo.jobhdr` on `jobcardno` and `compcode`. * **Raw Material Master**: Join to `dbo.rmmas` on `rmcode` and `compcode`. * **Invoices**: Join to `dbo.invhdr` on `billno` (mapped to `invno`) and `compcode`. #### Join Matrix (SCHEMA_MAP Priority) | From Table | To Table | Join Column(s) | Join Type | | :--- | :--- | :--- | :--- | | `tempcust` | `dbo.cust` | `compcode`, `custcode` | Consistent | | `tempcust` | `dbo.itemmas` | `compcode`, `itemcode` | Consistent | | `tempcust` | `dbo.rmmas` | `compcode`, `rmcode` | Consistent | | `tempcust` | `dbo.jobhdr` | `compcode`, `jobcardno` | Consistent | | `tempcust` | `dbo.invhdr` | `compcode`, `billno` -> `invno` | Likely | | `tempcust` | `dbo.mrcirhdr` | `compcode`, `mrpno` | Consistent |