All tables
tables · table

bcdata

The bcdata table serves as a legacy or staging registry for sales invoice data, likely capturing transactional snapshots for reporting or tax compliance (specifically referencing older Indian tax structures like ST38, Excise, and Education Cess). It links purchase orders, vehicle information, and detailed tax breakdowns to specific invoice numbers.

Row count
1
Last entry
Source
tables

Columns

20
ColumnTypeNullableMeaning
indexintegerNoPrimary Key / Unique identifier
compcodestringYesCompany Code
inv_nostringYesInvoice Number
inv_dtstringYesInvoice Date (formatted string)
st38stringYesForm ST38 compliance reference
po_nostringYesCustomer Purchase Order Number
veh_nostringYesDispatch Vehicle Number
item_namestringYesName or Part Number of the item
item_qtynumberYesQuantity of items invoiced
mprintstringYesPrint flag or status indicator
inv_amtnumberYesTotal Invoice Gross Amount
excise_amtnumberYesExcise Duty Amount
bill_ratenumberYesSelling rate per unit
base_valnumberYesBase assessable value
net_excisenumberYesNet Excise Duty after deductions
edu_cessnumberYesEducation Cess amount
taxableamtnumberYesNet amount subject to tax
taxvaluenumberYesTotal tax value (VAT/GST)
vatsurnumberYesVAT Surcharge
hcessstringYesHigher Education Cess

Full documentation

### 1) Overview
 The `bcdata` table serves as a legacy or staging registry for sales invoice data, likely capturing transactional snapshots for reporting or tax compliance (specifically referencing older Indian tax structures like ST38, Excise, and Education Cess). It links purchase orders, vehicle information, and detailed tax breakdowns to specific invoice numbers.
 
 ### 2) Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | No | Primary Key / Unique identifier | | `WHERE index = 0` |
 | **compcode** | string | Yes | Company Code | e.g., "DAS" | `JOIN Company ON compcode` |
 | **inv_no** | string | Yes | Invoice Number | | `JOIN invhdr ON inv_no = invno` |
 | **inv_dt** | string | Yes | Invoice Date (formatted string) | | `WHERE inv_dt > '01.07.2017'` |
 | **st38** | string | Yes | Form ST38 compliance reference | | Filter for specific tax forms |
 | **po_no** | string | Yes | Customer Purchase Order Number | | `JOIN pohdr ON po_no = PONO` |
 | **veh_no** | string | Yes | Dispatch Vehicle Number | e.g., "BY-COURIER" | `JOIN Vehiclemas ON veh_no = Vehnumber` |
 | **item_name** | string | Yes | Name or Part Number of the item | | `JOIN itemmas ON item_name = itemname` |
 | **item_qty** | number | Yes | Quantity of items invoiced | | `SUM(item_qty)` |
 | **mprint** | string | Yes | Print flag or status indicator | | Internal status checks |
 | **inv_amt** | number | Yes | Total Invoice Gross Amount | | Financial reporting |
 | **excise_amt** | number | Yes | Excise Duty Amount | | Tax reconciliation |
 | **bill_rate** | number | Yes | Selling rate per unit | | Audit price checks |
 | **base_val** | number | Yes | Base assessable value | | Calculation of taxes |
 | **net_excise** | number | Yes | Net Excise Duty after deductions | | Tax reporting |
 | **edu_cess** | number | Yes | Education Cess amount | | Legacy tax reporting |
 | **taxableamt** | number | Yes | Net amount subject to tax | | `SUM(taxableamt)` |
 | **taxvalue** | number | Yes | Total tax value (VAT/GST) | | Tax summaries |
 | **vatsur** | number | Yes | VAT Surcharge | | Legacy tax reporting |
 | **hcess** | string | Yes | Higher Education Cess | | Legacy tax reporting |
 
 ### 3) Relationships & Join Map
 
 The table connects primarily to Sales, Inventory, and Master tables using Company and Document identifiers.
 
 #### Primary Join Logic:
 * **Company Context**: Always join on `compcode` to ensure multi-tenant data integrity.
 * **Documents**: Joins to modern invoice headers via `inv_no` and to purchase orders via `po_no`.
 
 #### Key Join Paths:
 * **dbo.invhdr** (Invoice Header): 
  * `bcdata.inv_no` -> `invhdr.invno`
  * `bcdata.compcode` -> `invhdr.compcode`
 * **dbo.pohdr** (Purchase Order Master): 
  * `bcdata.po_no` -> `pohdr.PONO`
  * `bcdata.compcode` -> `pohdr.compcode`
 * **dbo.itemmas** (Item Master): 
  * `bcdata.item_name` -> `itemmas.itemname` (Likely)
  * `bcdata.compcode` -> `itemmas.compcode`
 * **dbo.bcdataHH** (Handheld/Alternative Register):
  * `bcdata.inv_no` -> `bcdataHH.invno`
  * `bcdata.compcode` -> `bcdataHH.compcode`
 * **dbo.Vehiclemas** (Vehicle Master):
  * `bcdata.veh_no` -> `Vehiclemas.Vehnumber` (Likely)
  * `bcdata.compcode` -> `Vehiclemas.compcode`