CREATE TABLE [dbo].[acc_bordereaux_variables]
(
[bdrv_bordereau_id] [int] NOT NULL,
[bdrv_invoice_id] [int] NOT NULL,
[bdrv_variable_id] [int] NOT NULL,
[bdrv_tf] [dbo].[ais_decimal2] NULL,
[bdrv_taxes] [dbo].[ais_decimal2] NULL,
[bdrv_taxes_broker] [dbo].[ais_decimal2] NULL,
[bdrv_ti] [dbo].[ais_decimal2] NULL,
[bdrv_comm] [dbo].[ais_decimal2] NULL,
[bdrv_comm_taxes] [dbo].[ais_decimal2] NULL,
[bdrv_comm_taxes_broker] [dbo].[ais_decimal2] NULL,
[bdrv_umr_value] [varchar] (30) COLLATE French_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[acc_bordereaux_variables] ADD CONSTRAINT [PK_acc_bordereaux_variables] PRIMARY KEY CLUSTERED  ([bdrv_bordereau_id], [bdrv_invoice_id], [bdrv_variable_id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[acc_bordereaux_variables] ADD CONSTRAINT [FK_acc_bordereaux_variables_acc_bordereaux_details] FOREIGN KEY ([bdrv_bordereau_id], [bdrv_invoice_id]) REFERENCES [dbo].[acc_bordereaux_details] ([bdrd_bordereau_id], [bdrd_invoice_id])
GO
