Table: dbo.Tax_Code
Complete set of Ultra Tax and Custom Tax codes for a client
Columns
Name | Type | Constraints | Description
tax_code_KEY | int (4) | NOT NULL | Primary Key
client_KEY | int (4) |  | Client these tax codes are for. Null value indicates a global template used when creating a new client
tax_code | nvarchar (10) | NOT NULL | Ultra Tax tax code
tax_subcode | nvarchar (4) | NOT NULL | User entered custom tax code
tax_code_guid | uniqueidentifier (16) | NOT NULL | A unique GUID key for this row.

Primary key
Name | Columns | Description
PK_Tax_Code | tax_code_KEY |
Unique constraints
Name | Columns | Description
UK_Tax_Code$client_KEY$tax_code$tax_subcode | client_KEY, tax_code, tax_subcode |
UK_Tax_Code$tax_code_guid | tax_code_guid |

Foreign keys
Name | Columns | Referenced table | Description
FK_Tax_Code__Client__client_KEY | client_KEY | Client (client_KEY) |

Incoming foreign keys
Name | Columns | Referencing table | Description
FK_Tax_Code_N_Ultra_Tax_Tax_Code__Tax_Code__tax_code_KEY | tax_code_KEY | Tax_Code_N_Ultra_Tax_Tax_Code |
FK_GL_Account_Classification_N_Tax_Code__Tax_Code__tax_code_KEY | tax_code_KEY | GL_Account_Classification_N_Tax_Code |
FK_GL_Account_Classification_N_Tax_Code_M3__Tax_Code__tax_code_KEY | tax_code_KEY | GL_Account_Classification_N_Tax_Code_M3 |
FK_Tax_Code_N_GL_Account__Tax_Code__tax_code_KEY | tax_code_KEY | Tax_Code_N_GL_Account |
FK_Tax_Code_M3_N_GL_Account__Tax_Code__tax_code_KEY | tax_code_KEY | Tax_Code_M3_N_GL_Account |
FK_Tax_Reconciliation_N_Journal_Entry_Distribution__Tax_Code__tax_code_KEY | tax_code_KEY | Tax_Reconciliation_N_Journal_Entry_Distribution |