Untitled

mail@pastecode.io avatar
unknown
plain_text
16 days ago
1.2 kB
1
Indexable
Never
select a.apporigem, -- 21
a.seqauxnotafiscal, -- 153610, 153420
a.numeronf,
a.serienf,
a.seqpessoa,
a.codgeraloper,
a.nroempresa, -- 400
b.seqproduto,
b.codtributacao,
b.nroregtributacao,
b.tipforitem,
b.situacaonf,
b.vlritem,
b.bascalcicmsxml,
b.bascalcicms,
b.peraliquotaicms,
b.vlricms,
a.nfechaveacesso,
b.*
from mlf_auxnotafiscal a, mlf_auxnfitem b
where a.seqauxnotafiscal = b.seqauxnotafiscal
and a.numeronf in (96330, 96331)
and a.dtaemissao >= '21jun2024';
 
select a.apporigem, -- 21
a.seqauxnotafiscal, -- 153610, 153420
a.numeronf,
a.serienf,
a.seqpessoa,
a.codgeraloper,
a.nroempresa, -- 400
b.seqproduto,
b.codtributacao,
b.nroregtributacao,
b.tipforitem,
b.situacaonf,
b.vlritem,
--b.bascalcicmsxml,
b.bascalcicms,
b.peraliquotaicms,
b.vlricms,
a.nfechaveacesso,
b.*
from mlf_notafiscal a, mlf_nfitem b
where a.seqnf = b.seqnf
and a.numeronf in (96330, 96331)
and a.dtaemissao >= '21jun2024'; -- nada
 
select *
from mlf_auxnfinconsistencia a
where a.seqauxnotafiscal = 153420; -- Produto 26876 no item 1: base de ICMS: R$3.520,60, diferente da base ICMS do XML: R$0,00
 
select *
from tmp_m000_ct a
where a.m000_nr_documento = 96330;
Leave a Comment