<?xml version="1.0" encoding="UTF-8"?>
<part class="form">
  <style>
    <property name="Geometry">{461,22,1033,554}</property>
    <property name="Name">[clitv.scr]</property>
    <property name="Caption">[Vendas TeleVendas]</property>
    <property name="AlwaysOnTop">.F.</property>
    <property name="AutoCenter">.T.</property>
    <property name="Font">
      <font name="Verdana" width="0" height="-13" weight="400"/>
    </property>
    <property name="FormType">[dlgModal]</property>
    <property name="Modal">.F.</property>
    <property name="ScopeVarObj">[Private]</property>
    <property name="lClipper">.T.</property>
    <property name="lExitOnEnter">.F.</property>
    <property name="lExitOnESC">.T.</property>
    <property name="FromStyle">[Center]</property>
    <property name="Clipsiblings">.F.</property>
    <property name="Clipchildren">.F.</property>
    <property name="TitleBar">.T.</property>
    <property name="StyleBorder">[3 - Sizable (Default)]</property>
    <property name="nBackColor">14215660</property>
    <property name="Icon">[]</property>
    <property name="Bitmap">[icon\tela.jpg]</property>
    <property name="NoIcon">.F.</property>
    <property name="SystemMenu">.T.</property>
    <property name="Minimizebox">.F.</property>
    <property name="Maximizebox">.T.</property>
    <property name="AbsAlignment">.T.</property>
    <property name="WindowState">[1 - Normal (Default)]</property>
    <property name="minHeight">-1</property>
    <property name="maxHeight">-1</property>
    <property name="minWidth">-1</property>
    <property name="maxWidth">-1</property>
    <property name="ScrollBars">[0 - None (Default)]</property>
    <property name="DSControl">.F.</property>
  </style>
  <method name="onDlgInit">
    <![CDATA[parameters oDlg
//skel VARIAVEL wbVendaNFC=#TEXTO_FONTE 
//skel    if xGetEnv("ESTACAO_SISTEMA_GERENCIAL")="S" 
//skel       vb_venda("S",,,Recno(),d_ob,"/PN/")
//skel    else
//skel       wFgVaiGerarNFC:=.t.
//skel       vb_venda("V",,,Recno(),d_ob,"/PN/")
//skel       wFgVaiGerarNFC:=.f.
//skel    endif
//skel #FIM_TEXTO_FONTE

//skel VARIAVEL w_colsep = " "+chr(179)
//skel VARIAVEL zRecnCli = 0
//skel VARIAVEL zSelCli = '0'
//skel VARIAVEL zbCloseAll  = {||zRecnCli:=SCCRCLI->(Recno()), zSelCli:=lTrim(Str(Select(),3)), DbCloseAll() }
//skel VARIAVEL zbReopenCli = {||Abra_Arq('SCCRCLI',,zSelCli,r_siga), DbGoto(zRecnCli), DobRefresh()}
//skel VARIAVEL zbCloseDup  = {||if(Select("SccrDup")>0,SccrDup->(DbCloseArea()),"")}
//skel VARIAVEL zbPrtOs     = {||Relat('lst_exec("OSOT")','nb','NaoFecheTabelasNaSaida')}
//skel 
//skel variavel ztEmi=0
//skel variavel ztVc=0
//skel variavel ztAv=0
//skel VARIAVEL ztAvHoje=0
//skel 
//skel VARIAVEL zbCor0 = ""
//skel VARIAVEL zbCor = ""
//skel VARIAVEL zbCor2 = ""
//skel VARIAVEL znAzul0:=16711680
//skel VARIAVEL znAzul1:=10027008
//skel VARIAVEL zAzul2:=16776960
//skel VARIAVEL zWhite:=16777215
//skel VARIAVEL zBlack:=0
//skel VARIAVEL zRed:=255
//skel VARIAVEL zGreen:=32768
//skel VARIAVEL znCinza:=8421504
//skel VARIAVEL zYellow:=65535
//skel 
//skel VARIAVEL zCorVc := {zRed,zWhite,zWhite,zRed}
//skel VARIAVEL zCorHoje:= {znAzul0,zWhite,zWhite,znAzul0}
//skel VARIAVEL zCorAv:= {8388736,zWhite,zWhite,8388736}
//skel VARIAVEL zCorQtOk:={zGreen,zWhite,zWhite,zGreen}
//skel 
//skel variavel zBlExecAny = #TEXTO_FONTE
//skel    Private zBlocoAexecutar, zSele:=Select(), zCodCli:=Recno()
//skel    zBlocoAexecutar:=hb_pValue(1)
//skel    DbCloseAll()
//skel    eVal(zBlocoAexecutar)
//skel    DbCloseAll()
//skel    DbSelectArea(zSele)
//skel    Abra_Arq('SCCRCLI')
//skel    DbGoto(zCodCli)
//skel #FIM_TEXTO_FONTE
//skel 
//skel variavel z_BlkF9 = #TEXTO_FONTE
//skel    Private zSele:=Select(), zCodTb:=cr_tabela, zTabFile:='VB_PR'+StrZero(zCodTb,2)+if(cr_TabGp='S','G','P'), zTbBrow:='SE_PROM'+if(cr_TabGp='S','G','P')
//skel    if xFile(R_siga+zTabFile-".dbf")
//skel       Abra("0",R_SIGA,zTabFile,"SE_PROM",zTabFile,if(cr_TabGp="S","GRUPO","PCOD"))
//skel       Brow_Db(zTbBrow,.t.)
//skel       Se_prom->(DbCloseArea())
//skel    else
//skel       Alert("Tabela Inexistente...Crie-a pela Opcao Precos Promocionais do Estoque...")
//skel    endif
//skel    DbSelectArea(zSele)
//skel #FIM_TEXTO_FONTE
//skel 
//skel variavel zBlkDelete = #TEXTO_FONTE
//skel    if Alert( "Confirma cancelar ficha do cliente ("+Str(SccrCli->Cr_Cod_Cli,6)+") "+AllTrim(SccrCli->Cr_Nome)+" ?",{"1.Sim","2.Nao"},"B/W")=1
//skel       DebCli(SccrCli->Cr_Cod_Cli,,,@ztEmi)
//skel       if ztEmi=0
//skel          SccrCli->(Tb_Del(W_dOb))
//skel       else
//skel          Alert("O Cliente "+AllTrim(SccrCli->Cr_Nome)+" NAO PODE SER CANCELADO pois possui Emissoes...")
//skel       endif
//skel    endif
//skel #FIM_TEXTO_FONTE
//skel 
//skel variavel zBlkCompras = #TEXTO_FONTE
//skel    Private m_fcli:=if(Cr_Cod_Cli=0.or.Cr_Cod_Cli<>Recno(),Recno(),Cr_Cod_Cli)
//skel    if Cr_Cod_Cli<>Recno()
//skel       alert('Cr_Cod_Cli<>Recno()')
//skel    endif
//skel    DebCli(m_fcli,.t.,,@ztEmi,@ztVc,@ztAv,,.t.)
//skel    if Select('_duplcli')=0.or._duplcli->(RecCount())=0
//skel       Alert("O Cliente ("+Str(SccrCli->Cr_Cod_Cli,6)+") "+AllTrim(SccrCli->Cr_Nome)+" nao possui Emissoes no Cadastro de Duplicatas...",,"R/W")
//skel    else
//skel       ABRA("0NOIDX", r_siga, "sf_vend", "sf_vend")
//skel       DbSelectArea("_duplcli")
//skel       dbCreateIndex( "_duplcli", 'if(day(cr_dt_lqd)=0,"0","1")+Str(99999999-Val(Dtos(Cr_Dt_Lqd)))', {||if(day(cr_dt_lqd)=0,"0","1")+Str(99999999-Val(Dtos(Cr_Dt_Lqd)))} )
//skel       __SetCentury("off")
//skel       DbSetFilter({||!(left(cr_num_ped,2)$'/CX/CZ/').or.day(Cr_Dt_Lqd)=0},"!cr_num_ped")
//skel       DbGoTop()
//skel       Brow_Db("SCCRDUP_CLI1",.t.)
//skel       SccrDup->( GatherDbChanges("_duplcli", "NRECNO") )
//skel       _duplcli->(DbCloseArea())
//skel       DbDrop("mem:_crdup")
//skel       sf_vend->(DbCloseArea())
//skel       DbSelectArea("SccrCli")
//skel    endif
//skel #FIM_TEXTO_FONTE
//skel 
//skel variavel zbGetTxBairro := {|| if( vb_bairr->(DbSeek(sccrcli->cr_bairro)), vb_bairr->cr_com, Val(xGetEnv("DELIVERY_TAXA_PADRAO_ENTREGA")) ) }
//skel variavel #TEXTO_FONTE
//skel    se xGetEnv("DELIVERY_COM_TAXA_ENTREGA")="S" entao ABRA("0NOIDX", r_siga, "VB_BAIRR", "VB_BAIRR", "VB_BAIRR", "CR_BAIRRO")
//skel    ABRA("0NOIDX", r_siga, "SCCRDUP", "SCCRDUP", "SCCRDUP", "STRZERO(CR_COD_CLI,6) + DTOS(CR_DT_EMIS)")
//skel    DbSelectArea("SCCRCLI")
//skel #FIM_TEXTO_FONTE
//skel 
//skel comando depois znil=x_operacao=1.and.m_cr_cod_cli<>sccrcli->(Recno()).and.sccrcli->(RegLock(),_FIELD->cr_cod_cli:=RecNo(),DbCommit(),DbUnlock()),.t.)
//skel comando saida if( Select("Sccrdup")>0, SccrDup->(DbCloseArea()), "")
//skel 

oContextMenu:=Hwg_ContextMenu()
hwg_Btn(oToolbar,11,50,64,64)

IF sys_segmento='locacao'
   hwg_TbMt(oToolbar,'13;(wFgControlaProducao:=sFgControlaProducao,sFgLocacao:=.f.,vb_venda("M",,,Recno(),d_ob,"/PN/"),wFgControlaProducao:=.f.);Enter-Venda;Enter-Efetua Pedido ou Orcamento de Venda;enter.ico;;;;;&Venda;;;')
   hwg_TbMt(oToolbar,'76;(wFgControlaProducao:=sFgControlaProducao,sFgLocacao:=.t.,vb_venda("SV",,,Recno(),d_ob,"/PN/"),wFgControlaProducao:=.f.,sFgLocacao:=.f.);L-Locacao;L-Efetua Pedido ou Orcamento de Locacao;enter.ico;;;;;&Locacao;;;')
   hwg_TbMt(oToolbar,'76;(wFgControlaProducao:=sFgControlaProducao,vb_venda("MEP",,,Recno(),d_ob,"/PN/"),wFgControlaProducao:=.f.,sFgLocacao:=.f.);O-Ordem de Producao;P-Gera ordem de Producao;enter.ico;;;;;&O.Producao;;;')
   hwg_TbMt(oToolbar,'13;(wFgControlaProducao:=sFgControlaProducao,sFgLocacao:=.f.,vb_venda("O",,,Recno(),d_ob,"/PN/"),wFgControlaProducao:=.f.);O-Orcamento;O-Orcamento de Venda;O.jpg;;;;;&Orcamento;;;')
   //hwg_TbMt(oToolbar,'76;(sFgEntFutura:=.t.,vb_venda("MU1",,,Recno(),d_ob,"/PN/"),sFgEntFutura:=.f.);F-Ent.Futura;L-Pedido com Recebimento de Adiantamento de Cliente, para Entrega Futura;enter.ico;;;;;&EntFutura;;;')
ELSE
   IF sFgNfc
      IF sys_segmento='valegas'.and.xGetEnv("FATURA_SERVICOS")="S"
         hwg_TbMt(oToolbar,'13;vb_venda("S","RESGATE",,Recno(),d_ob);Enter-Resgate;Enter-Resgate de Vale Gas;enter.ico;;;;;&Resgate;;;')
         hwg_TbMt(oToolbar,'32;vb_venda("S","VENDA",,Recno(),d_ob);Barra-Remessa;Barra-Remessa de Vale Gas;enter.ico;;;;;Re&messa;;;')
         hwg_TbMt(oToolbar,'83;eVal(wbVendaNFC);S-NFC;S-NFC para Venda de Produtos a Consumidor;enter.ico;;;;;&NFC;;;')
      ELSE
         hwg_TbMt(oToolbar,'13;eVal(wbVendaNFC);Enter-NFC;Enter-NFC para Venda de Produtos a Consumidor;enter.ico;;;;;&Venda;;;')
      endif
      // hwg_TbMt(oToolbar,'13;vb_venda("V",,,Recno(),d_ob,"/PN/");Enter-NFC;Enter-NFC para Venda de Produtos a Consumidor;enter.ico;;;;;&Venda;;;')
      se xGetEnv("FATURA_SERVICOS")="S" entao hwg_TbMt(oToolbar,'76;vb_venda("S",,,Recno(),d_ob,if(xGetEnv("ESTACAO_SISTEMA_GERENCIAL")="S","/PN/","") );S-Servico;L-Efetua lancamento de convenio;lcv.ico;;;;;&Servico;;;')
      se xGetEnv("ESTACAO_SISTEMA_GERENCIAL")<>"S" entao hwg_TbMt(oToolbar,'78;vb_venda("M",,,Recno(),d_ob,"/PN/");N-PN_NFE;N-Gera Prenota para Emissao de NFE;enter.ico;;;;;&PN_NFE;;;')
   else
      if xGetEnv("FATURA_SERVICOS")="S"
         hwg_TbMt(oToolbar,' 13;vb_venda("S","N",.F.,recno(),d_ob);Enter-VENDA SERVICOS;Enter - Venda Servicos;enter.ico;;;;;Vender;;;')
      ELSE
         hwg_TbMt(oToolbar,'13;vb_venda("V","N",.F.,recno(),d_ob,"/PREVENDA/");Enter-PREVENDA;Enter - Prevenda Delivery PAF;enter.ico;;;;;PreVendaTV;;;')
      ENDIF
//      hwg_TbMt(oToolbar,' 32;vb_venda("V","N",.F.,recno(),d_ob,"/DAV/");Barra-DAV PAF ;Barra - DAV PAF;barra.ico;;;;;DAV;;;')
   endif
ENDIF

hwg_TbMt(oToolbar,'0;;;espaco;espaco;')

IF xGetEnv("DELIVERY_COM_TAXA_ENTREGA")="S" 
   hwg_TbMt(oToolbar,' 22;tb_insert(D_OB,"sccrcli_delivery");Ins-Cadastra;Ins-Inclui;cadastrar.ico;;;;;Inclui;;;') 
   hwg_TbMt(oToolbar,' 65;tb_update(D_OB,"sccrcli_delivery");A-Altera;A-Alterar;alterar.ico;;;;;Altera;;;')
ELSE
   hwg_TbMt(oToolbar,' 22;tb_insert(D_OB);Ins-Cadastra;Ins-Inclui;cadastrar.ico;;;;;Inclui;;;') 
   hwg_TbMt(oToolbar,' 65;tb_update(D_OB);A-Altera;A-Alterar;alterar.ico;;;;;Altera;;;')
ENDIF

hwg_TbMt(oToolbar,' 80;tb_pesq(D_OB);P-Pesquisa;P-Pesquisa;pesquisa.ico;;;;;Pesquisa;;;')
hwg_TbMt(oToolbar,' 79;tb_index(D_oB);O-Ordena ;O-Ordena a coluna do cursor;ordenar.ico;;;;;&O-Ordena;;;')
hwg_TbMt(oToolbar,'0;;;espaco;espaco;')
hwg_TbMt(oToolbar,' 69;eVal(zBlkCompras);E-Extrato ;E-Extrato;;extrato.ico;;;;;&E-Extrato;;;')
hwg_TbMt(oToolbar,' -7;eVal(zbCloseAll),Relat( "vb_r5(.f.,"+str(zRecnCli,5)+")",,"SemDbCloseall" ),eVal(zbReopenCli);F8-Extrato de Produtos;extrato.ico;;;;;F8-ExtProds;;;')
SetDlgKey(oDlg,8,26,{|| (aBrowses[nBrwAtivo,2])->(moveRec(aBrowses[nBrwAtivo,1],"UP"))})
SetDlgKey(oDlg,8,28,{|| (aBrowses[nBrwAtivo,2])->(moveRec(aBrowses[nBrwAtivo,1],"DOWN"))})
Hwg_EndMenu() 
if type("oDlgStatusBar")="B"
   oDlgStatusBar:Anchor:=14
endif
olPsqFoneNome:Hide()
oPsqFoneNome:Hide()


//   oDlg:Maximize()]]>
  </method>
  <method name="onPaint">
    <![CDATA[Parameters oCtrl,hDC
oCtrl:bpaint:=NIL
D_oB:setFocus()]]>
  </method>
  <part class="status">
    <style>
      <property name="Geometry">{0,524,1033,30}</property>
      <property name="Name">[oDlgStatusBar]</property>
      <property name="aParts">{608,152,0}</property>
    </style>
  </part>
  <part class="container">
    <style>
      <property name="Geometry">{5,121,1027,158}</property>
      <property name="Name">[oContainer1]</property>
      <property name="Border">.F.</property>
      <property name="TabIndex">0</property>
    </style>
    <part class="label">
      <style>
        <property name="Geometry">{10,124,96,17}</property>
        <property name="Name">[oLabel1]</property>
        <property name="Caption">[Nome/Razao Social]</property>
        <property name="font">
          <font name="Arial" width="0" height="-11" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">5</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{11,201,81,17}</property>
        <property name="Name">[oLabel2]</property>
        <property name="Caption">[Contato]</property>
        <property name="font">
          <font name="Arial" width="0" height="-11" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">5</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{10,162,54,17}</property>
        <property name="Name">[oLabel3]</property>
        <property name="Caption">[Endereco]</property>
        <property name="font">
          <font name="Arial" width="0" height="-11" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">5</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{423,162,36,17}</property>
        <property name="Name">[oLabel4]</property>
        <property name="Caption">[Bairro:]</property>
        <property name="font">
          <font name="Arial" width="0" height="-11" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">5</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{350,201,81,17}</property>
        <property name="Name">[oLabel5]</property>
        <property name="Caption">[Fone:]</property>
        <property name="font">
          <font name="Arial" width="0" height="-11" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">5</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{10,238,101,17}</property>
        <property name="Name">[oLabel6]</property>
        <property name="Caption">[Ponto de Referencia]</property>
        <property name="font">
          <font name="Arial" width="0" height="-11" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">5</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{539,124,44,17}</property>
        <property name="Name">[oLabel9]</property>
        <property name="Caption">[Fantasia]</property>
        <property name="font">
          <font name="Arial" width="0" height="-11" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">5</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{744,162,36,17}</property>
        <property name="Name">[oLabel10]</property>
        <property name="Caption">[Cidade]</property>
        <property name="font">
          <font name="Arial" width="0" height="-11" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">5</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{661,162,36,17}</property>
        <property name="Name">[oLabel11]</property>
        <property name="Caption">[CEP]</property>
        <property name="font">
          <font name="Arial" width="0" height="-11" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">5</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{997,162,20,17}</property>
        <property name="Name">[oLabel12]</property>
        <property name="Caption">[UF]</property>
        <property name="font">
          <font name="Arial" width="0" height="-11" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">5</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{514,201,81,17}</property>
        <property name="Name">[oLabel13]</property>
        <property name="Caption">[e-mail]</property>
        <property name="font">
          <font name="Arial" width="0" height="-11" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">5</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{10,141,522,20}</property>
        <property name="Name">[oEdit2]</property>
        <property name="varName">[cr_nome]</property>
        <property name="font">
          <font name="Arial" width="0" height="-15" weight="700"/>
        </property>
        <property name="Border">.F.</property>
        <property name="TabIndex">7</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{10,180,410,20}</property>
        <property name="Name">[oEdit3]</property>
        <property name="varName">[cr_rua]</property>
        <property name="font">
          <font name="Arial" width="0" height="-15" weight="700"/>
        </property>
        <property name="Border">.F.</property>
        <property name="TabIndex">7</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{538,141,487,20}</property>
        <property name="Name">[oEdit10]</property>
        <property name="varName">[cr_pontore]</property>
        <property name="font">
          <font name="Arial" width="0" height="-15" weight="700"/>
        </property>
        <property name="Border">.F.</property>
        <property name="TabIndex">7</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{423,180,235,20}</property>
        <property name="Name">[oEdit1]</property>
        <property name="varName">[Cr_bairro]</property>
        <property name="font">
          <font name="Arial" width="0" height="-15" weight="700"/>
        </property>
        <property name="Border">.F.</property>
        <property name="TabIndex">8</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{742,180,253,20}</property>
        <property name="Name">[oEdit4]</property>
        <property name="varName">[Cr_Cidade]</property>
        <property name="font">
          <font name="Arial" width="0" height="-15" weight="700"/>
        </property>
        <property name="Border">.F.</property>
        <property name="TabIndex">8</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{660,180,80,20}</property>
        <property name="Name">[oEdit5]</property>
        <property name="varName">[Cr_Cep]</property>
        <property name="font">
          <font name="Arial" width="0" height="-15" weight="700"/>
        </property>
        <property name="Border">.F.</property>
        <property name="TabIndex">9</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{997,180,28,20}</property>
        <property name="Name">[oEdit11]</property>
        <property name="varName">[CR_UF]</property>
        <property name="font">
          <font name="Arial" width="0" height="-15" weight="700"/>
        </property>
        <property name="Border">.F.</property>
        <property name="TabIndex">9</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{10,218,337,20}</property>
        <property name="Name">[oEdit6]</property>
        <property name="varName">[cr_contato]</property>
        <property name="font">
          <font name="Arial" width="0" height="-15" weight="700"/>
        </property>
        <property name="Border">.F.</property>
        <property name="TabIndex">10</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{350,218,159,20}</property>
        <property name="Name">[oEdit7]</property>
        <property name="varName">[cr_fone]</property>
        <property name="font">
          <font name="Arial" width="0" height="-15" weight="700"/>
        </property>
        <property name="Border">.F.</property>
        <property name="TabIndex">10</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{616,254,140,20}</property>
        <property name="Name">[oEdit9]</property>
        <property name="varName">[cr_cgc]</property>
        <property name="font">
          <font name="Arial" width="0" height="-15" weight="700"/>
        </property>
        <property name="Border">.F.</property>
        <property name="TabIndex">10</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{513,218,502,20}</property>
        <property name="Name">[oEdit12]</property>
        <property name="varName">[cr_email]</property>
        <property name="font">
          <font name="Arial" width="0" height="-15" weight="700"/>
        </property>
        <property name="Border">.F.</property>
        <property name="TabIndex">10</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{773,254,240,20}</property>
        <property name="Name">[oEdit14]</property>
        <property name="varName">[cr_insc_es]</property>
        <property name="font">
          <font name="Arial" width="0" height="-15" weight="700"/>
        </property>
        <property name="Border">.F.</property>
        <property name="TabIndex">10</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{10,254,599,20}</property>
        <property name="Name">[oEdit8]</property>
        <property name="varName">[cr_pontore]</property>
        <property name="font">
          <font name="Arial" width="0" height="-15" weight="700"/>
        </property>
        <property name="Border">.F.</property>
        <property name="TabIndex">11</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{616,238,86,17}</property>
        <property name="Name">[oLabel7]</property>
        <property name="Caption">[CNPJ/CPF]</property>
        <property name="font">
          <font name="Arial" width="0" height="-11" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">12</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{773,238,86,17}</property>
        <property name="Name">[oLabel15]</property>
        <property name="Caption">[Insc. Estadual]</property>
        <property name="font">
          <font name="Arial" width="0" height="-11" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">12</property>
      </style>
    </part>
  </part>
  <part class="browse">
    <style>
      <property name="Geometry">{8,278,1020,204}</property>
      <property name="Name">[D_oB]</property>
      <property name="Anchor">15</property>
      <property name="font">
        <font name="Arial Narrow" width="0" height="-16" weight="700"/>
      </property>
      <property name="GridLinesSepColor">0</property>
      <property name="TabIndex">4</property>
    </style>
    <method name="onGetFocus">
      <![CDATA[nBrwAtivo:=1]]>
    </method>
    <method name="onPosChange">
      <![CDATA[refreshgetlist()]]>
    </method>
    <method name="onInit">
      <![CDATA[IF sys_segmento='bares'
   hwg_TbFi(D_oB, 'Fone;Cr_fone;C;@s10;10;;')
   hwg_TbFi(D_oB, 'Nome;Cr_nome;C;@s40;40;N;')
   hwg_TbFi(D_oB, 'Bairro;Cr_bairro;C;@s14;14;;')
   se xGetEnv("DELIVERY_COM_TAXA_ENTREGA")="S" entao hwg_TbFi(D_oB, 'Tx.Ent;eVal(zbGetTxBairro);P;999.99;6;;')
   hwg_TbFi(D_oB,'CodCli;if(Cr_Cod_Cli=0,Recno(),Cr_Cod_Cli);P;999999;6;N;')
   hwg_TbFi(D_oB, 'Ult Compra;tv_desd(recno());C;@s9;9;;')
   hwg_TbFi(D_oB, 'Rua;Cr_rua;C;@s35;35;;')
else
   IF xGetEnv("USA_CORES_NO_BROWSE")<>"N"
      zbCor0:= {||IF(ztVc>0,zCorVc,IF(ztAvHoje>0, zCorHoje, If(ztAv>0,zCorAv,If(ztEmi-ztVc-ztAv>0,zCorQtOk,{d_ob:tcolor,d_ob:bcolor,D_oB:tColorSel,D_oB:bColorSel})) ))}
      zbCor := {||DebCli(sccrcli->(if(cr_cod_cli=0,RECNO(),cr_cod_cli)),.f.,.f.,@ztEmi,@ztVc,@ztAv,@ztAvHoje), EVAL(zbCor0) }
      hwg_TbFi(D_oB, 'Fone;Cr_fone;C;@s10;10;;')
      hwg_TbFi(D_oB, 'Nome;Cr_nome;C;@s40;40;N;zbCor;')
      hwg_TbFi(D_oB, 'Fantasia;Cr_fantasi;C;@s30;30;N;')
      hwg_TbFi(D_oB, 'Ult Compra;tv_desd(recno());C;@s9;9;;')
      hwg_TbFi(D_oB, 'Quitacoes;if(ztEmi-ztVc-ztAv>0,ztEmi-ztVc-ztAv,0);P;999999.99;9;N;zbCor0;')
      hwg_TbFi(D_oB, 'Vencidas;ztVc;P;999999.99;9;N;zbCor0;')
      hwg_TbFi(D_oB, 'A_Vencer;ztAv;P;999999.99;9;N;zbCor0;')
      hwg_TbFi(D_oB,'CodCli;if(Cr_Cod_Cli=0,Recno(),Cr_Cod_Cli);P;999999;6;N;')
   ELSE
      hwg_TbFi(D_oB, 'Fone;Cr_fone;C;@s10;10;;')
      hwg_TbFi(D_oB, 'Nome;Cr_nome;C;@s40;40;N;')
      hwg_TbFi(D_oB, 'Fantasia;Cr_fantasi;C;@s30;30;N;')
      hwg_TbFi(D_oB,'CodCli;if(Cr_Cod_Cli=0,Recno(),Cr_Cod_Cli);P;999999;6;N;')
      hwg_TbFi(D_oB, 'Ult Compra;tv_desd(recno());C;@s9;9;;')
   ENDIF
ENDIF

hwg_TbFi(D_oB, 'Bairro;Cr_bairro;C;@s14;14;;')
hwg_TbFi(D_oB, 'T;cr_tip_cli;C;9;1;;')
hwg_TbFi(D_oB, '*;cr_situaca;C;!;1;S;')
hwg_TbFi(D_oB, 'O;cr_tip_DES;N;9;1;;')
hwg_TbFi(D_oB, 'Tb;cr_tabela;N;99;2;;')
hwg_TbFi(D_oB, 'Cod;rec_del();C;X99999;6;;')
hwg_TbFi(D_oB, 'Rua;Cr_rua;C;@s35;35;;')
hwg_TbFi(D_oB, 'Ponto Ref;Cr_PONTORE;C;@s30;30;;')
hwg_TbFi(D_oB, 'Contato;Cr_contato;C;@s15;15;;')
hwg_TbFi(D_oB, 'CGC/CPF;Cr_cgc;C;@s18;18;;')
hwg_TbFi(D_oB, 'Cidade;Cr_cidade;C;@s20;25;;')
hwg_TbFi(D_oB, 'CEP;Cr_CEP;C;@s9;9;;')
hwg_TbFi(D_oB, 'UF;Cr_UF;C;xx;2;;')
D_oB:bColorSel:= RGB(3,23,133)
D_oB:tColorSel:= RGB(255,255,255)
D_oB:Alias := alias()
D_oB:lDisableVScrollPos := .t.
D_oB:bKeyDown := {|self, wParam| (aBrowses[nBrwAtivo,2])->(hwg_oDlgKey(self, wparam,1)) , .T. }
D_oB:bOther:={|o,m,wp,lp| MessagesBrowse(o,m,wp,lp)}
D_oB:cargo:={.T.,.T.,"SCCRCLI",.F.,.T.,{||.T.} }
d_ob:bEdit := {|D_oB| .t.}
AADD(aBrowses,{D_oB,D_oB:Alias,{||.f.},{|| .T.},})
]]>
    </method>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{9,3,407,40}</property>
      <property name="Name">[oLabel8]</property>
      <property name="Caption">[Relação Geral de Clientes]</property>
      <property name="font">
        <font name="Arial" width="0" height="-32" weight="700"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">13</property>
    </style>
  </part>
  <part class="button">
    <style>
      <property name="Geometry">{937,486,90,26}</property>
      <property name="Name">[oButton1]</property>
      <property name="Id">[IDCANCEL]</property>
      <property name="Caption">[Esc - Sair]</property>
      <property name="TabIndex">14</property>
    </style>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{673,86,290,35}</property>
      <property name="Name">[oPsqFoneNome]</property>
      <property name="varName">[m_FoneNome]</property>
      <property name="font">
        <font name="" width="0" height="-19" weight="400"/>
      </property>
      <property name="TabIndex">15</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{673,65,213,19}</property>
      <property name="Name">[olPsqFoneNome]</property>
      <property name="Caption">[Pesquisa Rapida: Fone ou Nome]</property>
      <property name="TabIndex">16</property>
    </style>
  </part>
</part>
