CREATE TABLE [dbo].[acc_invoices_policies_variables_commission_taxes]
(
[invpolvct_invoice_id] [int] NOT NULL,
[invpolvct_policy_situation_id] [int] NOT NULL,
[invpolvct_variable_id] [int] NOT NULL,
[invpolvct_tax_id] [int] NOT NULL,
[invpolvct_tax_value] [dbo].[ais_decimal2] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[acc_invoices_policies_variables_commission_taxes] ADD CONSTRAINT [PK_acc_invoices_policies_variables_commission_taxes] PRIMARY KEY CLUSTERED  ([invpolvct_invoice_id], [invpolvct_policy_situation_id], [invpolvct_variable_id], [invpolvct_tax_id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[acc_invoices_policies_variables_commission_taxes] ADD CONSTRAINT [FK_acc_invoices_policies_variables_commission_taxes_acc_invoices_policies_variables] FOREIGN KEY ([invpolvct_invoice_id], [invpolvct_policy_situation_id], [invpolvct_variable_id]) REFERENCES [dbo].[acc_invoices_policies_variables] ([invpolv_invoice_id], [invpolv_policy_situation_id], [invpolv_variable_id])
GO
