All tables
tables · table

custrejduty

The custrejduty table is a transaction-level detail table that stores the breakdown of taxes and duties associated with customer rejection documents. It acts as a child table to a rejection header, where each rejection entry (rejno) can have multiple duty components (e.g., GST, Excise, Cess) identified by a duty_code and their corresponding monetary amount.

Row count
7,468
Last entry
Source
tables

Columns

5
ColumnTypeNullableMeaning
indexintegerNOPrimary key; unique identifier for the record.
compcodestringNOCompany Code; identifies the specific business unit or legal entity.
rejnointegerNORejection Number; the unique ID of the customer rejection transaction.
duty_codeintegerNOForeign key to the duty master; identifies the type of tax or levy.
amountnumberYESThe calculated value of the specific duty/tax for this rejection.

Full documentation

### 1) Overview
 The `custrejduty` table is a transaction-level detail table that stores the breakdown of taxes and duties associated with customer rejection documents. It acts as a child table to a rejection header, where each rejection entry (`rejno`) can have multiple duty components (e.g., GST, Excise, Cess) identified by a `duty_code` and their corresponding monetary `amount`.
 
 ### 2) Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | NO | Primary key; unique identifier for the record. | 0, 1, 2... | `ORDER BY`, `WHERE` |
 | **compcode** | string | NO | Company Code; identifies the specific business unit or legal entity. | e.g., "DAS" | `JOIN`, `WHERE` |
 | **rejno** | integer | NO | Rejection Number; the unique ID of the customer rejection transaction. | e.g., 3, 4, 14 | `JOIN`, `GROUP BY` |
 | **duty_code** | integer | NO | Foreign key to the duty master; identifies the type of tax or levy. | 0 (Base), 7, 8, 11 | `JOIN`, `WHERE` |
 | **amount** | number | YES | The calculated value of the specific duty/tax for this rejection. | e.g., 16997.5 | `SUM(amount)` |
 
 ### 3) Relationships & Join Map
 
 #### Real Physical Joins (Authoritative)
 * **dutymas / cdutymas**: Joins on `duty_code` and `compcode` to retrieve the names and rates of the specific taxes (e.g., CGST, SGST).
  * `custrejduty.duty_code = dutymas.duty_code`
  * `custrejduty.compcode = dutymas.compcode`
 * **appdutymas**: Joins on `duty_code` and `compcode` to check if the duty is applicable for specific modules.
  * `custrejduty.duty_code = appdutymas.duty_code`
 
 #### Likely Relationships (Inferred)
 * **rejaccept_hdr**: This table likely serves as the header for these duty details. Although the column names differ slightly, `rejno` in this table logically maps to `rejaccept_no` in the header.
  * `custrejduty.rejno` → `rejaccept_hdr.rejaccept_no` (Likely)
  * `custrejduty.compcode` = `rejaccept_hdr.compcode`