Table Customer
DDL
create sequence seqCustomer as bigint start with 1;
create table Customer (
cID bigint not null default next value for seqCustomer,
cCreatedOn datetime not null default sysdatetime(),
cCreatedByFK pointer not null,
cChangedOn datetime not null default sysdatetime(),
cChangedByFK pointer not NULL,
cName dbo.Name not null,
cStreet LongName not null default '',
cTown dbo.Name not null default '',
cTownCode ShortName not null default '',
cFax ShortName not null default '',
cContactPerson LongName not null default '',
cBankAccount dbo.Name not null default '',
cBankName dbo.Name not null default '',
cVATNumber dbo.Name not null default '',
cEmail LongName not null default '',
cTel ShortName not null default '',
cArea ShortName not null default '',
cCommercialNumber LongName not null default '',
cDoNotPrintLabels BIT not null default 0,
cDisplayOrder int not null default 0,
cDisplayInReturns bit not null default 0,
cOldSupplierNo int not null default 0,
cActive BIT not null default 1,
cGroupFK Pointer,
cBatchImport Bit not null default 0,
cBatchImportType ShortName not null default '',
cBatchImportSubDir NVARCHAR(255) not null default '',
cConfirmImportedSubDir NVARCHAR(255) not null default '',
cConfirmExportedSubDir NVARCHAR(255) not null default '',
cExportStockDir NVARCHAR(255) not null default '',
cConfirmRejectedSubDir NVARCHAR(255) not null default '',
cBatchResultEmail NVARCHAR(255) not null default '',
cConfirmPick BIT not null default 0,
cConfirmPack BIT not null default 0,
cConfirmShip BIT not null default 0,
cConfirmFile BIT not null default 0,
cConfirmReject BIT not null default 0,
cConfirmProcessed BIT not null default 0,
cExportStock BIT not null default 0,
cAutoCreateOrder BIT not null default 0,
cArticlePrefix NVARCHAR(4) not null default '',
CONSTRAINT pkClient PRIMARY key (cID)
);
create unique index udxCustomer on Customer(cName);
create index idxCustomerGroup on Customer(cGroupFK);
Default Data
insert into Customer (cID, cCreatedByFK, cChangedByFK, cName) values
(0,0,0,'Unknown');
Mapping
CLIENTI
Conversion ID: CLIENTI.cnvCustomerID
New | Old |
---|---|
cID | ID if not exist in supplier |
cCreatedOn | FILLDATE |
cCreatedByFK | PCNAME |
cChangedOn | FILLDATE |
cChangedByFK | PCNAME |
cName | COMPANY |
cStreet | STREET |
cTown | TOWN |
cTownCode | TownCode |
cFax | FAX |
cContactPerson | PERSON |
cBankAccount | CONT |
cBankName | BANCA |
cVATNumber | CF |
cEmail | |
cTel | TEL |
cArea | JUDET |
cCommercialNumber | NRREGCOM |
cDoNotPrintLabels | DONOTPRINTLABEL |
Supplier
Conversion ID: Supplier.cnvCustomerID
New | Old |
---|---|
cID | ID |
createdOn | FILLDATE |
createdByFK | PCNAME |
changedOn | FILLDATE |
changedByFK | PCNAME |
cName | NAME |
cDescription | NAME2 |
cStreet | STREET |
cZIP | PostCode |
cTown | TOWN |
cTel | TEL |
cFax | FAX |
cEmail | |
cContactPerson | PERSON |
cDisplayOrder | SQPK |
cDisplayInReturns | ActivateReturnMenu |
cOldSupplierNo | SUPPLIERNO |
cArea | |
cCommercialNumber | |
cDoNotPrintLabels | |
cBankAccount | |
cBankName | |
cVATNumber |