/* select from "OINV" T0 */
Declare numeronf int;
numeronf := /* T0."Serial" */ '[%0]';
Select
t0."Serial", t0."CardName", t0."DocDate", t0."DocTotal" ,'VENDAS>>NOTA FISCAL DE SAÍDA' as "MenuSAP"
from
oinv t0
where
t0."Serial" = :numeronf
union all
Select
t0."Serial", t0."CardName", t0."DocDate", t0."DocTotal" ,'VENDAS>>ENTREGA' as "MenuSAP"
from
ODLN t0
where
t0."Serial" = :numeronf
UNION ALL
Select
t0."Serial", t0."CardName", t0."DocDate", t0."DocTotal" ,'VENDAS>>DEVOLUCAO DE ENTREGA' as "MenuSAP"
from
oRDN t0
where
t0."Serial" = :numeronf
UNION ALL
Select
t0."Serial", t0."CardName", t0."DocDate", t0."DocTotal" ,'VENDAS>>DEVOLUCAO DE NF DE SAIDA' as "MenuSAP"
from
oRIN t0
where
t0."Serial" = :numeronf
UNION ALL
Select
t0."Serial", t0."CardName", t0."DocDate", t0."DocTotal" ,'COMPRAS>>NOTA FISCAL DE ENTRADA' as "MenuSAP"
from
oPCH t0
where
t0."Serial" = :numeronf
UNION ALL
Select
t0."Serial", t0."CardName", t0."DocDate", t0."DocTotal" ,'COMPRAS>>DEVOLUCAO NOTA FISCAL DE ENTRADA' as "MenuSAP"
from
oRPC t0
where
t0."Serial" = :numeronf
UNION ALL
Select
t0."Serial", t0."CardName", t0."DocDate", t0."DocTotal" ,'COMPRAS>>RECEBIMENTO' as "MenuSAP"
from
oPDN t0
where
t0."Serial" = :numeronf
UNION ALL
Select
t0."Serial", t0."CardName", t0."DocDate", t0."DocTotal" ,'COMPRAS>>DEVOLUCAO DE MERCADORIA' as "MenuSAP"
from
oRPD t0
where
t0."Serial" = :numeronf;