TABELA;Lista de Precos ABCFARMA;sys_tbbrow; 6; 0;20;79;padrao;;eval(z_blockPpo);;
:SKEL
VARIAVEL w_colsep=" "+chr(179)
VARIAVEL Z_blkprd = { |x_pdic| SE_PROD->(DbSeek(val(x_pdic))),Se_Prod->Pdesc}
VARIAVEL Z_Xtela = SaveScreen(0,0,4,79)
VARIAVEL zFgProdOpen = (Select("se_prod")>0)
VARIAVEL zNil = if(zFgProdOpen, se_prod->(DbCloseArea()), "")
VARIAVEL zNil = ABRA("0NOIDX",R_SIGA,"SE_PROD","SE_PROD","Se_Dic5P","Pdic5")
VARIAVEL zNil = DbSelectArea("TABELA")
VARIAVEL z_blockPpo = "Z_COR:=SetColor('B/W'),z_pdesc:=eval(Z_blkprd,med_abc),"
VARIAVEL z_blockPpo = z_blockPpo + "Scroll(0,0,4,79,0),DispBox(0,0,4,79),"
VARIAVEL z_blockPpo = z_blockPpo + 'DevPos(0,1),DevOut(Padc("(Cod:"+Str(se_prod->pcod,5)+") "+alltrim(Z_Pdesc)+" (Saldo: "+ltrim(Str(se_prod->peatual,4))+")",78)),'
VARIAVEL z_blockPpo = z_blockPpo + 'DevPos(1,1),DevOut(Padc(Alltrim(MED_DES)+" "+Alltrim(MED_apr),78)),'
VARIAVEL z_blockPpo = z_blockPpo + 'DevPos(2,1),DevOut(Padc("Fabricante: "+Alltrim(lab_nom),78)),'
VARIAVEL z_blockPpo = z_blockPpo + 'DevPos(3,1),DevOut(Padc("Gen:"+med_gene+"  Principio: "+Alltrim(med_princi),78)),'
VARIAVEL z_blockPpo = z_blockPpo + "SetColor(Z_COR)"
VARIAVEL z_blockPpo = _CreateBlock( z_blockPpo )
VARIAVEL zFgRegiMs = (FieldPos("MED_REGIMS")>0)
COMANDO DEPOIS RestScreen(0,0,4,79,Z_Xtela)
COMANDO DEPOIS zNil = se_prod->(DbCloseArea())
COMANDO DEPOIS zNil = if(zFgProdOpen, Abra_Arq("SE_PROD"), "")
VARIAVEL zNil = if( select("tabela")>0, DbSelectArea("TABELA"), "")
:TBMT
 13;doget(D_ob);Enter-Edita ;
 80;tb_pesq(D_OB);P-Pesquisa ;
 79;tb_index(D_OB);O-Ordena ;
 73;lst_alias(D_OB);I-Imprime ;
:TBFI
Descricao;MED_DES;C;@S45; 18;;
Apresentacao;MED_APR;C;@S45; 20;;
Principio;MED_Princi;C;@S25; 20;;
Laboratorio;LAB_NOM;C;@S30; 5;;
Pr Cons;MED_PCO1;N;9999.99;7;;
Pr Frac;MED_fra1;N;9999.99;7;;
Gen;MED_GENE;C;xxx;  3;;
Laboratorio;LAB_NOM;C;@S30; 30;;
Pr Fabr;MED_PLA1;N;9999.99;  7;;
Margem;if(MED_PCO1>0,(MED_PCO1-MED_PLA1)/MED_PCO1*100,"");P;999.99%;7;N;
+-N;if(MED_NEGPOS="SIM","+",if(MED_NEGPOS="NAO".and.MED_NEUTRO<>"SIM","-","N") );C;xxx;  3;;
Cod ABCF;MED_ABC;C;@S9;  9;;
RegMS;if(zFgRegiMs,MED_REGIMS,"*CapteNovaTabela*");C;@S13;13;;
*;MED_CTR;C;x;1;;
Cod Lab;MED_LAB;C;@S6;6;;
Pr Frac;MED_FRA1;N;9999.99;7;;
Und;MED_UNI;N;999;3;;
IPI Comp;MED_IPI;N;999.99;7;;
DtVigenc;MED_DTVIG;D;;8;;
Cod Barra;MED_BARRA;N;9999999999999; 13;;
