te paso mi query para eu no tengas problemas solo adecualo a tus necesidades.
select distinct 'FacRes' as "Tipo" , T0."CardCode", T0."CardName" ,
T0."DocEntry", T0."CANCELED" as "status Orden", T0."DocNum" as "Numero Entrega" ,
T0."DocDate" as "Fecha de Entrega", T0."DocTotal" as "totalorden", T0."DocTotalFC" as "totordusd",T0."DocCur",T1."TargetType" as"destino",T1."TrgetEntry" as "EntryFact",T0."ShipToCode" as "Envio",
T1."BaseType" , T3."DocNum" as "No deFactura", T3."DocDate" as "Fecha Factura" , T1."ItemCode" as "CodigoProd",
T3."CANCELED" as "status Fac", T3."DocEntry" , T3."DocTotal" as totfactmx, T3."DocTotalFC" as totfactus,T3."DocCur" as "monfact",
T5."DocNum" as "Autorizacion de Salida" , T5."DocDate" as "Fecha Autorizacion" , T5."CANCELED" as "Estatus Aut",
T5."DocTotal" as "totsalmx", T5."DocTotalFC" as "totsalus",T5."DocCur" as "monsal",
T4."TargetType" as "DESTFACT", T4."TrgetEntry" AS "NCEntry",T5."NumAtCard" as "NumOC",
T2."DocNum" as "No deNC", T2."DocTotal" as "monto de NC",T2."DocTotalFC" AS "MonNdCusd",
T6."Dscription" as "Descr", T6."Quantity" as "Canti",T6."UomCode" as "unidad"
from ODLN T0
inner join DLN1 T1 on T1."DocEntry" = T0."DocEntry" and T1."BaseType" = 13 and T1."ItemCode" not in ('05-01-004','06-01-001','06-01-002') and T1."LineNum"=0
left join OINV T3 on T3."DocEntry" = T1."BaseEntry"
left join INV1 T4 on T1."TrgetEntry" = T4."DocEntry" and T4."BaseType" = 17
left join ORDR T5 on T5."DocEntry" = T4."BaseEntry"
inner join RDR1 T6 on T3."DocEntry" = T6."DocEntry"
LEFT JOIN ORIN T2 ON T4."TrgetEntry" = T2."DocEntry"
union all
select distinct 'Re-Entregadas' as "Tipo" , T0."CardCode", T0."CardName" , T0."DocEntry",
T0."CANCELED" as "status Orden", T0."DocNum" as "Numero Entrega" ,
T0."DocDate" as "Fecha de Entrega", T0."DocTotal" as "totalreentrega", T0."DocTotalFC" as "totalreentUSD",T0."DocCur",T1."TargetType" as"destino",T1."TrgetEntry" as "EntryFact",T0."ShipToCode" as "Envio",
T1."BaseType" , 0 as "No deFactura", '0' as "Fecha Factura" , T1."ItemCode" as "CodigoProd",
T3."CANCELED" as "status Fac", T3."DocEntry" ,0 as totfactmx,0 as totfactus,'' as "monfact",
0 as "Autorizacion de Salida" , ' ' as "Fecha Autorizacion", '0' as "Estatus Aut",
0 as totsalmx, 0 as totsalus, ' ' as "monsal",
0 as "DESTFACT", 0 AS "NCEntry",T0."NumAtCard" as "NumOC",
0 as "No deNC", 0 as "monto de NC",0 AS "MonNdCusd",
T1."Dscription" as "Descr", T1."Quantity" as "Canti",T1."UomCode" as "unidad"
from ODLN T0
inner join DLN1 T1 on T1."DocEntry" = T0."DocEntry" and T1."BaseType" = 15 and T1."ItemCode" not in ('05-01-004','06-01-001','06-01-002') and T1."LineNum"=0
inner join ODLN T3 on T3."DocEntry" = T1."BaseEntry"
union all
select distinct 'Directa' as "Tipo" , T0."CardCode", T0."CardName" , T0."DocEntry",
T0."CANCELED" as "status Orden", T0."DocNum" as "Numero Entrega" ,
T0."DocDate" as "Fecha de Entrega", T0."DocTotal" as "totalreentrega", T0."DocTotalFC" as "totalreentUSD",T0."DocCur",T1."TargetType" as"destino",T1."TrgetEntry" as "EntryFact",T0."ShipToCode" as "Envio",
T1."BaseType" , 0 as "No deFactura", '0' as "Fecha Factura" , T1."ItemCode" as "CodigoProd",
T3."CANCELED" as "status Fac", T3."DocEntry" ,0 as totfactmx,0 as totfactus,'' as "monfact",
0 as "Autorizacion de Salida" , ' ' as "Fecha Autorizacion", '0' as "Estatus Aut",
0 as totsalmx, 0 as totsalus, ' ' as "monsal",
T4."TargetType" as "DESTFACT", T4."TrgetEntry" AS "NCEntry",T0."NumAtCard" as "NumOC",
T2."DocNum" as "No deNC", T2."DocTotal" as "monto de NC",T2."DocTotalFC" AS "MonNdCusd",
T1."Dscription" as "Descr", T1."Quantity" as "Canti",T1."UomCode" as "unidad"
from ODLN T0
inner join DLN1 T1 on T1."DocEntry" = T0."DocEntry" and T1."BaseType" = -1 and T1."TargetType" in ('13','15','-1') and T1."ItemCode" not in ('05-01-004','06-01-001','06-01-002') and T1."LineNum"=0
left join INV1 T4 on T1."TrgetEntry" = T4."DocEntry"
left join OINV T3 on T3."DocEntry" = T4."BaseEntry"
LEFT JOIN ORIN T2 ON T4."TrgetEntry" = T2."DocEntry"
union all
select distinct 'Factura' as "Tipo" ,T0."CardCode", T0."CardName" , T0."DocEntry",
T0."CANCELED" as "status Orden", T0."DocNum" as "Numero Entrega" ,
T0."DocDate" as "Fecha de Entrega", T0."DocTotal", T0."DocTotalFC",T0."DocCur",T1."TargetType" as"destino",T1."TrgetEntry" as "EntryFact",T0."ShipToCode" as "Envio",
T1."BaseType" , T5."DocNum" as "No deFactura", T5."DocDate" as "Fecha Factura" , T1."ItemCode" as "CodigoProd",
T5."CANCELED" as "status Fac", T3."DocEntry" ,T5."DocTotal" as "totfactmx", T5."DocTotalFC" as "totfactus",T5."DocCur" as "monfact",
T3."DocNum" as "Autorizacion de Salida" , T3."DocDate" as "Fecha Autorizacion", T3."CANCELED" as "Estatus Aut",
T3."DocTotal" as "totsalmx", T3."DocTotalFC" as "totsalus", T3."DocCur" as "monsal",
T4."TargetType" as "DESTFACT", T4."TrgetEntry" AS "NCEntry",T3."NumAtCard" as "NumOC",
T2."DocNum" as "No deNC", T2."DocTotal" as "monto de NC",T2."DocTotalFC" AS "MonNdCusd",
T6."Dscription" as "Descr", T6."Quantity" as "Canti",T6."UomCode" as "unidad"
from ODLN T0
inner join DLN1 T1 on T1."DocEntry" = T0."DocEntry" and T1."BaseType" in('17') and T1."TargetType" in ('13','15','-1') and T1."ItemCode" not in ('05-01-004','06-01-001','06-01-002') and T1."LineNum"=0
inner join ORDR T3 on T3."DocEntry" = T1."BaseEntry"
inner join RDR1 T6 on T3."DocEntry" = T6."DocEntry"
left join INV1 T4 on T1."TrgetEntry" = T4."DocEntry"
left join OINV T5 on T5."DocEntry" = T4."DocEntry"
LEFT JOIN ORIN T2 ON T4."TrgetEntry" = T2."DocEntry"