All tables
tables · table

saledutymas

The saledutymas table serves as the central configuration repository for sales-related duties, taxes, and additional charges (e.g., GST, VAT, Excise, Freight, and Rounding Off). It defines how these charges are calculated (Nature), whether they are printed on invoices, and their sequence in tax calculation logic.

Row count
58
Last entry
Source
tables

Columns

14
ColumnTypeNullableMeaning
compcodestringNoUnique identifier for the company/branch.
duty_codeintegerNoUnique numeric identifier for the specific duty/tax type.
duty_namestringYesFull descriptive name of the duty or tax.
aliasstringYesShort code or abbreviation for the duty.
naturestringYesMathematical nature of the duty.
roffstringYesIndicates if the amount should be rounded off.
wordsstringYesIndicates if the duty amount is included in the "Amount in Words" calculation.
amtflagstringYesLikely indicates if the value is a fixed amount rather than a percentage.
excise_flagstringYesIdentifies if the record relates specifically to Excise duties.
printstringYesDetermines if the duty appears on the printed invoice.
usernamestringYesThe system user who created or last modified the entry.
similarstringYesCategorization for grouping similar duty types.
sequenceintegerYesThe order in which duties are applied or displayed.
ledgercodeintegerYesReference code for the General Ledger in the accounting module.

Full documentation

### 1) Overview
 The `saledutymas` table serves as the central configuration repository for sales-related duties, taxes, and additional charges (e.g., GST, VAT, Excise, Freight, and Rounding Off). It defines how these charges are calculated (Nature), whether they are printed on invoices, and their sequence in tax calculation logic.
 
 ### 2) Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **compcode** | string | No | Unique identifier for the company/branch. | "DAS", "PDS" | Join Key |
 | **duty_code** | integer | No | Unique numeric identifier for the specific duty/tax type. | 0-53 | Join Key |
 | **duty_name** | string | Yes | Full descriptive name of the duty or tax. | "SGST", "CST", "FREIGHT" | Display |
 | **alias** | string | Yes | Short code or abbreviation for the duty. | "VAT", "CGST", "FOC-OUT" | Display |
 | **nature** | string | Yes | Mathematical nature of the duty. | "+", "-" | Calculation |
 | **roff** | string | Yes | Indicates if the amount should be rounded off. | "Y", "N" | Logic |
 | **words** | string | Yes | Indicates if the duty amount is included in the "Amount in Words" calculation. | "Y", "N", " " | Formatting |
 | **amtflag** | string | Yes | Likely indicates if the value is a fixed amount rather than a percentage. | "Y", "N", " " | Logic |
 | **excise_flag** | string | Yes | Identifies if the record relates specifically to Excise duties. | "Y", "N" | Filter |
 | **print** | string | Yes | Determines if the duty appears on the printed invoice. | "Y", "N" | Reporting |
 | **username** | string | Yes | The system user who created or last modified the entry. | "admin", "system" | Audit |
 | **similar** | string | Yes | Categorization for grouping similar duty types. | "E" (Excise) | Likely Logic |
 | **sequence** | integer | Yes | The order in which duties are applied or displayed. | 0, 1, 2... | Sorting |
 | **ledgercode** | integer | Yes | Reference code for the General Ledger in the accounting module. | 0 | Likely Join |
 
 ### 3) Relationships & Join Map
 
 The `saledutymas` table is a master configuration table. Transactions in the sales and invoice modules reference this table to determine which taxes to apply and how to calculate them.
 
 #### STRICT JOIN RULES (SCHEMA_MAP Verified):
 * **dbo.saleappdutymas**: Joins via `(compcode, duty_code)`. This table likely maps specific duties to specific invoice types or customers.
 * **dbo.invdesptax**: Joins via `(compcode, duty_code)`. Used to retrieve duty details for specific dispatched invoices.
 * **dbo.invtax**: Joins via `(compcode, duty_code)`. References duties applied to standard sales invoices (`invhdr`/`invdtl`).
 * **dbo.custtax**: Joins via `(compcode, duty_code)`. Defines customer-specific tax percentages for specific duties.
 * **dbo.appdutymas** / **dbo.cappdutymas**: Joins via `(compcode, duty_code)`. General mappings for applicable duties across modules.
 
 #### Likely Joins (Inferred):
 * **dbo.TEMPSALEREGISTER**: Columns `sale1amt` through `sale22amt` likely correspond to specific `duty_code` values or sequences defined in this master table.