Some stock movements still need to be posted.

I am trying to close a period and getting this error.

I ran the code on SQL and it gave me these results

The sales order listed here has been invoiced and accounted for fully.