tables · table
tempsalegroupwise
The tempsalegroupwise table is a temporary analytical structure used for aggregating and reporting sales data at a group/parent-item level. It stores summarized sales metrics including quantities and total values, segmented by company, customer, and product. This table is likely populated during the execution of sales performance reports or group-wise profitability analyses.
Row count
49
Last entry
—
Source
tables
Columns
9| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | NO | Primary key for the temporary record. |
compcode | string | YES | Unique identifier for the company/branch. |
custcode | string | YES | Unique identifier for the customer. |
itemcode | string | YES | Internal unique identifier for the specific item/product. |
partno | string | YES | The physical or manufacturer part number. |
saleqty | integer | YES | Total quantity of the item sold to the customer. |
uom | string | YES | Unit of Measure for the sale quantity. |
salevalue | number | YES | The total monetary value (revenue) of the sales. |
pitemcode | string | YES | Parent Item Code or Grouping Code used for hierarchical reporting. |
Full documentation
### 1. Overview The `tempsalegroupwise` table is a temporary analytical structure used for aggregating and reporting sales data at a group/parent-item level. It stores summarized sales metrics including quantities and total values, segmented by company, customer, and product. This table is likely populated during the execution of sales performance reports or group-wise profitability analyses. ### 2. Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | NO | Primary key for the temporary record. | Incremental | `WHERE index = 0` | | **compcode** | string | YES | Unique identifier for the company/branch. | e.g., "DAS" | `JOIN dbo.company ON ...` | | **custcode** | string | YES | Unique identifier for the customer. | e.g., "QHT(K)", "HML-G" | `JOIN dbo.cust ON ...` | | **itemcode** | string | YES | Internal unique identifier for the specific item/product. | e.g., "QH009401541FA" | `JOIN dbo.itemmas ON ...` | | **partno** | string | YES | The physical or manufacturer part number. | e.g., "009401541fA" | Filter/Grouping | | **saleqty** | integer | YES | Total quantity of the item sold to the customer. | > 0 | `SUM(saleqty)` | | **uom** | string | YES | Unit of Measure for the sale quantity. | NOS, Nos | `JOIN dbo.UoMMaster ON ...` | | **salevalue** | number | YES | The total monetary value (revenue) of the sales. | e.g., 899769.6 | `SUM(salevalue)` | | **pitemcode** | string | YES | Parent Item Code or Grouping Code used for hierarchical reporting. | e.g., "0094", "AXABA" | `JOIN dbo.groupmas ON ...` | ### 3. Relationships & Join Map The table serves as a bridge between high-level sales summaries and detailed master data. #### Physical Joins (Based on SCHEMA_MAP) * **Customer Master**: Join on `custcode` and `compcode` to retrieve customer names or credit terms. * `dbo.tempsalegroupwise.custcode` -> `dbo.cust.custcode` * **Item Master**: Join on `itemcode` and `compcode` for technical specifications or product categories. * `dbo.tempsalegroupwise.itemcode` -> `dbo.itemmas.itemcode` * **Group Master**: Join on `pitemcode` to identify product families or group-level pricing. * `dbo.tempsalegroupwise.pitemcode` -> `dbo.groupmas.PItemcode` * **Invoice Details**: Join on `itemcode` and `compcode` to trace back to specific historical transactions. * `dbo.tempsalegroupwise.itemcode` -> `dbo.invdtl.itemcode` * **Company Configuration**: Join on `compcode` for entity-specific reporting logic. * `dbo.tempsalegroupwise.compcode` -> `dbo.company.co` (or `compcode` in various config tables). #### Likely Joins (Inferred) * **Sales History Detail**: Join on `pitemcode` to `dbo.invdtl.pitemcode` to audit the source of summarized values. * **Unit of Measure**: Join on `uom` to `dbo.UoMMaster.PUoM` for conversion calculations.