ALTER TABLE VS4TAPDebitNote ADD
	TDENDepositText nvarchar(30) NULL,
	TDENDiscountText nvarchar(30) NULL,
	TDENAdjustTotal money NULL
GO
UPDATE VS4TAPDebitNote SET TDENAdjustTotal=0
GO

UPDATE VS4TAPDebitNote SET TDENDepositText=replace(''+convert(char(20),round(TDENDepositRate,2)),' ','') where TDENDepositRate > 0
GO
UPDATE VS4TAPDebitNote SET TDENDepositText=TDENDepositText+'%' WHERE TDENDepositText<>''
GO
UPDATE VS4TAPDebitNote SET TDENDepositText=TDENDepositText+'+'+replace(''+convert(char(20),round(TDENDepositFix,2)),' ','') where TDENDepositFix > 0
GO

UPDATE VS4TAPDebitNote SET TDENDiscountText=replace(''+convert(char(20),round(TDENDiscountPC,2)),' ','') where TDENDiscountPC > 0
GO
UPDATE VS4TAPDebitNote SET TDENDiscountText=TDENDiscountText+'%' WHERE TDENDiscountText<>''
GO
UPDATE VS4TAPDebitNote SET TDENDiscountText=TDENDiscountText+'+'+replace(''+convert(char(20),round(TDENDiscountFix,2)),' ','') where TDENDiscountFix > 0
GO

