# | Column Name | Nullable | Data Type | Max Length | Description |
---|---|---|---|---|---|
1 | sales_tax_id | integer | 0 | 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 | office_id | integer | 0 | Foreign key to the table office.offices. | |
4 | sales_tax_code | character varying | 24 | The code given to the sales tax. | |
5 | sales_tax_name | character varying | 50 | The name given to the sales tax, which is also a unique field. | |
6 | is_exemption | boolean | 0 | ||
7 | tax_base_amount_type_code | character varying | 12 | Foreign key to the table core.tax_base_amount_types. | |
8 | rate | decimal_strict2 | 0 | Sales tax rate. | |
9 | audit_user_id | integer | 0 | Contains the id of the user who last inserted or updated the corresponding row. | |
10 | 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_taxes_tax_master_id_fkey | core.tax_master.tax_master_id |
3 | office_id | sales_taxes_office_id_fkey | office.offices.office_id |
7 | tax_base_amount_type_code | sales_taxes_tax_base_amount_type_code_fkey | core.tax_base_amount_types.tax_base_amount_type_code |
9 | audit_user_id | sales_taxes_audit_user_id_fkey | office.users.user_id |
Index Name | Owner | Access Method | Definition | Description |
---|---|---|---|---|
sales_taxes_pkey | postgres | btree | sales_tax_id | |
sales_taxes_sales_tax_name_uix | postgres | btree | office_id upper(sales_tax_name::text) | |
sales_taxes_sales_tax_code_uix | postgres | btree | office_id upper(sales_tax_code::text) |
Constraint Name | Description |
---|---|
taxes_is_exemption_chk CHECK ( CASE WHEN is_exemption = true THEN rate::numeric = 0::numeric ELSE NULL::boolean END) |
# | Column Name | Default |
---|---|---|
1 | sales_tax_id | nextval('core.sales_taxes_sales_tax_id_seq'::regclass) |
6 | is_exemption | false |
7 | tax_base_amount_type_code | 'P'::character varying |
8 | rate | 0 |
10 | audit_ts | now() |
Trigger Name | Targets | On Event | Timing | Condition | Order | Orientation | Description |
---|