All tables
tables · table

RGPduty

The RGPduty table serves as a detailed ledger for taxes, duties, and levies associated with Returnable Gate Passes (RGP). It stores the breakdown of specific tax components (like GST, Service Tax, or Cess) applied to an RGP document, including the calculated amounts and applicable percentages. This table acts as a child table to the RGP header, allowing for multiple tax lines per document.

Row count
575
Last entry
Source
tables

Columns

8
ColumnTypeNullableMeaning
indexintegerNOPrimary key/Internal record identifier
compcodestringYESUnique identifier for the company/branch
rgpnointegerYESThe Returnable Gate Pass document number
duty_codeintegerYESReference code for the specific tax/duty type
duty_pernumberYESThe percentage rate of the duty applied
amountnumberYESThe financial value/charge of the specific duty
snointegerYESSerial number/Line item index within the specific RGP
voudescstringYESDescription or narration of the duty voucher

Full documentation

### 1) Overview
 The `RGPduty` table serves as a detailed ledger for taxes, duties, and levies associated with **Returnable Gate Passes (RGP)**. It stores the breakdown of specific tax components (like GST, Service Tax, or Cess) applied to an RGP document, including the calculated amounts and applicable percentages. This table acts as a child table to the RGP header, allowing for multiple tax lines per document.
 
 ### 2) Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | NO | Primary key/Internal record identifier | 0, 1, 2... | `PRIMARY KEY` |
 | **compcode** | string | YES | Unique identifier for the company/branch | e.g., "DAS" | `JOIN`, `WHERE` |
 | **rgpno** | integer | YES | The Returnable Gate Pass document number | e.g., 2018925 | `JOIN`, `FK` |
 | **duty_code** | integer | YES | Reference code for the specific tax/duty type | 0, 51, 52, 53 | `JOIN` (to `dutymas`) |
 | **duty_per** | number | YES | The percentage rate of the duty applied | 0.0, 9.0, 18.0 | `MATH` |
 | **amount** | number | YES | The financial value/charge of the specific duty | 39200.0, 6300.0 | `SUM` |
 | **sno** | integer | YES | Serial number/Line item index within the specific RGP | 1, 2, 3... | `ORDER BY` |
 | **voudesc** | string | YES | Description or narration of the duty voucher | NULL, "Tax Adj" | `DISPLAY` |
 
 ### 3) Relationships & Join Map
 
 The `RGPduty` table links the financial tax requirements to the logistical gate pass documents.
 
 #### Primary Relationships:
 * **rgphdr (rgpno, compcode):** The parent header table containing the primary RGP details (date, vendor, etc.).
 * **dutymas (duty_code, compcode):** To retrieve the human-readable name of the tax (e.g., "CGST", "IGST") based on the `duty_code`.
 * **rgpdtl (rgpno, compcode):** The physical item details belonging to the same RGP.
 
 #### Logical Join Map:
 | Source Table | Source Column | Target Table | Target Column | Relationship |
 | :--- | :--- | :--- | :--- | :--- |
 | `RGPduty` | `rgpno` | `rgphdr` | `rgpno` | Many-to-One (Grounded) |
 | `RGPduty` | `duty_code` | `dutymas` | `duty_code` | Many-to-One (Likely) |
 | `RGPduty` | `compcode` | `company` | `compcode` | Many-to-One (Likely) |
 | `RGPduty` | `rgpno` | `rgpdtl` | `rgpno` | One-to-Many (Likely) |