CREATE TABLE [dbo].[acc_bordereaux_details]
(
[bdrd_bordereau_id] [int] NOT NULL,
[bdrd_invoice_id] [int] NOT NULL,
[bdrd_tf] [dbo].[ais_decimal2] NULL,
[bdrd_taxes] [dbo].[ais_decimal2] NULL,
[bdrd_taxes_broker] [dbo].[ais_decimal2] NULL,
[bdrd_ti] [dbo].[ais_decimal2] NULL,
[bdrd_comm] [dbo].[ais_decimal2] NULL,
[bdrd_comm_taxes] [dbo].[ais_decimal2] NULL,
[bdrd_comm_taxes_broker] [dbo].[ais_decimal2] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[acc_bordereaux_details] ADD CONSTRAINT [PK_acc_bordereaux_details] PRIMARY KEY CLUSTERED  ([bdrd_bordereau_id], [bdrd_invoice_id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[acc_bordereaux_details] ADD CONSTRAINT [FK_acc_bordereaux_details_acc_bordereaux] FOREIGN KEY ([bdrd_bordereau_id]) REFERENCES [dbo].[acc_bordereaux] ([bdr_bordereau_id])
GO
ALTER TABLE [dbo].[acc_bordereaux_details] ADD CONSTRAINT [FK_acc_bordereaux_details_acc_invoices] FOREIGN KEY ([bdrd_invoice_id]) REFERENCES [dbo].[acc_invoices] ([inv_invoice_id])
GO
