PF_PED;Produtos Disponiveis;sys_tbbrow; 5; 0;23;79;pf_ped;;
:SKEL
// Variavel zbEditQuant:={|xConteudo,d_oB,nCol| debugalert('xConteudo='+hb_valtoexp(xConteudo)+' d_oB='+hb_valtoexp(d_oB)+' nCol='+hb_valtoexp(nCol) ), Sp_Movf->(RegLock(), _FIELD->Unid_Fech:=xConteudo, DbCommit(), DbUnlock()) }
// 13;PF_PEDQ(D_OB);Enter-Quantidade ;
Variavel zbEditQuant:={|xQtd,d_oB,nCol| debugalert('xConteudo= ' + hb_valtoexp(xQtd) ), Sp_Movf->(AppendMovf(xQtd)) }
variavel #TEXTO_FONTE
   //ONINIT
      hwg_TbFi(@D_oB, 'Quant;quant_ped(pcod,1);P;999999.999;10;S;;;zbEditQuant;')
      hwg_TbFi(@D_oB, 'Descricao;PDESC;C;@s30; 30;N;')                     
      hwg_TbFi(@D_oB, 'Frc;pitens;N;9999;4;S;')
      hwg_TbFi(@D_oB, 'Codigo;pcod;N;999999;  6;N;')

      se s_vb_numde>0 entao hwg_TbFi(@D_oB, 'Sld_Global;PEATUAL;N;999999.999;10;S;') senao hwg_TbFi(@D_oB, 'Sld_Global;PEATUAL;N;99999;5;S;')
      // se s_vb_numde>0 entao hwg_TbFi(@D_oB, 'Ilha_'+lTrim(Str(sNumeroDaIlha,4))+';SaldoDisponivel(pCod,.t.);P;999999.999;10;S;') senao hwg_TbFi(@D_oB, 'Na_Ilha;SaldoDisponivel(pCod,.t.);P;99999;5;S;')

      hwg_TbFi(@D_oB, 'Un;PUNIDADE;C;xxxxx;  3;;')

      se fieldpos('pobs')>0 entao hwg_TbFi(@D_oB, 'Obs;Left(pObs,20);P;@S20;20;;')
      se .not. sys_segmento='mercados' entao hwg_TbFi(@D_oB, 'Cod Barras;Pdic6;N;99999999999999;14;N;')
      hwg_TbFi(@D_oB, 's;pServico;C;X;  1;;')
      hwg_TbFi(@D_oB, 'o;pPedeObs;C;X;  1;;')
      hwg_TbFi(@D_oB, 'G;Pgpreco;C;X;  1;;')
      hwg_TbFi(@D_oB, 'Fracao;PITENS;N;9999;  4;;')
      hwg_TbFi(@D_oB, 'Tp;Ptipoitem;C;99;2;S;')
      hwg_TbFi(@D_oB, 'Finalidade;Efd_TipoItem();P;@S13;13;N;')
   //ENDONINIT
   ////ONDLGINIT
   //      oDlg:Maximize()
   ////ENDDLGINIT
#FIM_TEXTO_FONTE
:TBMT
 13;DOGET(D_OB);Enter-Quantidade ;
 80;tb_pesq(D_OB);P-Pesquisa ;
 84;tb_locate(D_oB);T-Busca_Trecho ;
 67;tb_locate(D_oB);C-Repete_Busca ;
 79;tb_index(D_OB);O-Ordena ;
 70;tb_filter(d_ob);F-Filtra ;
