SF_FATF;Notas de Entrada;sys_tbbrow; 2; 0;23;79;padrao;;
:SKEL
VARIAVEL w_colsep  = chr(179)
VARIAVEL w_headsep = chr(196)
VARIAVEL w_browrel = .t.
VARIAVEL w_chave = alias()
VARIAVEL Z_SKIPBLK = .F.
VARIAVEL z_nil = If(select("sccpfor")=0, (Abra_Arq("sccpfor"),dbSelectArea("sf_fatf")), "")
VARIAVEL Z_REL = "Lst_exec('NFE05')"
VARIAVEL zbPrtNf = {|| zalias:=alias(),z_recn:=recno(),Relat(z_REL,"nb"),DbCloseAll(),Abra_Arq("sccpfor"), Abra_Arq(zalias), dbgoto(z_recn) }
VARIAVEL Z_blkfor = { |x_forn| Sccpfor->(if(select()=0,(,dbSelectArea("sf_fatf")),""),DbGoto(x_forn), cp_nome) }
VARIAVEL zbItens:={||zSele:=Select(),Abra("0",r_siga,"SE_MOVNF","SE_MOVNF","seim_f","mfnum","SEIM_C","PCOD"),Brow_Db('SE_MOVNF',.t.),Se_MOVNF->(DbCloseArea()),DbSelectArea(zSele)}
COMANDO DEPOIS Z_NIL = if(select("sccpfor")>0,sccpfor->(DbCloseArea()),"")
:TBMT
 13;Eval(zbPrtNf);Enter-Imprime ;
 32;Eval(zbItens);Barra-Produtos ;
  7;tb_del(D_ob);DEL-DELeta ;
 65;tb_update(D_OB);A-Altera ;
 22;tb_insert(D_OB);Ins-Inclui ;
 80;tb_pesq(D_OB);P-Pesquisa ;
 79;tb_index(D_OB);O-Ordena ;
 70;tb_filter(d_ob);F-Filtra ;
 69;tb_filter(d_ob,"Exp");E-Filtra_Expressao;
 73;lst_alias(D_OB);I-Imprime ;
 84;tb_locate(D_oB);T-Busca_Trecho ;
 67;tb_locate(D_oB);C-Repete_Busca ;
 61;doget(D_ob,,.t.);=-Repete_Edicao ;
 13;doget(D_ob);Enter-Edita ;
:TBFI
Fornecedor;Eval(z_blkfor,PFFOR);C;@s20;20;N;
Pedido;PFNUMPED;N;999999;  6;;
Forn;PFFOR;N;999;4;;
CFOP;PFCODOP;C;xxxxx;  5;;
N.F.;PFNUM;N;999999999;9;S;
ValCompra;PFVAL;N;99999.99;8;;
DataEmis;PFDATAEMI;D;;  8;;
ChaveNfe;fChaveNfe;C;@12;10;S;
Serie e Sub;PFSERIESUB;C;xxx;  3;;
Data Ped;PFDATAPED;D;;  8;;
Venc 1a;PFDATVENC;D;;  8;;
DataCheg;PFDATACHE;D;;  8;;
ValVenda;PFVALDIA;N;99999.99; 8;;
Base ICMS;PFBASEICMS;N;99999.99; 8;;
%Desc;if(pfvaldia>0,(PFVALDIA-pfval)/pfvaldia*100,0);N;999.9;5;;
%ICMs;PFTAXAICMS;N;999.99;  8;;
Tot ICMS;PFTOTICMS;N;99999.99; 8;;
ICM Ret;PFVALRET;N;999999.99; 9;;
BaseRepasse;PFBASEREP;N;999999.99; 9;;
Val Repasse;PFVALREP;N;999999999.99; 14;;
Desconto;PFVALDES;N;999999999.99; 14;;
Outros;PFOUTROS;N;999999999.99; 14;;
ValTot;PFVALTOT;N;9999999999.99; 15;;
%IPI;PFTAXAIPI;N;999.99;  8;;
Tot IPI;PFTOTIPI;N;999999999.99; 14;;
TEnc;PFTIPOENC;N;99;  2;;
Parcelas;PFNUMDUP;N;999;  3;;
Interv;PFPERIODIC;N;999;  3;;
Ind Corr;PFINDICE;N;99;  2;;
Port;PFLOCAL;N;99;  2;;
Sit;PFSITUACAO;N;99;  2;;
Parc?;PFFGPARCEL;C;x;  1;;
Vista?;PFFGVISTA;C;x;  1;;
Cond;PFCONDICAO;N;999.99;  8;;
ValPri;PFVALPRI;N;9999999999.99; 15;;
ICM entrada;PFICMISENT;N;9;  1;;
Outras;PFICMOUTRO;N;9;  1;;
Isencao IPI;PFIPIISENT;N;9;  1;;
Outras IPI;PFIPIOUTRO;N;9;  1;;
Ativid;PFATIVIDAD;C;@s6;  6;S;
ISS;PFISS;N;9;  1;;
Client;PFCLIENTE;N;99999;  5;;
Fat?;FG_FAT;C;x;  1;;
