Posting Rule Logic Not working as desired

working on a posting rule change to AR Invoice. Client wants to split revenue by labor and material to different GL Accounts. Based on their business, I have to determine the split based on a couple of different product group codes. I use an If statement to determine the amounts based on the product group found. I have one situation where the first if is what should be executing but it moves to the Else statement. When I look at the PE Viewer, is see that both lines are executing so the value returned is incorrect. Any ideas?
Posting Rule details
image

PE Viewer details

Well, this didn’t take long…while I searched Hi and Low for the meaning of Else If…
This is what was needed. The resolution is to use the Else If where the second If statement is.
When this is done, it performs as desired.
image

1 Like