Table core.sales_tax_details
This table stores information on sales tax and other information associated with it.
# Column Name Nullable Data Type Max Length Description
1sales_tax_detail_idinteger0
2sales_tax_idinteger0
3sales_tax_type_idinteger0
4prioritysmallint0
5sales_tax_detail_codecharacter varying24
6sales_tax_detail_namecharacter varying50
7based_on_shipping_addressboolean0
8check_nexusboolean0
9applied_on_shipping_chargeboolean0
10state_sales_tax_idinteger0
11county_sales_tax_idinteger0
12tax_rate_type_codecharacter varying12
13ratedecimal_strict20
14reporting_tax_authority_idinteger0
15collecting_tax_authority_idinteger0
16collecting_account_idbigint0
17use_tax_collecting_account_idbigint0
18rounding_method_codecharacter varying4
19rounding_decimal_placesinteger_strict20
20audit_user_idinteger0Contains the id of the user who last inserted or updated the corresponding row.
21audit_tstimestamp with time zone0Contains the date and timestamp of the last insert or update action.

Foreign Keys

# Column Name Key Name References
2 sales_tax_id sales_tax_details_sales_tax_id_fkey core.sales_taxes.sales_tax_id
3 sales_tax_type_id sales_tax_details_sales_tax_type_id_fkey core.sales_tax_types.sales_tax_type_id
10 state_sales_tax_id sales_tax_details_state_sales_tax_id_fkey core.state_sales_taxes.state_sales_tax_id
11 county_sales_tax_id sales_tax_details_county_sales_tax_id_fkey core.county_sales_taxes.county_sales_tax_id
12 tax_rate_type_code sales_tax_details_tax_rate_type_code_fkey core.tax_rate_types.tax_rate_type_code
14 reporting_tax_authority_id sales_tax_details_reporting_tax_authority_id_fkey core.tax_authorities.tax_authority_id
15 collecting_tax_authority_id sales_tax_details_collecting_tax_authority_id_fkey core.tax_authorities.tax_authority_id
16 collecting_account_id sales_tax_details_collecting_account_id_fkey core.accounts.account_id
17 use_tax_collecting_account_id sales_tax_details_use_tax_collecting_account_id_fkey core.accounts.account_id
18 rounding_method_code sales_tax_details_rounding_method_code_fkey core.rounding_methods.rounding_method_code
20 audit_user_id sales_tax_details_audit_user_id_fkey office.users.user_id

Indices

Index Name Owner Access Method Definition Description
sales_tax_details_pkey postgres btree sales_tax_detail_id
sales_tax_details_sales_tax_detail_name_uix postgres btree upper(sales_tax_detail_name::text)
sales_tax_details_sales_tax_detail_code_uix postgres btree upper(sales_tax_detail_code::text)

Check Constraints

Constraint Name Description
sales_tax_details_rate_chk
CHECK ( CASE WHEN state_sales_tax_id IS NOT NULL OR county_sales_tax_id IS NOT NULL THEN rate::numeric = 0::numeric ELSE rate::numeric > 0::numeric END)

Default Values

# Column Name Default
1 sales_tax_detail_id nextval('core.sales_tax_details_sales_tax_detail_id_seq'::regclass)
4 priority 0
7 based_on_shipping_address true
8 check_nexus true
9 applied_on_shipping_charge true
12 tax_rate_type_code 'P'::character varying
19 rounding_decimal_places 2
21 audit_ts now()

Triggers

Trigger Name Targets On Event Timing Condition Order Orientation Description