ALTER TABLE VS4TARCreditNote ADD
	TRCNDepositText nvarchar(30) NULL,
	TRCNDiscountText nvarchar(30) NULL,
	TRCNAdjustTotal money NULL
GO
UPDATE VS4TARCreditNote SET TRCNAdjustTotal=0
GO

UPDATE VS4TARCreditNote SET TRCNDepositText=replace(''+convert(char(20),round(TRCNDepositRate,2)),' ','') where TRCNDepositRate > 0
GO
UPDATE VS4TARCreditNote SET TRCNDepositText=TRCNDepositText+'%' WHERE TRCNDepositText<>''
GO
UPDATE VS4TARCreditNote SET TRCNDepositText=TRCNDepositText+'+'+replace(''+convert(char(20),round(TRCNDepositFix,2)),' ','') where TRCNDepositFix > 0
GO

UPDATE VS4TARCreditNote SET TRCNDiscountText=replace(''+convert(char(20),round(TRCNDiscountPC,2)),' ','') where TRCNDiscountPC > 0
GO
UPDATE VS4TARCreditNote SET TRCNDiscountText=TRCNDiscountText+'%' WHERE TRCNDiscountText<>''
GO
UPDATE VS4TARCreditNote SET TRCNDiscountText=TRCNDiscountText+'+'+replace(''+convert(char(20),round(TRCNDiscountFix,2)),' ','') where TRCNDiscountFix > 0
GO

