All tables
tables · table

Debitdtl

The Debitdtl table serves as the line-item detail repository for Debit and Credit Notes. It records granular transaction data for items returned to suppliers, quality rejections, rate differences, or invoice reversals. Each record breaks down quantities, unit rates, taxable values, and the corresponding GST components (CGST, SGST, IGST). This table is a child of Debithdr and is critical for inventory reconciliation and tax reporting (GST).

Row count
140
Last entry
Source
tables

Columns

29
ColumnTypeNullableMeaning
indexintegerNoInternal primary key.
compcodestringNoUnique identifier for the company/branch.
NoteTypeintegerNoThe category/classification of the note.
NotenointegerNoThe document number of the Debit/Credit Note.
NoteyearintegerNoThe fiscal year associated with the note.
Note_FlagstringNoIndicates the nature of the note.
itemcodestringNoUnique code for the material/service.
itemqtynumberYesQuantity involved in the adjustment.
itemratenumberYesThe unit price used for the note calculation.
uomstringYesUnit of Measure.
itemdiscstringYesDiscount applied to the line item.
itemamtnumberYesTotal value for the line (Qty * Rate).
noofcasesstringYesNumber of packing units/cases.
snostringYesSequential line number within the note.
HSNnumberYesHarmonized System of Nomenclature code for GST.
TaxableAmtnumberYesThe base value on which GST is calculated.
CGST_TaxRatenumberYesCentral GST percentage.
CGST_AmtnumberYesCentral GST amount.
SGST_TaxRatenumberYesState/Union Territory GST percentage.
SGST_AmtnumberYesState/Union Territory GST amount.
IGST_TaxRatenumberYesIntegrated GST percentage.
IGST_AmtnumberYesIntegrated GST amount.
supFlagstringYesIndicates the party type.
Item_FlagstringYesClassification of the adjusted item.
MRPNonumberYesReference to the original Material Receipt or Purchase ID.
itemnamestringYesDescription of the item.
vounostringYesVoucher Number reference.
BillRatenumberYesRate from the original bill.
PORatenumberYesRate from the Purchase Order.

Full documentation

### 1) Overview
 The `Debitdtl` table serves as the line-item detail repository for Debit and Credit Notes. It records granular transaction data for items returned to suppliers, quality rejections, rate differences, or invoice reversals. Each record breaks down quantities, unit rates, taxable values, and the corresponding GST components (CGST, SGST, IGST). This table is a child of `Debithdr` and is critical for inventory reconciliation and tax reporting (GST).
 
 ### 2) Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | No | Internal primary key. | Auto-increment | Primary Key |
 | **compcode** | string | No | Unique identifier for the company/branch. | e.g., "DAS", "SK2" | Join Key, Filtering |
 | **NoteType** | integer | No | The category/classification of the note. | 0, 1 | Join Key |
 | **Noteno** | integer | No | The document number of the Debit/Credit Note. | e.g., 222300007 | Join Key (to `Debithdr`) |
 | **Noteyear** | integer | No | The fiscal year associated with the note. | e.g., 2022, 2023 | Join Key |
 | **Note_Flag** | string | No | Indicates the nature of the note. | **D**: Debit, **C**: Credit | Join Key, Filtering |
 | **itemcode** | string | No | Unique code for the material/service. | | Join Key (to `itemmas`) |
 | **itemqty** | number | Yes | Quantity involved in the adjustment. | | Aggregate (SUM) |
 | **itemrate** | number | Yes | The unit price used for the note calculation. | | Calculation |
 | **uom** | string | Yes | Unit of Measure. | KGS, PCS, NOS, MTR | Information |
 | **itemdisc** | string | Yes | Discount applied to the line item. | | Calculation |
 | **itemamt** | number | Yes | Total value for the line (Qty * Rate). | | Aggregate (SUM) |
 | **noofcases** | string | Yes | Number of packing units/cases. | | Information |
 | **sno** | string | Yes | Sequential line number within the note. | | Order By |
 | **HSN** | number | Yes | Harmonized System of Nomenclature code for GST. | | Tax Reporting |
 | **TaxableAmt** | number | Yes | The base value on which GST is calculated. | | Tax Reporting |
 | **CGST_TaxRate** | number | Yes | Central GST percentage. | e.g., 9.0, 14.0 | Calculation |
 | **CGST_Amt** | number | Yes | Central GST amount. | | Calculation |
 | **SGST_TaxRate** | number | Yes | State/Union Territory GST percentage. | e.g., 9.0, 14.0 | Calculation |
 | **SGST_Amt** | number | Yes | State/Union Territory GST amount. | | Calculation |
 | **IGST_TaxRate** | number | Yes | Integrated GST percentage. | e.g., 18.0, 28.0 | Calculation |
 | **IGST_Amt** | number | Yes | Integrated GST amount. | | Calculation |
 | **supFlag** | string | Yes | Indicates the party type. | **S**: Supplier, **C**: Customer, **V**: Vendor | Filtering |
 | **Item_Flag** | string | Yes | Classification of the adjusted item. | **R**: Raw Material, **S**: SF/FG, **C**: Consumable, **O**: Other | Filtering |
 | **MRPNo** | number | Yes | Reference to the original Material Receipt or Purchase ID. | | Join Key (Likely `rmincoming`) |
 | **itemname** | string | Yes | Description of the item. | | Information |
 | **vouno** | string | Yes | Voucher Number reference. | | Information |
 | **BillRate** | number | Yes | Rate from the original bill. | | Reference |
 | **PORate** | number | Yes | Rate from the Purchase Order. | | Reference |
 
 ### 3) Relationships & Join Map
 
 #### Parent Table
 * **Debithdr**: `Debitdtl` is linked to `Debithdr` as a detail table.
  * **Join Logic**: `Debitdtl.compcode = Debithdr.compcode` AND `Debitdtl.Noteno = Debithdr.Noteno` AND `Debitdtl.Noteyear = Debithdr.Noteyear` AND `Debitdtl.Note_Flag = Debithdr.Note_Flag`.
 
 #### Material References (Authoritative per Reference SQL)
 * **itemmas**: For Finished/Semi-Finished Goods (where `Item_Flag` = 'S').
  * **Join Logic**: `Debitdtl.compcode = itemmas.compcode` AND `Debitdtl.itemcode = itemmas.itemcode`.
 * **rmmas**: For Raw Materials (where `Item_Flag` = 'R').
  * **Join Logic**: `Debitdtl.compcode = rmmas.compcode` AND `Debitdtl.itemcode = rmmas.rmcode`.
 * **citemmas**: For Consumables (where `Item_Flag` = 'C').
  * **Join Logic**: `Debitdtl.compcode = citemmas.compcode` AND `Debitdtl.itemcode = citemmas.citmcode`.
 
 #### Transactional References
 * **rmincoming**: Linked via `MRPNo` to reference specific material receipts for rejection tracking.
  * **Join Logic**: `Debitdtl.compcode = rmincoming.compcode` AND `Debitdtl.MRPNo = rmincoming.mrpno` (Likely).
 
 ---