HI Michael,
The links between RDR1 & DLN1 should be using base line from target doc, RDR being sales order is the base of a delivery, but only if the delivery is drawn from the order - a delivery can also be drawn from a reserve invoice. You should also be checking that the base object type is the same (i.e. an order object type is 17 from memory, an invoice is 13 etc) to be sure that you are drawing the detail from the right base doc,
As has been pointed out before, there is NO join between sales documents and purchase documents so your joins between RDR1 and POR1 are invalid.