SF_FATF;Notas de Entrada;sys_tbbrow; 3; 0;11;79;padrao;;eval(z_blkPpo);
:SKEL
VARIAVEL w_colsep = " "+chr(176)
VARIAVEL Z_XTELA = SAVESCREEN(12,0,23,79)
VARIAVEL z_blkPpo =            "Z_COR := SetColor('W/B'),"
VARIAVEL z_blkPpo = z_blkPpo + 'Scroll(12,0,23,79,0),DispBox(12,0,23,79),'

VARIAVEL z_blkPpo = z_blkPpo + 'DevPos(13, 1),DevOut("Forn.: "),'
VARIAVEL z_blkPpo = z_blkPpo + 'DevPos(13,8),DevOut(Eval(z_blkfor,PFFOR)),'

//Forn;Eval(z_blkfor,PFFOR)
VARIAVEL z_blkPpo = z_blkPpo + 'DevPos(13,18),DevOut(", NFisc: "),'
VARIAVEL z_blkPpo = z_blkPpo + 'DevPos(13,25),DevOut(str(PFNUM)),'
VARIAVEL z_blkPpo = z_blkPpo + 'DevPos(13,36),DevOut(" Dt Cheg: "),'
VARIAVEL z_blkPpo = z_blkPpo + 'DevPos(13,45),DevOut(PFDATACHE),'
VARIAVEL z_blkPpo = z_blkPpo + 'DevPos(13,55),DevOut(" Vl.Compra: "+str(PFVAL,9,2)),'
VARIAVEL z_blkPpo = z_blkPpo + 'DevPos(14,1), DevOut("------------------------------------------------------------------------------"),'
VARIAVEL z_blkPpo = z_blkPpo + "memoedit(PFOBS,15,1,22,78,.f.,.f.,70),"
VARIAVEL z_blkPpo = z_blkPpo + 'SetColor(Z_COR)'
VARIAVEL z_blkPpo = _CreateBlock( z_blkPpo )
COMANDO DEPOIS Z_NIL = RESTSCREEN(12,0,23,79,Z_XTELA)

COMANDO ANTES Z_NIL = ABRA("0RO",r_siga,"sccpfor","sccpfor")
VARIAVEL Z_blkfor = { |x_forn| Sccpfor->( DbGoto(x_forn) ), sccpfor->cp_nome}
COMANDO DEPOIS Z_NIL = sccpfor->(DbCloseArea())

VARIAVEL z0BlkFilterTodos = {|| DbClearFilter(), d_ob:RefreshAll() }
VARIAVEL z1BlkFilter = {|| DbSetFilter({||!empty(pfobs)},"!empty(pfobs)"), DbGoBottom(), DbSkip(-8), d_ob:RefreshAll() }
COMANDO ANTES zNil = sf_fatf->(eval(z1BlkFilter))
:TBMT
 65;tb_update(D_OB);A-Altera_Observacao ;
 62;eVal(z0BlkFilterTodos);>-Todas_as_NFs ;
 60;eVal(z1BlkFilter);<-So_Com_Obs ;
 32;doget(d_ob);Barra-Edita ;
 79;tb_index(D_OB);O-Ordena ;
 80;tb_pesq(D_OB);p-pesquisa ;
:TBFI
Fornecedor;Eval(z_blkfor,PFFOR);C;@s33;33;N;
Pedido;PFNUMPED;N;999999;  6;;
Cod.F;PFFOR;N;99999;5;;
N.F.;PFNUM;N;999999;6;S;
ValCompra;PFVAL;N;999999.99; 9;;
DataCheg;PFDATACHE;D;;  8;;
ValVenda;PFVALDIA;N;999999.99; 9;;
%Desc;if(pfvaldia>0,(PFVALDIA-pfval)/pfvaldia*100,0);N;999.9;5;;
Base ICMS;PFBASEICMS;N;999999.99; 9;;
%ICMs;PFTAXAICMS;N;999.99;  8;;
Tot ICMS;PFTOTICMS;N;999999.99; 9;;
OpFisc;PFCODOP;C;xxxx;  4;;
Serie e Sub;PFSERIESUB;C;xxx;  3;;
ICM Ret;PFVALRET;N;999999.99; 9;;
DataEmis;PFDATAEMI;D;;  8;;
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;;
Data Ped;PFDATAPED;D;;  8;;
TEnc;PFTIPOENC;N;99;  2;;
Parcelas;PFNUMDUP;N;999;  3;;
Venc 1a;PFDATVENC;D;;  8;;
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;;
ISS;PFISS;N;9;  1;;
Client;PFCLIENTE;N;99999;  5;;
Fat?;FG_FAT;C;x;  1;;