| # | Column Name | Nullable | Data Type | Max Length | Description |
|---|---|---|---|---|---|
| 1 | sales_tax_exempt_id | integer | 0 | The primary key of the table, which is also a serial field. | |
| 2 | tax_master_id | integer | 0 | Foreign key to the table core.tax_master. | |
| 3 | sales_tax_exempt_code | character varying | 12 | Sakes tax exemption code. | |
| 4 | sales_tax_exempt_name | character varying | 100 | The name given to the sales tax exemption. | |
| 5 | tax_exempt_type_id | integer | 0 | Foreign key to the table core.tax_exempt_types. | |
| 6 | store_id | integer | 0 | Foreign key to the table office.stores. | |
| 7 | sales_tax_id | integer | 0 | Foreign key to the table core.sales_taxes. | |
| 8 | valid_from | date | 0 | The effective date of the sales exemption cstegory. | |
| 9 | valid_till | date | 0 | The last date of the sales exemption category. | |
| 10 | price_from | money_strict2 | 0 | The minimum sales amount required to fall into the sales exemption category. | |
| 11 | price_to | money_strict2 | 0 | The maximum sales amount that falls into the sales exemption category. | |
| 12 | audit_user_id | integer | 0 | Contains the id of the user who last inserted or updated the corresponding row. | |
| 13 | audit_ts | timestamp with time zone | 0 | Contains the date and timestamp of the last insert or update action. |
| # | Column Name | Key Name | References |
|---|---|---|---|
| 2 | tax_master_id | sales_tax_exempts_tax_master_id_fkey | core.tax_master.tax_master_id |
| 5 | tax_exempt_type_id | sales_tax_exempts_tax_exempt_type_id_fkey | core.tax_exempt_types.tax_exempt_type_id |
| 6 | store_id | sales_tax_exempts_store_id_fkey | office.stores.store_id |
| 7 | sales_tax_id | sales_tax_exempts_sales_tax_id_fkey | core.sales_taxes.sales_tax_id |
| 12 | audit_user_id | sales_tax_exempts_audit_user_id_fkey | office.users.user_id |
| Index Name | Owner | Access Method | Definition | Description |
|---|---|---|---|---|
| sales_tax_exempts_pkey | postgres | btree | sales_tax_exempt_id | |
| sales_tax_exempts_sales_tax_exempt_name_uix | postgres | btree | upper(sales_tax_exempt_name::text) | |
| sales_tax_exempts_sales_tax_exempt_code_uix | postgres | btree | upper(sales_tax_exempt_code::text) |
| Constraint Name | Description |
|---|---|
| sales_tax_exempts_price_to_chk CHECK (price_to::numeric >= price_from::numeric) | |
| sales_tax_exempts_valid_till_chk CHECK (valid_till >= valid_from) |
| # | Column Name | Default |
|---|---|---|
| 1 | sales_tax_exempt_id | nextval('core.sales_tax_exempts_sales_tax_exempt_id_seq'::regclass) |
| 10 | price_from | 0 |
| 11 | price_to | 0 |
| 13 | audit_ts | now() |
| Trigger Name | Targets | On Event | Timing | Condition | Order | Orientation | Description |
|---|