//pag;l1;c1;l2;c2;desc;borda;preget;posget;preinc;posinc
 1; 4; 0;22;79;Ficha de Nota de Entrada;;;;;
:SKEL
VARIAVEL z_blktx=_CreateBlock("m_PFTAXAICMS:=if(m_PFTAXAICMS=0,sccpfor->cp_Taxaicms,m_PFTAXAICMS),.t.")
VARIAVEL z_blknorm=_CreateBlock("m_PFICMNorma:=m_PFICMBNorm*m_pftaxaicms/100,.t.")
VARIAVEL z_blkfont=_CreateBlock("m_PFICMFONT:=m_PFICMbfont*m_pftaxaicms/100,.t.")
VARIAVEL z_blkbfont=_CreateBlock("m_PFICMBfont:=m_PFBASEICMS-m_PFICMBNorm,.t.")

COMANDO ANTES z_seleorig = Select()
COMANDO ANTES z_nil=if(sele("SCCPFOR")=0,ABRA_arq("SCCPFOR"),"")
COMANDO ANTES DBSELECTAREA(z_seleorig)
COMANDO SAIDA SCCPFOR->(DBCLOSEAREA())

  1;17; 2;Repasse de ICMS.......:;S;11;PFVALREP;99999999.99;
//1; 2; 2;Fornecedor...........:;N; 5;PFFOR;99999;;PSQ_BROW;SCCPFOR;PSCCPFOR;N;N; 2;37;CP_NOME;@S30;
:TFIE
//pag;l;c;desc;tipo;tam;campo;pict;when;valid;dbname;objcons;chave?;seek?;le;ce;cexib;pictexib

 1; 2; 2;Fornecedor............:;N; 5;PFFOR;99999;;PSQ_BROW;SCCPFOR;PSCCPFOR;N;N; 2;37;CP_NOME;@S30;
 1; 3; 2;Cliente (Se Devolucao):;N; 5;PFCLIENTE;99999;;m_pfcliente=0.or.PSQ_BROW;SCCRCLI;PSCCRCLI;N;N;3;37;CR_NOME;@S30;
 1; 4; 2;Numero da N.F.........:;N; 6;PFNUM;999999;;m_pfnum>0;
 1; 5; 2;Serie e Subserie......:;C; 3;PFSERIESUB;!!!;
 1; 6; 2;Cod Operacao Fiscal...:;C; 5;PFCODOP;9.999;;PSQ_BROW;SF_CODOP;PSFCODOP;N;S;6;40;DESCOP;@S30;
 1; 7; 2;Data da Emissao.......:;D; 8;PFDATAEMI;
 1; 8; 2;Data da Chegada.......:;D; 8;PFDATACHE;

 1;10; 2;Valor Contabil...:;N;11;PFVAL;99999999.99;
 1;11; 2;Base do ICMS ....:;N;11;PFBASEICMS;99999999.99;
 1;12; 2;Aliquota de ICMS.:;N; 5;PFTAXAICMS;99.99;eval(z_blktx);
 1;13; 2;Total do ICMS....:;N;11;PFTOTICMS;99999999.99;(m_pftoticms:=m_pfbaseicms*m_pftaxaicms/100)==0;
 1;14; 2;ICMs Subst.Tribut:;N;11;PFVALRET;99999999.99;
 1;15; 2;Valor do IPI.....:;N;11;PFTOTIPI;99999999.99;
 1;16; 2;Outros Encargos..:;N;11;PFOUTROS;99999999.99;
 1;17; 2;Repasse de ICMS..:;N;11;PFVALREP;99999999.99;

 1;10;40;Base ICMS Tribut. Normal:;N;11;PFICMBNorm;99999999.99;
 1;11;40;Credito ICMS Trib.Normal:;N;11;PFICMNorma;99999999.99;eval(z_blknorm);;
 1;12;40;Base ICMS Regime Fonte..:;N;11;PFICMBfont;99999999.99;eval(z_blkbfont);;
 1;13;40;Valor do ICMS Reg.Fonte.:;N;11;PFICMFONT;99999999.99;eval(z_blkfont);;
 1;14;40;Valor das Isentas ICMs..:;N;11;PFICMIsent;99999999.99;
 1;15;40;Total Lista Positiva....:;N;11;PFLPOS;99999999.99;
 1;16;40;Total Lista Negativa....:;N;11;PFLNEG;99999999.99;
 1;17;40;Total Lista Neutra......:;N;11;PFLNEU;99999999.99;
