All tables
tables · table

citisdtl

The citisdtl (Consumable Item Issue Detail) table serves as the line-item repository for consumable inventory transactions. It records the specific quantities of items (tools, oils, spare parts) issued to various cost centers or departments. It tracks the delta between requested and issued quantities, manufacturers (make), and item status (reused vs. new). This table is a critical component for calculating department-wise consumption costs and maintaining consumable stock ledgers.

Row count
691,056
Last entry
2026-01-15
Source
tables

Columns

13
ColumnTypeNullableMeaning
indexintegerNoUnique row identifier (Primary Key).
compcodestringNoCompany identifier for multi-tenant environments.
issuenointegerNoReference number to the issue header.
citmcodestringNoUnique code for the consumable item.
qtyrequirednumberYesQuantity requested by the department/user.
qtyissuenumberYesQuantity actually issued from stores.
makeintegerYesIdentifier for the brand or manufacturer.
issuedatedatetimeYesThe official date the item was issued.
reusedstringYesFlag indicating if the item is recycled/reused.
ratenumberYesUnit cost of the item at the time of issue.
chnostringYesExternal challan number reference.
chdatestringYesExternal challan date reference.
exdetailstringYesExtended details or remarks for the line item.

Full documentation

### 1) Overview
 The `citisdtl` (Consumable Item Issue Detail) table serves as the line-item repository for consumable inventory transactions. It records the specific quantities of items (tools, oils, spare parts) issued to various cost centers or departments. It tracks the delta between requested and issued quantities, manufacturers (make), and item status (reused vs. new). This table is a critical component for calculating department-wise consumption costs and maintaining consumable stock ledgers.
 
 ### 2) Column Dictionary
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | No | Unique row identifier (Primary Key). | | Unique ID |
 | **compcode** | string | No | Company identifier for multi-tenant environments. | e.g., "DAS", "SFR" | Join; Filter |
 | **issueno** | integer | No | Reference number to the issue header. | | Join to `citemiss` |
 | **citmcode** | string | No | Unique code for the consumable item. | e.g., "TCMT001" | Join to `citemmas` |
 | **qtyrequired** | number | Yes | Quantity requested by the department/user. | | Calculation |
 | **qtyissue** | number | Yes | Quantity actually issued from stores. | | Calculation; Stock |
 | **make** | integer | Yes | Identifier for the brand or manufacturer. | e.g., 36, 15 | Reference |
 | **issuedate** | datetime | Yes | The official date the item was issued. | | Range Filter |
 | **reused** | string | Yes | Flag indicating if the item is recycled/reused. | 'N' (New), 'Y' | Filter |
 | **rate** | number | Yes | Unit cost of the item at the time of issue. | | Valuation |
 | **chno** | string | Yes | External challan number reference. | | Audit |
 | **chdate** | string | Yes | External challan date reference. | | Audit |
 | **exdetail** | string | Yes | Extended details or remarks for the line item. | | Metadata |
 
 ### 3) Relationships & Join Map
 
 #### Logical Parents (Authoritative via SCHEMA_MAP & Reference)
 * **citemiss (issueno, compcode):** The header table for consumable issues. `citisdtl` provides the breakdown of items for every `issueno` recorded in `citemiss`.
 * **citemmas (citmcode, compcode):** The master table for consumable items. Joins here to retrieve item names (`citemname`), categories, and unit of measure (`uom`).
 
 #### Logical Children (Inferred via Reference)
 * **incondtl (citmcode, compcode):** Used in stored procedures (e.g., `CostCenterWiseConsumption`) to update the `rate` in `citisdtl` based on the most recent purchase rate from incoming transactions.
 
 #### Join Examples
 ```sql
 -- 1. Get detailed consumption by Department
 SELECT 
  h.dpcode, 
  d.citmcode, 
  m.citemname, 
  SUM(d.qtyissue) as TotalIssued
 FROM dbo.citemiss h
 INNER JOIN dbo.citisdtl d ON h.issueno = d.issueno AND h.compcode = d.compcode
 INNER JOIN dbo.citemmas m ON d.citmcode = m.citmcode AND d.compcode = m.compcode
 WHERE d.issuedate BETWEEN '2023-01-01' AND '2023-12-31'
 GROUP BY h.dpcode, d.citmcode, m.citemname;
 
 -- 2. Link to Manufacturer/Brand
 SELECT 
  d.citmcode, 
  b.Br_name 
 FROM dbo.citisdtl d
 LEFT JOIN dbo.brandmas b ON d.make = b.Br_code AND d.compcode = b.compcode;
 ```