CREATE TABLE [dbo].[acc_trn_bordereaux_details]
(
[trnbd_bordereau_id] [int] NOT NULL,
[trnbd_transaction_id] [int] NOT NULL,
[trnbd_amount_db] [dbo].[ais_decimal2] NULL,
[trnbd_amount_cr] [dbo].[ais_decimal2] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[acc_trn_bordereaux_details] ADD CONSTRAINT [PK_acc_trn_bordereaux_details] PRIMARY KEY CLUSTERED  ([trnbd_bordereau_id], [trnbd_transaction_id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[acc_trn_bordereaux_details] ADD CONSTRAINT [FK_acc_trn_bordereaux_details_acc_trn_bordereaux] FOREIGN KEY ([trnbd_bordereau_id]) REFERENCES [dbo].[acc_trn_bordereaux] ([trnb_bordereau_id])
GO
ALTER TABLE [dbo].[acc_trn_bordereaux_details] ADD CONSTRAINT [FK_acc_trn_bordereaux_details_acc_transactions] FOREIGN KEY ([trnbd_transaction_id]) REFERENCES [dbo].[acc_transactions] ([atrn_transaction_id])
GO
