For Purchase Orders, besides the check box, it is because closed or completed order stay in the PO1 and PO2 files based on a setup option. In Sales Order you will often see this is a sales order is not correctly updated to history. I have seen this when the remaining items on a sales order are deleted rather than filled so if you look at the sales order it does not show anything left to ship/invoice.