Hi,
We are wrtiting a script logic to ensure that if a GL account i.e, 221050 total /net value is greater than zero then should all therecords should goto 221050A , else if the total is lesser than zero then all the transaction records should goto 221050L.
The below is the script logic written, but the logic is checking each record instead of the total net balance and is posting to assets and liabilities.
*WHEN ACCOUNT
*IS 221050
*REC(EXPRESSION=%VALUE%>0 ? %VALUE% : 0, ACCOUNT=221050A)
*REC(EXPRESSION=%VALUE%>0 ? 0 : %VALUE% )
*ENDWHEN
*WHEN ACCOUNT
*IS 221050
*REC(EXPRESSION=%VALUE%<0 ? %VALUE% : 0, ACCOUNT=221050L)
*REC(EXPRESSION=%VALUE%<0 ? 0 : %VALUE% )
*ENDWHEN
For Instance if In have 2 records, with value +50 and -150, the logic should take the total as -100(I.e, 50+(-150)=-100) and based on the logic since it is less than zero all the 2 transactions should goto 221050L.
Instead now system posts +50 in 221050A and -150 in 221050L.
Could you please let me know how to correct the same in the script.
Kindly advice.
Regards,
Shilpa