private IAddressBase GetDropShipDestinationAddress(ARTran tran, SOLine soLine)
        {
            if (soLine != null && tran.SOOrderLineNbr != null)
            {
                Boolean      isDropShip      = soLine.POCreate == true && soLine.POSource == INReplenishmentSource.DropShipToOrder;
                IAddressBase dropShipAddress = isDropShip
                                        ? PXSelectJoin <PO.POAddress,
                                                        InnerJoin <PO.POOrder, On <PO.POOrder.shipAddressID, Equal <PO.POAddress.addressID> >,
                                                                   InnerJoin <PO.POReceiptLine, On <PO.POReceiptLine.pOType, Equal <PO.POOrder.orderType>,
                                                                                                    And <PO.POReceiptLine.pONbr, Equal <PO.POOrder.orderNbr> > > > >,
                                                        Where <PO.POReceiptLine.receiptNbr, Equal <Current <ARTran.sOShipmentNbr> >,
                                                               And <PO.POReceiptLine.lineNbr, Equal <Current <ARTran.sOShipmentLineNbr> > > > >
                                               .SelectSingleBound(Base, new[] { tran })
                                               .RowCast <PO.POAddress>()
                                               .FirstOrDefault()
                                        : null;

                if (dropShipAddress != null)
                {
                    return(dropShipAddress.With(ValidAddressFrom <PO.POOrder.shipAddressID>));
                }
            }
            return(null);
        }