CREATE TABLE [dbo].[nm_payment_modes]
(
[pm_payment_code] [dbo].[ais_code_short] NOT NULL,
[pm_l1] [nvarchar] (64) COLLATE French_CI_AS NOT NULL,
[pm_l2] [nvarchar] (64) COLLATE French_CI_AS NULL,
[pm_l3] [nvarchar] (64) COLLATE French_CI_AS NULL,
[pm_sys] [bit] NOT NULL CONSTRAINT [DF__nm_payment_modes__pm_sys] DEFAULT ((0)),
[pm_for_companies] [bit] NULL CONSTRAINT [DF__nm_payment_modes__pm_for_companies] DEFAULT ((0)),
[pm_for_clients] [bit] NULL,
[pm_for_introducers] [bit] NULL,
[pm_for_tax] [bit] NULL,
[pm_dir] [bit] NULL,
[pm_show_holder_info] [bit] NOT NULL CONSTRAINT [DF__nm_payment_modes__pm_show_holder_info] DEFAULT ((0)),
[pm_select_actor_account] [bit] NOT NULL CONSTRAINT [DF__nm_payment_modes__pm_select_actor_account] DEFAULT ((0)),
[pm_comm_sharing_deduced] [bit] NOT NULL CONSTRAINT [DF__nm_payment_modes__pm_comm_sharing_deduced] DEFAULT ((0)),
[pm_reference_required] [bit] NOT NULL CONSTRAINT [DF__nm_payment_modes__pm_reference_required] DEFAULT ((0)),
[pm_internal_transfer] [bit] NOT NULL CONSTRAINT [DF__nm_payment_modes__pm_internal_transfer] DEFAULT ((0)),
[pm_monthly_payment] [bit] NOT NULL CONSTRAINT [DF__nm_payment_modes__pm_monthly_payment] DEFAULT ((0)),
[pm_select_branch_account] [bit] NOT NULL CONSTRAINT [DF__nm_payment_modes__pm_select_branch_account] DEFAULT ((0)),
[pm_freeze] [bit] NOT NULL CONSTRAINT [DF__nm_payment_modes__pm_freeze] DEFAULT ((0)),
[pm_admin_only] [bit] NOT NULL CONSTRAINT [DF__nm_payment_modes__pm_admin_only] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[nm_payment_modes] ADD CONSTRAINT [CK__nm_payment_modes_pm_payment_code__string_pk] CHECK ((len(ltrim(rtrim([pm_payment_code])))>(0) AND charindex('*',[pm_payment_code])=(0) AND charindex('%',[pm_payment_code])=(0)))
GO
ALTER TABLE [dbo].[nm_payment_modes] ADD CONSTRAINT [PK_nm_payement_modes] PRIMARY KEY CLUSTERED  ([pm_payment_code]) ON [PRIMARY]
GO
