SE_MOVNF;Movimentos da Nota Fiscal;skip_blk(x); 9;0;20;79;se_movxp;;
:SKEL
VARIAVEL w_colsep = chr(179)
VARIAVEL w_headsep = chr(196)
VARIAVEL zNF := if(select('sf_fatnf')>0,sf_fatnf->fnum,sf_fatf->pfnum)
VARIAVEL w_chave := zNF
VARIAVEL w_mensagem := "Sem mais Lancamentos DA NF "+lTrim(str(zNF))
VARIAVEL w_block := {|| w_chave <> mfnum }
VARIAVEL zFieldNCM = .t.
VARIAVEL #TEXTO_FONTE
   se Select("SE_PROD")=0 entao se_movnf->(ABRA("0NOIDX",r_siga,"se_prod","se_prod","seip_c","pcod"))
#FIM_TEXTO_FONTE
VARIAVEL Z_BLOCK={|zPcod| if(zPcod<>se_prod->pcod, se_prod->(dbseek(zPcod)), ""), Str(zPcod,6)+" "+se_prod->pdesc }
VARIAVEL zBlkNcm={|zPcod| if(zPcod<>se_prod->pcod, se_prod->(dbseek(zPcod)), ""), se_prod->pcodclafis }
COMANDO DEPOIS if(select("se_prod")>0,SE_PROD->(DBcLOSEAREA()),)
:TBMT
 13;doget(D_ob);Enter-Edita ;
 73;lst_alias(D_OB);I-Imprime ;
 80;tb_pesq(D_OB);P-Pesquisa ;
 84;tb_locate(D_oB);T-Busca_Trecho ;
 76;tb_locate(D_oB);L-Busca_Iniciais ;
 67;tb_locate(D_oB);C-Repete_Busca ;
 79;tb_index(D_OB);O-Ordena ;
 70;tb_filter(d_ob);F-Filtra ;
 69;tb_filter(d_ob,"Exp");E-Filtra_Expressao ;
 61;doget(D_ob,,.t.);=-Repete_Edicao ;
:TBFI
Apresentacao;eval(z_block,pcod);C;@s29;29;N;
Quant x Valor;Str(MQUANT,4)+" "+Str(Mvalor,9,2);C;@S14;14;N;
NCM;eval(zBlkNcm,pcod);C;99999999;8;N;
Data;MfgEs+" "+Dtoc(MDATA);C;@s10;10;N;
Nf;Mfnum;N;999999;6;S;
Cli;McodForc;N;999999;6;S;
Data;MDATA;D;;10;S;
Pedido;fNumPed;N;999999;6;S;
Cfop;pCfop;C;XXXXX;5;S;
cICM;Cst_Icms;C;999;3;S;
cPis;Cst_PIS;C;999;3;S;
cIpi;Cst_IPI;C;999;3;S;
BaseIcm;mBaseIcms;N;999999.99;9;S;
TotalIcm;mTotIcms;N;99999.99;8;S;
Quant;mQuant;N;999999.99;9;S;
Valor;mValor;N;999999.99;9;S;