tables · table
retsrnduty
The retsrnduty table is a transaction-level detail table that stores the breakdown of specific duties and taxes associated with a Material Receipt Number (mrpno) during a return process (likely "Return - Store Receipt Note"). It maps specific tax identifiers (duty_code) to their calculated monetary values for a particular receipt.
Row count
5
Last entry
—
Source
tables
Columns
5| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | No | Primary Key (Internal/Identity) |
compcode | string | No | Company Code |
mrpno | integer | No | Material Receipt Purchase Number |
duty_code | integer | No | Unique identifier for a specific tax/duty type |
amount | number | No | Monetary value of the specific duty |
Full documentation
### 1) Overview The `retsrnduty` table is a transaction-level detail table that stores the breakdown of specific duties and taxes associated with a **Material Receipt Number (mrpno)** during a return process (likely "Return - Store Receipt Note"). It maps specific tax identifiers (`duty_code`) to their calculated monetary values for a particular receipt. ### 2) Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | No | Primary Key (Internal/Identity) | | Unique identifier for the row | | **compcode** | string | No | Company Code | e.g., "DAS" | `WHERE compcode = 'DAS'` (Join Key) | | **mrpno** | integer | No | Material Receipt Purchase Number | e.g., 2 | Join to MRN/Receipt headers | | **duty_code** | integer | No | Unique identifier for a specific tax/duty type | 1, 10, 17, 2, 21 | Join to `dutymas` or `cdutymas` | | **amount** | number | No | Monetary value of the specific duty | | `SUM(amount)` for total tax | ### 3) Relationships & Join Map #### Logical Parents (Strict Joins) * **dbo.dutymas** or **dbo.cdutymas**: Joined via `duty_code` and `compcode` to retrieve the name and percentage of the tax (e.g., GST, Excise). * **dbo.cmrrhdr** (Material Receipt Header): Joined via `mrpno` and `compcode` to identify the vendor or date associated with the original receipt. * **dbo.srnduty**: Likely a sister table for non-return receipt duties. #### Potential Joins (Likely) * **dbo.rmincoming**: Joined via `mrpno` and `compcode` to access raw material incoming inspection and billing data. * **dbo.cmrrduty**: Related table containing similar duty structures for current material receipts.