Order direct to sales oder

I have a question about receiving. I have a sales order that calls for a part to be ordered direct to an order for a qty of 2. The PO is linked to the sales order but it is set as buy for inventory because there is nothing that has an option for buy direct to job.

I also have another 2 that are required for a job that will be pulled from stock. So I have requirements for 4 parts.

The system sees the direct flag for the order and does not account for that to come from stock. But since the PO is to stock it thinks that the parts in stock are there to supply the job. It won't generate a suggestion for the next 2 that I need to order.

The receipt for those parts that were ordered directly to the order say that is goes to that sales order, but the parts still got put into stock.

What are we doing wrong? Why doesn't 2+2=4?