SNGPCXPR;Medicamentos sujeitos ao SNPGC;sys_tbbrow; 8; 0;18;79;psiprod;;
:SKEL
VARIAVEL w_colsep = chr(179)
VARIAVEL w_headsep = chr(196)
VARIAVEL z_BlkFab = {|x_for| sccpfab->(DbGoto(x_for)),sccpfab->Cp_Fantasi}
VARIAVEL #TEXTO_FONTE
   //ONINIT
      hwg_TbFi(@D_oB, 'Descricao;PDESC;C;@s20; 25;S;')
      hwg_TbFi(@D_oB, 'Sngpc?;pfgcontrol;C;X;6;S;')
      hwg_TbFi(@D_oB, 'Reg MS;pRegMs;C;9X9999X9999X999X9;17;S;')
      if fieldpos('pportaria')>0
      hwg_TbFi(@D_oB, 'Portaria;pPortaria;C;XXX;8;S;')
      hwg_TbFi(@D_oB, 'DCB;pDCB;C;XXXXXXXXXXX;11;S;')
      endif
      hwg_TbFi(@D_oB, 'Descricao DCB/Principio;Pprincipio;C;@s27; 25;;')
      hwg_TbFi(@D_oB, 'ClasseTer;pClasseTer;C;9;1;S;')
      hwg_TbFi(@D_oB, 'Cod Barras;pDic6;N;99999999999999;13;N;')
      hwg_TbFi(@D_oB, 'Und;pUnidade;C;XXX;3;S;')
      hwg_TbFi(@D_oB, 'Fabricante;eval(z_BlkFab,PPRINCFORN);C;@s15;9;N;')
      hwg_TbFi(@D_oB, 'PedeReceita?;preceita;C;X;12;S;')
      hwg_TbFi(@D_oB, 'Cod;PCOD;N;99999;  5;N;')
      hwg_TbFi(@D_oB, 'Frac;pItens;N;9999;4;S;')
   //ENDONINIT
   //ONDLGINIT
      oDlg:Maximize()
   //ENDDLGINIT
#FIM_TEXTO_FONTE
COMANDO ANTES Z_NIL = (Abra_Arq("sccpfab"), dbselectarea("se_prod"), dbSetFilter( {||pFgControl<>" "}, 'pFgControl<>" "' ), dbGOTOP() )
COMANDO SAIDA znil = if( select("sccpfab")>0, sccpfab->(DbCloseArea()), "")
:TBMT
 13;doget(D_ob);Enter-Edita ;
 -6;psiport(D_oB,"A");F7-Antibiotico ;
 -7;psiport(D_oB,"S");F8-Controlado ;
  7;psiport(D_oB," ");Del-Nao_SNGPC ;
 69;ext_screen(pcod,pdatabal);E-Extrato ;
 80;tb_pesq(D_OB);P-Pesquisa ;
 73;Lst_alias(D_OB);I-Imprime ;
 22;tb_insert(D_OB);Ins-Inclui ;
 65;tb_update(D_OB);A-Altera ;
 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 ;
