ALTER TABLE VS4TPOPTrans ADD
	TPPDDiscountText nvarchar(30) NULL,
	TPPDDepositText nvarchar(30) NULL,
	TPPDWTAXBase money NULL,
	TPPDVATType smallint NULL,
	TPPDTotal money NULL,
	TPPDTotalInRate money NULL,
	TPPDNetTotal money NULL
GO
UPDATE VS4TPOPTrans Set TPPDWTAXBase=TPPDTaxBase ,TPPDVATType=TPPDDepositVAT,TPPDTotal=TPPDGrandTotalVAT, TPPDTotalInRate=TPPDFirstPayment, TPPDNetTotal=TPPDWTAXRate
GO

UPDATE VS4TPOPTrans SET TPPDDepositText=replace(''+convert(char(20),round(TPPDDepositRate,2)),' ','') where TPPDDepositRate > 0
GO
UPDATE VS4TPOPTrans SET TPPDDepositText=TPPDDepositText+'%' WHERE TPPDDepositText<>''
GO

UPDATE VS4TPOPTrans SET TPPDDiscountText=replace(''+convert(char(20),round(TPPDDiscountPC,2)),' ','') where TPPDDiscountPC > 0
GO
UPDATE VS4TPOPTrans SET TPPDDiscountText=TPPDDiscountText+'%' WHERE TPPDDiscountText<>''
GO
UPDATE VS4TPOPTrans SET TPPDDiscountText=TPPDDiscountText+'+'+replace(''+convert(char(20),round(TPPDDiscountFix,2)),' ','') where TPPDDiscountFix > 0
GO

ALTER TABLE VS4TPOPTrans
	DROP COLUMN TPPDIncoType, TPPDInsurance, TPPDFreightFee, TPPDOtherFee, TPPDTransportFee, TPPDCountryOrigin, TPPDDecimalEX, TPPDDecimalUnit, TPPDDecimalCost, TPPDIncoterms
GO