CREATE TABLE [dbo].[acc_invoices_risks_variables_commission_taxes]
(
[invrisvct_invoice_id] [int] NOT NULL,
[invrisvct_risk_situation_id] [int] NOT NULL,
[invrisvct_variable_id] [int] NOT NULL,
[invrisvct_tax_id] [int] NOT NULL,
[invrisvct_tax_value] [dbo].[ais_decimal2] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[acc_invoices_risks_variables_commission_taxes] ADD CONSTRAINT [PK_acc_invoices_risks_variables_commission_taxes] PRIMARY KEY CLUSTERED  ([invrisvct_invoice_id], [invrisvct_risk_situation_id], [invrisvct_variable_id], [invrisvct_tax_id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[acc_invoices_risks_variables_commission_taxes] ADD CONSTRAINT [FK_acc_invoices_risks_variables_commission_taxes_acc_invoices_risks_variables] FOREIGN KEY ([invrisvct_invoice_id], [invrisvct_risk_situation_id], [invrisvct_variable_id]) REFERENCES [dbo].[acc_invoices_risks_variables] ([invrisv_invoice_id], [invrisv_risk_situation_id], [invrisv_variable_id])
GO
