Hi All,
I have some issues with the following syntax:
if month({InvCredHead.DocDate}) = month({?DATE})
and year({InvCredHead.DocDate}) = year({?DATE})
//and {InvCredHead.SOURCE} = "CRED"
and {InvCredHead.ObjType} = "14"
and {InvCredHead.DocTotal} <> 0
then ({InvCredHead.DocTotal} - {InvCredHead.vatsum} - {InvCredHead.DiscSum}) * (-1)
ELSE
IF month({InvCredHead.DocDate}) = month({?DATE})
and year({InvCredHead.DocDate}) = year({?DATE})
//and {InvCredHead.SOURCE} = "INV"
and {InvCredHead.ObjType} = "13"
and {InvCredHead.DocTotal} <> 0
then ({InvCredHead.DocTotal} - {InvCredHead.vatsum} - {InvCredHead.DiscSum})
The INVCREDHEAD is a view that unions invoice and credit note headers.
If i exclude the "*(-1)" from then ({InvCredHead.DocTotal} - {InvCredHead.vatsum} - {InvCredHead.DiscSum}) * (-1), the result returned is correct, only positive.
If i include the "*(-1), the result returned is zero
How can i get this to return the correct negative value?
Thanks in advance,
Regards,
Kiran