Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
Can someone tell me what is wrong with the expression below? Been staring at this too long, and I guess I don't see why the token doesn't match:
// For invoices and removing the pallets
sum(if(pallet<>'P' and trntype='I',
// For invoices and replacing price with paprice
(if(price<>0,( //To check styles with 0 amount and not a pallet
((invqty)*price)*rate))),
(((invqty)*pprice)
*rate))),
// For credits
(((-(invqty)*price)*rate)
Please help.
Thanks,
E
Try this?
= sum(
if(pallet<>'P' and trntype='I',(if(price<>0,(((invqty)*price)*rate))), (((invqty)*pprice)*rate)),(((-(invqty)*price)*rate)))
May be this:
Sum(
If(pallet <> 'P' and trntype='I',
If(price <> 0, invqty * price * rate,
invqty * pprice * rate),
-invqty * price * rate))
Overall there seems to be one more opening bracket than closing brackets.
Also the closing bracket for your sum( appears to be before the comma at the end of the line before the // For credits comment.