CREATE TABLE VS4TAPInvoicePayP(
	TPIPTIAPNo nvarchar(30) NOT NULL,
	TPIPLn int NOT NULL,
	TPIPIsChange smallint NULL,
	TPIPPaymentType nvarchar(15) NULL,
	TPIPCurrency nvarchar(4) NULL,
	TPIPTBnkCode nvarchar(50) NULL,
	TPIPUseOD smallint NULL,
	TPIPTransferDate datetime NULL,
	TPIPCashDate datetime NULL,
	TPIPDocType smallint NULL,
	TPIPDocNo nvarchar(50) NULL,
	TPIPBankBranch nvarchar(50) NULL,
	TPIPAccountType smallint NULL,
	TPIPAccountName nvarchar(160) NULL,
	TPIPAccountNumber nvarchar(30) NULL,
	TPIPTBCDNo nvarchar(10) NULL,
	TPIPCardCode nvarchar(30) NULL,
	TPIPCardType nvarchar(50) NULL,
	TPIPCardName nvarchar(50) NULL,
	TPIPCardNo nvarchar(30) NULL,
	TPIPCardExpire nvarchar(7) NULL,
	TPIPExchangeRate float NULL,
	TPIPAmount money NULL,
	TPIPAmountInRate money NULL,
	TPIPAdjustTotal money NULL,
	TPIPDiscount money NULL,
	TPIPFee money NULL,
	TPIPFeeProvide smallint NULL,
	TPIPNetAmount money NULL,
	TPIPTCBBNo nvarchar(30) NULL,
	TPIPNote nvarchar(250) NULL,
	TPIPFlag1 smallint NULL,
	TPIPFlag2 smallint NULL,
	TPIPFlag3 datetime NULL
) ON [PRIMARY]
GO
ALTER TABLE VS4TAPInvoicePayP ADD CONSTRAINT
	PK_VS4TAPInvoicePayP PRIMARY KEY CLUSTERED 
	(
	TPIPTIAPNo,
	TPIPLn
	) ON [PRIMARY]
GO
