ALTER TABLE VS4TAPCreditNote ADD
	TPCNDepositText nvarchar(30) NULL,
	TPCNDiscountText nvarchar(30) NULL,
	TPCNAdjustTotal money NULL
GO
UPDATE VS4TAPCreditNote SET TPCNAdjustTotal=0
GO

UPDATE VS4TAPCreditNote SET TPCNDepositText=replace(''+convert(char(20),round(TPCNDepositRate,2)),' ','') where TPCNDepositRate > 0
GO
UPDATE VS4TAPCreditNote SET TPCNDepositText=TPCNDepositText+'%' WHERE TPCNDepositText<>''
GO
UPDATE VS4TAPCreditNote SET TPCNDepositText=TPCNDepositText+'+'+replace(''+convert(char(20),round(TPCNDepositFix,2)),' ','') where TPCNDepositFix > 0
GO

UPDATE VS4TAPCreditNote SET TPCNDiscountText=replace(''+convert(char(20),round(TPCNDiscountPC,2)),' ','') where TPCNDiscountPC > 0
GO
UPDATE VS4TAPCreditNote SET TPCNDiscountText=TPCNDiscountText+'%' WHERE TPCNDiscountText<>''
GO
UPDATE VS4TAPCreditNote SET TPCNDiscountText=TPCNDiscountText+'+'+replace(''+convert(char(20),round(TPCNDiscountFix,2)),' ','') where TPCNDiscountFix > 0
GO

