<?xml version="1.0" encoding="UTF-8"?>
<part class="form">
  <style>
    <property name="Geometry">{427,50,1030,657}</property>
    <property name="Name">[sccrcli.tel]</property>
    <property name="Caption">[Cadastro de Clientes]</property>
    <property name="AlwaysOnTop">.F.</property>
    <property name="AutoCenter">.T.</property>
    <property name="Font">
      <font name="Lucida Sans" width="0" height="-16" weight="400"/>
    </property>
    <property name="FormType">[dlgModal]</property>
    <property name="Modal">.F.</property>
    <property name="ScopeVarObj">[Local]</property>
    <property name="lClipper">.T.</property>
    <property name="lExitOnEnter">.T.</property>
    <property name="lExitOnESC">.T.</property>
    <property name="Variables">
{modus,aCbm_Cr_UF,osoSaym_cr_cobrador,vRadioPF,oDadosCNPJ,wCaptaCnpjPelaWeb,,}    </property>
    <property name="FromStyle">[Popup]</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">16777215</property>
    <property name="Icon">[]</property>
    <property name="Bitmap">[icon\tela.jpg]</property>
    <property name="NoIcon">.F.</property>
    <property name="SystemMenu">.F.</property>
    <property name="Minimizebox">.F.</property>
    <property name="Maximizebox">.F.</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="onFormInit">
    <![CDATA[parameters o, p1
modus:=p1]]>
  </method>
  <method name="onDlgInit">
    <![CDATA[IF(modus<>NIL,SetWindowText( oDlg:handle, modus ),)
//skel variavel oDadosCNPJ := hWebCnpj():new()
//skel variavel m_cr_cep = if(!"-"$m_cr_cep, left(m_cr_cep,5)+"-"+SubStr(m_cr_cep,6,3), m_cr_cep)
//skel comando antes wlCommitByStruct = .t.
//--skel comando antes zNil=CiSetKey("K_F2", {|| executaxml("sccrcli_dados1.tel")} )
//--skel comando antes zNil=CiSetKey("K_F3, {|| CiBrow("VB_SOCIO")} )
//--skel variavel zbCnpjCpf := {||}

//skel COMANDO ANTES M_cr_cod_cli = if(x_operacao=1, reccount()+1, M_cr_cod_cli)
//skel COMANDO ANTES m_cr_cobrador = val(cr_zona)
//skel COMANDO DEPOIS m_cr_zona = strzero(m_cr_cobrador,2)
//skel COMANDO DEPOIS zNil= RegLock()
//skel COMANDO DEPOIS zNil= PUT_VAR("cr_zona",m_cr_zona)
//skel COMANDO ANTES zfglimite = .F.
//skel COMANDO ANTES m_cr_tip_cli = if(m_cr_tip_cli=" ","1",m_cr_tip_cli)
//skel COMANDO ANTES m_cr_tip_des = if(m_cr_tip_des=0,2,m_cr_tip_des)

//skel variavel zbCEP=#TEXTO_FONTE
//skel    if( empty(m_cr_rua), M_CR_RUA:=logra->LOGRADOURO, )
//skel    if( empty(M_CR_BAIRRO), M_CR_BAIRRO:=logra->BAIRRO, )
//skel    if( empty(M_CR_CIDADE), M_CR_CIDADE:=logra->LOCALIDADE, )
//skel    if( empty(M_CR_UF), M_CR_UF:=logra->UF, )
//skel    if( .not. empty(m_cr_cidade), ChecaCidadeIbge(m_cr_Uf,m_Cr_cidade), )
//skel #FIM_TEXTO_FONTE

//skel comando antes znil := select("logra")=0.and.sccrcli->(ABRA("0NOIDX",R_SIGA,"LOGRA","LOGRA","LOGCEP","CEP","LOGNOM","LOGRADOURO"),.t.)
//skel comando depois znil := if(x_operacao=1.and.sys_segmento="oticas", DbGet("OSOT",1,,,"OSOT"), )

////skel comando depois znil := debugalert( "x_operacao="+hb_valtoexp(x_operacao)+" wCaptaCnpjPelaWeb="+hb_valtoexp(x_operacao)+" oDadosCNPJ:ConseguiuLerDaWeb "+hb_valtoexp(oDadosCNPJ:ConseguiuLerDaWeb) )

//skel comando depois znil := if(x_operacao=1.and.wCaptaCnpjPelaWeb.and.oDadosCNPJ:ConseguiuLerDaWeb, (oDadosCNPJ:GraveSocios(),Alert("Cliente gravado com sucesso!")), )
//skel comando saida znil := select("logra")>0.and.logra->(dbclosearea(),.t.)

aCbm_Cr_UF := wUfs
oCr_UF:aitems := aCbm_Cr_UF
oCr_UF:Requery()  
oCr_UF:SetValue( m_cr_uf )
oCr_UF:Refresh()
SET(5,1960)  

// MoveWindow(oDlg:Handle, 0,0,1024,662)
MoveWindow(oContainerPF:Handle, oContainerPJ:nLeft,oContainerPJ:nTop)

//Para alterar o tamanho ou posicao de apenas um objeto, um EDITBOX (GET) por exemplo, use oGet:Move( nleft, ntop, nwidth, nheight )
//se quer somente aumentar passe apenas o tamanho:  oGet:Move( ,, nwidth, ) 

IF xGetEnv("TELACLI_DTANIV_DDMM")="S"
   oCr_Dt_Ani:ParsePict( '99/99', m_cr_dt_ani)
ELSE
   oCr_Dt_Ani:ParsePict( '99/99/9999', m_cr_dt_ani)
ENDIF

IF x_operacao=1
   oBtnSocios:DISABLE()
   oBtnObras:DISABLE()
   oBtnContatos:DISABLE()
ENDIF
IF sys_segmento<>'locacao'
   oBtnObras:Hide()
ENDIF

IF VAL(SoNumeros(m_cr_cgc))>0
   IF cgc_ok(m_cr_cgc)
      m_cr_cgc := FormataCnpjCpf(m_cr_cgc, ,, .t.) 
      oCr_Cgc:ParsePict( '99.999.999/9999-99', m_cr_cgc)
      oContainerPF:hide()
      oContainerPJ:show()
      // oRadioCNPJ:oGroup:nValue := 1
      oRadioCNPJ:oGroup:SetValue(1)
   ELSE
      m_cr_cgc := FormataCnpjCpf(m_cr_cgc, ,,, .t.)
      ocr_cgc:ParsePict( '999.999.999-99', m_cr_cgc)
      oContainerPF:show()
      oContainerPJ:Hide()
      oRadioCNPJ:oGroup:SetValue(2)
   ENDIF
ELSE
   IF xGetEnv("TELACLI_DEFAULT_PF")="S"
      oContainerPF:show()
      oContainerPJ:Hide()
      oRadioCNPJ:oGroup:SetValue(2)
   ELSE
      oContainerPF:hide()
      oContainerPJ:show()
      oRadioCNPJ:oGroup:SetValue(1)
   ENDIF
ENDIF

wCaptaCnpjPelaWeb := (x_operacao=1.and.(xGetEnv("PESQUISA_DADOS_CNPJ_NA_WEB")<>"N"))
oCaptaCnpjPelaWeb:Refresh()
]]>
  </method>
  <part class="container">
    <style>
      <property name="Geometry">{760,88,531,42}</property>
      <property name="Name">[oContainerPF]</property>
      <property name="TabIndex">0</property>
    </style>
    <part class="editbox">
      <style>
        <property name="Geometry">{790,94,153,30}</property>
        <property name="Name">[oCr_RG]</property>
        <property name="varName">[m_cr_rg]</property>
        <property name="font">
          <font name="Arial" width="0" height="-21" weight="700"/>
        </property>
        <property name="cPicture">[@s15]</property>
        <property name="nMaxLength">15</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">6</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{1024,94,132,30}</property>
        <property name="Name">[oCr_Dt_Ani]</property>
        <property name="varName">[m_cr_dt_ani]</property>
        <property name="font">
          <font name="Arial" width="0" height="-21" weight="700"/>
        </property>
        <property name="cPicture">[99.99]</property>
        <property name="nMaxLength">15</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">7</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{766,101,21,19}</property>
        <property name="Name">[oSayCr_insc_es]</property>
        <property name="Caption">[RG:]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-11" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">15</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{951,95,68,19}</property>
        <property name="Name">[oSayoCrDtAni_DdMm]</property>
        <property name="Caption">[Aniversario:]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-12" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="ToolTip">[Informe o dia e mes do nascimento do cliente]</property>
        <property name="TabIndex">20</property>
      </style>
    </part>
    <part class="button">
      <style>
        <property name="Geometry">{1170,94,108,30}</property>
        <property name="Name">[oButton1]</property>
        <property name="Caption">[Dados Pessoais]</property>
        <property name="font">
          <font name="Arial" width="0" height="-13" weight="400"/>
        </property>
        <property name="TabIndex">1006</property>
      </style>
      <method name="onClick">
        <![CDATA[ExecutaXML("sccrcli_dados1.tel")]]>
      </method>
    </part>
  </part>
  <part class="container">
    <style>
      <property name="Geometry">{336,88,365,41}</property>
      <property name="Name">[oContainerPJ]</property>
      <property name="TabIndex">0</property>
    </style>
    <part class="editbox">
      <style>
        <property name="Geometry">{410,93,176,30}</property>
        <property name="Name">[oCr_insc_es]</property>
        <property name="varName">[m_Cr_insc_es]</property>
        <property name="font">
          <font name="Arial" width="0" height="-21" weight="700"/>
        </property>
        <property name="cPicture">[@s20]</property>
        <property name="nMaxLength">20</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">6</property>
      </style>
      <method name="onLostFocus">
        <![CDATA[IF CnpjUnicoOk()
   IF wCaptaCnpjPelaWeb 
      IF oDadosCNPJ:GetCnpj(m_cr_cgc)
         oDadosCNPJ:Associa()
      ELSE
         ALERT("Nao foi possivel captar dados do CNPJ na WEB")
      ENDIF
   ENDIF
   RETURN .t.
ELSE
   RETURN .f.
ENDIF]]>
      </method>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{350,91,56,30}</property>
        <property name="Name">[oSayCr_insc_es]</property>
        <property name="Caption">[Inscricao Estadual]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-12" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">15</property>
      </style>
    </part>
    <part class="button">
      <style>
        <property name="Geometry">{600,93,88,30}</property>
        <property name="Name">[oBtnSocios]</property>
        <property name="Caption">[Socios]</property>
        <property name="font">
          <font name="Arial" width="0" height="-13" weight="400"/>
        </property>
        <property name="TabIndex">1006</property>
      </style>
      <method name="onClick">
        <![CDATA[CiBrow("VB_SOCIO",,,,.t.)]]>
      </method>
    </part>
  </part>
  <part class="radiogroup">
    <style>
      <property name="Geometry">{9,0,101,58}</property>
      <property name="Name">[oRadioPF]</property>
      <property name="varName">[vRadioPF]</property>
      <property name="Caption">[Tipo Pessoa]</property>
      <property name="font">
        <font name="Arial" width="0" height="-13" weight="400"/>
      </property>
      <property name="TabIndex">0</property>
    </style>
    <part class="radiobutton">
      <style>
        <property name="Geometry">{22,18,73,18}</property>
        <property name="Name">[oRadioCNPJ]</property>
        <property name="Caption">[CNPJ]</property>
        <property name="font">
          <font name="" width="0" height="-12" weight="700"/>
        </property>
        <property name="TabIndex">1</property>
      </style>
      <method name="onClick">
        <![CDATA[oRadioCNPJ:oGroup:nValue := 1
oContainerPF:hide()
oContainerPJ:Show()
oCr_CGC:ParsePict( '99.999.999/9999-99', m_cr_cgc)
oCr_CGC:Refresh()]]>
      </method>
    </part>
    <part class="radiobutton">
      <style>
        <property name="Geometry">{22,35,73,18}</property>
        <property name="Name">[oRadioCPF]</property>
        <property name="Caption">[CPF]</property>
        <property name="font">
          <font name="" width="0" height="-12" weight="700"/>
        </property>
        <property name="TabIndex">1</property>
      </style>
      <method name="onClick">
        <![CDATA[oRadioCNPJ:oGroup:nValue := 2
oContainerPF:Show()
oContainerPJ:Hide()
oCr_CGC:ParsePict( '999.999.999-99', m_cr_cgc)
oCr_CGC:Refresh()]]>
      </method>
    </part>
  </part>
  <part class="bitmap">
    <style>
      <property name="Geometry">{667,520,194,128}</property>
      <property name="Name">[oJpgFotoCliente]</property>
      <property name="Bitmap">[icon\sem_imagem.jpg]</property>
      <property name="Stretch">[1 - Isometric]</property>
      <property name="ToolTip">[Digitaliza Foto do Cliente]</property>
    </style>
    <method name="onClick">
      <![CDATA[Ged_Digitaliza('db','CLI',m_cr_cgc,m_cr_cod_cli,,oJpgFotoCliente)
Ged_ShowJpg('db','CLI',m_cr_cgc,m_cr_cod_cli,,oJpgFotoCliente)  
]]>
    </method>
    <method name="onInit">
      <![CDATA[Ged_ShowJpg('db','CLI',m_cr_cgc,m_cr_cod_cli,,oJpgFotoCliente)]]>
    </method>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{915,53,104,30}</property>
      <property name="Name">[oCr_cod_cli]</property>
      <property name="varName">[m_Cr_cod_cli]</property>
      <property name="font">
        <font name="Arial" width="0" height="-21" weight="700"/>
      </property>
      <property name="Justify">[Right]</property>
      <property name="cPicture">[999999]</property>
      <property name="nMaxLength">5</property>
      <property name="3DLook">.T.</property>
      <property name="TabIndex">1</property>
    </style>
    <method name="onGetFocus">
      <![CDATA[recno_cli("ANTES").and..f.]]>
    </method>
  </part>
  <part class="checkbox">
    <style>
      <property name="Geometry">{115,0,122,58}</property>
      <property name="Name">[oCaptaCnpjPelaWeb]</property>
      <property name="varName">[wCaptaCnpjPelaWeb]</property>
      <property name="Caption">[Capta Ficha no Site www da Receita]</property>
      <property name="WordWrap">.T.</property>
      <property name="TabIndex">1</property>
    </style>
    <method name="onClick">
      <![CDATA[IF wCaptaCnpjPelaWeb .AND. x_operacao<>1
   IF cgc_ok(m_cr_cgc)
      oDadosCNPJ:GetCnpj(m_cr_cgc)
      oDadosCNPJ:Associa()
   EndIf
endif]]>
    </method>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{872,53,44,16}</property>
      <property name="Name">[oSayCr_cod_cli]</property>
      <property name="Caption">[Codigo]</property>
      <property name="BackColor">16777215</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="400"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">2</property>
    </style>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{6,83,224,30}</property>
      <property name="Name">[oCr_cgc]</property>
      <property name="varName">[m_Cr_cgc]</property>
      <property name="font">
        <font name="Arial" width="0" height="-21" weight="700"/>
      </property>
      <property name="cPicture">[@s18]</property>
      <property name="nMaxLength">18</property>
      <property name="3DLook">.T.</property>
      <property name="TabIndex">2</property>
    </style>
    <method name="onLostFocus">
      <![CDATA[IF CnpjUnicoOk()
   IF wCaptaCnpjPelaWeb 
      IF oDadosCNPJ:GetCnpj(m_cr_cgc)
         oDadosCNPJ:Associa()
      ELSE
         ALERT("Nao foi possivel captar dados do CNPJ na WEB")
      ENDIF
   ENDIF
   RETURN .t.
ELSE
   RETURN .f.
ENDIF]]>
    </method>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{335,18,684,30}</property>
      <property name="Name">[oCr_nome]</property>
      <property name="varName">[m_Cr_nome]</property>
      <property name="font">
        <font name="Arial" width="0" height="-21" weight="700"/>
      </property>
      <property name="cPicture">[@s50]</property>
      <property name="nMaxLength">50</property>
      <property name="3DLook">.T.</property>
      <property name="TabIndex">3</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{335,0,125,16}</property>
      <property name="Name">[oSayCr_nome]</property>
      <property name="Caption">[Nome]</property>
      <property name="BackColor">16777215</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="400"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">3</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{282,64,51,16}</property>
      <property name="Name">[oSayCr_fantasi]</property>
      <property name="Caption">[Fantasia]</property>
      <property name="BackColor">16777215</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="400"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">3</property>
    </style>
    <method name="onClick">
      <![CDATA[ALERT("...")
//CiBrow("VB_PREF")]]>
    </method>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{335,53,532,30}</property>
      <property name="Name">[oCr_fantasi]</property>
      <property name="varName">[m_Cr_fantasi]</property>
      <property name="font">
        <font name="Arial" width="0" height="-21" weight="700"/>
      </property>
      <property name="cPicture">[@s50]</property>
      <property name="nMaxLength">50</property>
      <property name="3DLook">.T.</property>
      <property name="TabIndex">4</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{12,288,132,16}</property>
      <property name="Name">[oSayCr_pontore]</property>
      <property name="Caption">[Ponto de Referencia]</property>
      <property name="BackColor">16777215</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="400"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">6</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{15,138,32,16}</property>
      <property name="Name">[oSayCr_cEP]</property>
      <property name="Caption">[CEP]</property>
      <property name="BackColor">16777215</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="400"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">7</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{225,139,56,16}</property>
      <property name="Name">[oLabel3]</property>
      <property name="Caption">[Endereco]</property>
      <property name="BackColor">16777215</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="400"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">7</property>
    </style>
    <method name="onClick">
      <![CDATA[IF CnpjUnicoOk()
   IF (oDadosCNPJ := hWebCnpj():new(m_cr_cgc)):ok
      IF x_operacao=1 .OR. EMPTY(m_Cr_nome)
         m_cr_nome:=oDadosCnpj:RazaoSocial[1]
      ENDIF
      IF x_operacao=1 .OR. EMPTY(m_Cr_fantasi)
         m_Cr_fantasi:=oDadosCnpj:Fantasia[1]
      ENDIF
      IF x_operacao=1 .OR. EMPTY(m_Cr_rua)
         m_Cr_rua:=oDadosCnpj:Logradouro[1]
      ENDIF
      IF x_operacao=1 .OR. EMPTY(m_Cr_NumRua)
         m_Cr_rua:=oDadosCnpj:Numero[1]
      ENDIF
      IF x_operacao=1 .OR. EMPTY(m_Cr_Pontore)
         m_Cr_Pontore:=oDadosCnpj:Complemento[1]
      ENDIF
   
      
   // eVal(bAchaKey, @cCnpjResposta,           'NÚMERO DE INSCRIÇÃO')
   // eVal(bAchaKey, @DataDaSituacaoCadastral, 'DATA DE ABERTURA')
   // eVal(bAchaKey, @CNAE_Principal,          'CÓDIGO E DESCRIÇÃO DA ATIVIDADE ECONÔMICA PRINCIPAL')
   // eVal(bAchaKey, @CNAE_Secundarias,        'CÓDIGO E DESCRIÇÃO DAS ATIVIDADES ECONÔMICAS SECUNDÁRIAS')
   // eVal(bAchaKey, @Cod_Natureza_Juridica,   'CÓDIGO E DESCRIÇÃO DA NATUREZA JURÍDICA')

   //eVal(bAchaKey, @,             'COMPLEMENTO')
   //eVal(bAchaKey, @Cep,                     'CEP')
   //eVal(bAchaKey, @Bairro,                  'BAIRRO/DISTRITO')
   //eVal(bAchaKey, @Municipio,               'MUNICÍPIO')
   //eVal(bAchaKey, @UF,                      'UF')
   //eVal(bAchaKey, @Email,                   'ENDEREÇO ELETRÔNICO')
   //eVal(bAchaKey, @Fone,                    'TELEFONE')
   //eVal(bAchaKey, @SituacaoNoDiaDaConsulta, 'SITUAÇÃO CADASTRAL')
   ELSE
      ALERT('cnpj nao deu ok...')
   endif
   RETURN .t.
ELSE
   RETURN .f.
ENDIF
]]>
    </method>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{864,140,48,16}</property>
      <property name="Name">[oLabel2]</property>
      <property name="Caption">[Numero]</property>
      <property name="BackColor">16777215</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="400"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">7</property>
    </style>
  </part>
  <part class="buttonex">
    <style>
      <property name="Geometry">{640,520,24,17}</property>
      <property name="Name">[oButtonex1]</property>
      <property name="Caption">[S]</property>
      <property name="ToolTip">[Re-scanear foto]</property>
      <property name="TabIndex">7</property>
    </style>
    <method name="onClick">
      <![CDATA[Ged_ShowJpg('db','ZOOMCLI',m_cr_cgc,m_CR_COD_CLI,,oJpgFotoCliente) 
]]>
    </method>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{12,188,56,16}</property>
      <property name="Name">[oSayCr_bairro]</property>
      <property name="Caption">[Bairro:]</property>
      <property name="BackColor">16777215</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="400"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">8</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{817,188,46,16}</property>
      <property name="Name">[oSayCr_UF]</property>
      <property name="Caption">[Estado]</property>
      <property name="BackColor">16777215</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="400"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">9</property>
    </style>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{11,158,153,30}</property>
      <property name="Name">[ocr_CEP]</property>
      <property name="varName">[m_Cr_cEP]</property>
      <property name="font">
        <font name="Arial" width="0" height="-21" weight="700"/>
      </property>
      <property name="cPicture">[99999-999]</property>
      <property name="nMaxLength">9</property>
      <property name="3DLook">.T.</property>
      <property name="TabIndex">10</property>
    </style>
    <method name="onLostFocus">
      <![CDATA[CHK_LASTKEY(5).OR.(PSQ_BROW('LOGRA','PLOGRA','M_CR_CEP','N','S',,,'','','',,ocr_CEP,).AND.(EVAL(zbCEP),REFRESHGETLIST()) )]]>
    </method>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{371,188,44,16}</property>
      <property name="Name">[oSayCr_cidade]</property>
      <property name="Caption">[Cidade]</property>
      <property name="BackColor">16777215</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="400"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">10</property>
    </style>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{223,158,632,30}</property>
      <property name="Name">[oCr_rua]</property>
      <property name="varName">[m_Cr_rua]</property>
      <property name="font">
        <font name="Arial" width="0" height="-21" weight="700"/>
      </property>
      <property name="AutoHScroll">.T.</property>
      <property name="cPicture">[@s50]</property>
      <property name="nMaxLength">50</property>
      <property name="3DLook">.T.</property>
      <property name="TabIndex">11</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{967,188,35,16}</property>
      <property name="Name">[oSayCr_ibge]</property>
      <property name="Caption">[IBGE]</property>
      <property name="BackColor">16777215</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="400"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">11</property>
    </style>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{864,159,75,30}</property>
      <property name="Name">[oCr_NUMRUA]</property>
      <property name="varName">[m_Cr_NUMRUA]</property>
      <property name="font">
        <font name="Arial" width="0" height="-21" weight="700"/>
      </property>
      <property name="cPicture">[@s6]</property>
      <property name="nMaxLength">6</property>
      <property name="3DLook">.T.</property>
      <property name="TabIndex">12</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{13,238,30,16}</property>
      <property name="Name">[oSayCr_fone]</property>
      <property name="Caption">[Fone]</property>
      <property name="BackColor">16777215</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="400"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">12</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{241,238,30,16}</property>
      <property name="Name">[oLabel4]</property>
      <property name="Caption">[Fax]</property>
      <property name="BackColor">16777215</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="400"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">12</property>
    </style>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{12,207,330,30}</property>
      <property name="Name">[oCr_bairro]</property>
      <property name="varName">[m_Cr_bairro]</property>
      <property name="font">
        <font name="Arial" width="0" height="-21" weight="700"/>
      </property>
      <property name="AutoHScroll">.T.</property>
      <property name="cPicture">[@s30]</property>
      <property name="nMaxLength">30</property>
      <property name="3DLook">.T.</property>
      <property name="TabIndex">13</property>
    </style>
    <method name="onLostFocus">
      <![CDATA[PSQ_BROW('VB_BAIRR','PVBBAIRR','M_CR_BAIRRO','N','S',2,2,'','','',,oCr_bairro,)]]>
    </method>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{7,66,85,17}</property>
      <property name="Name">[oSayCr_cgc]</property>
      <property name="Caption">[CNPJ ou CPF]</property>
      <property name="BackColor">16777215</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="400"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">14</property>
    </style>
  </part>
  <part class="ownerbutton">
    <style>
      <property name="Geometry">{346,219,18,19}</property>
      <property name="Name">[oboCr_bairro]</property>
      <property name="BtnBitmap">[smPreview]</property>
      <property name="lResource">.T.</property>
      <property name="TabIndex">14</property>
    </style>
    <method name="onClick">
      <![CDATA[PSQ_BROW('VB_BAIRR','PVBBAIRR','M_CR_BAIRRO','N','S',2,2,'','','','EXIBA',oCr_bairro,)]]>
    </method>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{371,207,436,30}</property>
      <property name="Name">[oCr_cidade]</property>
      <property name="varName">[m_Cr_cidade]</property>
      <property name="font">
        <font name="Arial" width="0" height="-21" weight="700"/>
      </property>
      <property name="AutoHScroll">.T.</property>
      <property name="cPicture">[@s30]</property>
      <property name="nMaxLength">30</property>
      <property name="3DLook">.T.</property>
      <property name="TabIndex">14</property>
    </style>
    <method name="onLostFocus">
      <![CDATA[ChecaCidadeIbge(m_cr_Uf,m_Cr_cidade)]]>
    </method>
  </part>
  <part class="combobox">
    <style>
      <property name="Geometry">{814,207,68,30}</property>
      <property name="Name">[oCr_UF]</property>
      <property name="varName">[m_Cr_UF]</property>
      <property name="ColumnWidth">42</property>
      <property name="DisplayCount">8</property>
      <property name="font">
        <font name="Arial" width="0" height="-21" weight="700"/>
      </property>
      <property name="lEdit">.T.</property>
      <property name="FormatText">[UPPERCASE]</property>
      <property name="TabIndex">15</property>
    </style>
    <method name="onInteractiveChange">
      <![CDATA[Parameters value,oCr_UF
XmlChecaComboBox(value,oCr_UF,aCbm_Cr_UF)]]>
    </method>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{897,207,105,30}</property>
      <property name="Name">[oCr_ibge]</property>
      <property name="varName">[m_Cr_ibge]</property>
      <property name="font">
        <font name="Arial" width="0" height="-21" weight="700"/>
      </property>
      <property name="cPicture">[9999999]</property>
      <property name="nMaxLength">7</property>
      <property name="3DLook">.T.</property>
      <property name="TabIndex">16</property>
    </style>
    <method name="onLostFocus">
      <![CDATA[ChecaCidadeIbge(,,m_cr_ibge)]]>
    </method>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{476,238,39,16}</property>
      <property name="Name">[oSayCr_email]</property>
      <property name="Caption">[e-mail]</property>
      <property name="BackColor">16777215</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="400"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">16</property>
    </style>
  </part>
  <part class="ownerbutton">
    <style>
      <property name="Geometry">{171,172,16,16}</property>
      <property name="Name">[oOwnerbutton3]</property>
      <property name="BtnBitmap">[smPreview]</property>
      <property name="lResource">.T.</property>
      <property name="TabIndex">18</property>
    </style>
    <method name="onClick">
      <![CDATA[PSQ_BROW('LOGRA','PLOGRA','M_CR_CEP','N','S',,,'','','','EXIBA',ocr_CEP,)]]>
    </method>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{437,363,207,20}</property>
      <property name="Name">[osoSaym_cr_cobrador]</property>
      <property name="Caption">[...]</property>
      <property name="font">
        <font name="Arial" width="0" height="-16" weight="400"/>
      </property>
      <property name="Border">.T.</property>
      <property name="TabIndex">25</property>
    </style>
  </part>
  <part class="ownerbutton">
    <style>
      <property name="Geometry">{944,369,16,16}</property>
      <property name="Name">[oboCr_tip_des]</property>
      <property name="BtnBitmap">[smPreview]</property>
      <property name="lResource">.T.</property>
      <property name="TabIndex">28</property>
    </style>
    <method name="onClick">
      <![CDATA[PSQ_BROW('VB_CONV','PVBCONV','M_CR_TIP_DES','N','N',2,2,'','','','EXIBA',oCr_tip_des,)]]>
    </method>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{13,257,221,30}</property>
      <property name="Name">[oCr_fone]</property>
      <property name="varName">[m_Cr_fone]</property>
      <property name="font">
        <font name="Arial" width="0" height="-21" weight="700"/>
      </property>
      <property name="cPicture">[@s20]</property>
      <property name="nMaxLength">15</property>
      <property name="3DLook">.T.</property>
      <property name="TabIndex">32</property>
    </style>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{238,257,221,30}</property>
      <property name="Name">[oCr_fax]</property>
      <property name="varName">[m_Cr_fax]</property>
      <property name="font">
        <font name="Arial" width="0" height="-21" weight="700"/>
      </property>
      <property name="cPicture">[@s20]</property>
      <property name="nMaxLength">15</property>
      <property name="3DLook">.T.</property>
      <property name="TabIndex">33</property>
    </style>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{476,257,526,30}</property>
      <property name="Name">[oCr_email]</property>
      <property name="varName">[m_Cr_email]</property>
      <property name="font">
        <font name="Arial" width="0" height="-19" weight="400"/>
      </property>
      <property name="cPicture">[@s70]</property>
      <property name="nMaxLength">70</property>
      <property name="3DLook">.T.</property>
      <property name="TabIndex">34</property>
    </style>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{12,306,992,30}</property>
      <property name="Name">[oCr_pontore]</property>
      <property name="varName">[m_Cr_pontore]</property>
      <property name="font">
        <font name="Arial" width="0" height="-21" weight="700"/>
      </property>
      <property name="cPicture">[@s50]</property>
      <property name="nMaxLength">255</property>
      <property name="3DLook">.T.</property>
      <property name="TabIndex">35</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{17,341,95,16}</property>
      <property name="Name">[oSayCr_limite]</property>
      <property name="Caption">[Limite de Credito]</property>
      <property name="BackColor">16777215</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="400"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">41</property>
    </style>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{17,360,150,25}</property>
      <property name="Name">[oCr_limite]</property>
      <property name="varName">[m_Cr_limite]</property>
      <property name="font">
        <font name="Arial" width="0" height="-21" weight="700"/>
      </property>
      <property name="cPicture">[@e 999,999,999.99]</property>
      <property name="nMaxLength">14</property>
      <property name="3DLook">.T.</property>
      <property name="TabIndex">41</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{193,341,144,16}</property>
      <property name="Name">[oSaycr_limpra]</property>
      <property name="Caption">[Atraso Permitido em Dias]</property>
      <property name="BackColor">16777215</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="400"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">42</property>
    </style>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{193,360,50,25}</property>
      <property name="Name">[ocr_limpra]</property>
      <property name="varName">[m_cr_limpra]</property>
      <property name="font">
        <font name="Arial" width="0" height="-21" weight="700"/>
      </property>
      <property name="Justify">[Center]</property>
      <property name="nMaxLength">3</property>
      <property name="3DLook">.T.</property>
      <property name="TabIndex">42</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{364,341,114,16}</property>
      <property name="Name">[oSaym_cr_cobrador]</property>
      <property name="Caption">[Vendedor]</property>
      <property name="BackColor">16777215</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="400"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">43</property>
    </style>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{364,360,50,25}</property>
      <property name="Name">[om_cr_cobrador]</property>
      <property name="varName">[m_cr_cobrador]</property>
      <property name="font">
        <font name="Arial" width="0" height="-21" weight="700"/>
      </property>
      <property name="Justify">[Right]</property>
      <property name="nMaxLength">3</property>
      <property name="3DLook">.T.</property>
      <property name="TabIndex">43</property>
    </style>
    <method name="onLostFocus">
      <![CDATA[PSQ_BROW('SF_VEND','PSFVEND','M_CR_COBRADOR','N','N',17,23,'NOME','@S12','',,om_cr_cobrador,osoSaym_cr_cobrador)]]>
    </method>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{660,341,91,16}</property>
      <property name="Name">[oSayCr_tip_cli]</property>
      <property name="Caption">[Tipo de Cliente]</property>
      <property name="BackColor">16777215</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="400"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">44</property>
    </style>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{660,360,50,25}</property>
      <property name="Name">[oCr_tip_cli]</property>
      <property name="varName">[m_Cr_tip_cli]</property>
      <property name="font">
        <font name="Arial" width="0" height="-21" weight="700"/>
      </property>
      <property name="Justify">[Center]</property>
      <property name="nMaxLength">1</property>
      <property name="3DLook">.T.</property>
      <property name="TabIndex">44</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{771,339,110,16}</property>
      <property name="Name">[oSayCr_situaca]</property>
      <property name="Caption">[Situacao do Credito]</property>
      <property name="BackColor">16777215</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="400"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">45</property>
    </style>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{765,360,50,25}</property>
      <property name="Name">[oCr_situaca]</property>
      <property name="varName">[m_Cr_situaca]</property>
      <property name="font">
        <font name="Arial" width="0" height="-21" weight="700"/>
      </property>
      <property name="Justify">[Center]</property>
      <property name="nMaxLength">1</property>
      <property name="3DLook">.T.</property>
      <property name="TabIndex">45</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{888,341,119,16}</property>
      <property name="Name">[oSayCr_tip_des]</property>
      <property name="Caption">[Opcao de Venda]</property>
      <property name="BackColor">16777215</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="400"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">46</property>
    </style>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{889,360,50,25}</property>
      <property name="Name">[oCr_tip_des]</property>
      <property name="varName">[m_Cr_tip_des]</property>
      <property name="font">
        <font name="Arial" width="0" height="-21" weight="700"/>
      </property>
      <property name="nMaxLength">2</property>
      <property name="3DLook">.T.</property>
      <property name="TabIndex">46</property>
    </style>
    <method name="onLostFocus">
      <![CDATA[PSQ_BROW('VB_CONV','PVBCONV','M_CR_TIP_DES','N','N',2,2,'','','',,oCr_tip_des,)]]>
    </method>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{12,394,84,16}</property>
      <property name="Name">[oSayCR_OBS]</property>
      <property name="Caption">[Observacoes:]</property>
      <property name="Justify">[Right]</property>
      <property name="BackColor">16777215</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="700"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">47</property>
    </style>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{101,392,905,89}</property>
      <property name="Name">[oCR_OBS]</property>
      <property name="varName">[m_CR_OBS]</property>
      <property name="font">
        <font name="Arial" width="0" height="-16" weight="400"/>
      </property>
      <property name="Multiline">.T.</property>
      <property name="AutoHScroll">.T.</property>
      <property name="ReadOnly">.T.</property>
      <property name="3DLook">.T.</property>
      <property name="TabIndex">47</property>
    </style>
    <method name="onGetFocus">
      <![CDATA[RETURN .T.]]>
    </method>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{32,498,59,16}</property>
      <property name="Name">[oSayCr_contato]</property>
      <property name="Caption">[Contato:]</property>
      <property name="Justify">[Right]</property>
      <property name="BackColor">16777215</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="700"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">48</property>
    </style>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{101,486,905,30}</property>
      <property name="Name">[oCr_contato]</property>
      <property name="varName">[m_Cr_contato]</property>
      <property name="font">
        <font name="Arial" width="0" height="-21" weight="700"/>
      </property>
      <property name="cPicture">[@s100]</property>
      <property name="nMaxLength">200</property>
      <property name="3DLook">.T.</property>
      <property name="TabIndex">48</property>
    </style>
  </part>
  <part class="button">
    <style>
      <property name="Geometry">{900,608,106,36}</property>
      <property name="Name">[oOwnerbutton1]</property>
      <property name="Id">[IDOK]</property>
      <property name="Caption">[&amp;OK]</property>
      <property name="font">
        <font name="Arial" width="0" height="-16" weight="700"/>
      </property>
      <property name="TabIndex">1000</property>
    </style>
  </part>
  <part class="button">
    <style>
      <property name="Geometry">{900,569,106,36}</property>
      <property name="Name">[oOwnerbutton2]</property>
      <property name="Id">[IDCANCEL]</property>
      <property name="Caption">[&amp;Cancela]</property>
      <property name="font">
        <font name="Arial" width="0" height="-16" weight="400"/>
      </property>
      <property name="TabIndex">1001</property>
    </style>
  </part>
  <part class="button">
    <style>
      <property name="Geometry">{37,539,165,46}</property>
      <property name="Name">[oBtnContatos]</property>
      <property name="Caption">[Contatos]</property>
      <property name="font">
        <font name="Arial" width="0" height="-13" weight="700"/>
      </property>
      <property name="TabIndex">1006</property>
    </style>
    <method name="onClick">
      <![CDATA[ALERT("...")
//CiBrow("VB_SOCIO")]]>
    </method>
    <part class="icon">
      <style>
        <property name="Geometry">{43,546,32,32}</property>
        <property name="Name">[oIcon2]</property>
        <property name="Icon">[icon\contrato.ico]</property>
      </style>
    </part>
  </part>
  <part class="button">
    <style>
      <property name="Geometry">{37,588,165,46}</property>
      <property name="Name">[oBtnObras]</property>
      <property name="Caption">[Obras]</property>
      <property name="font">
        <font name="Arial" width="0" height="-13" weight="700"/>
      </property>
      <property name="TabIndex">1006</property>
    </style>
    <method name="onClick">
      <![CDATA[CiBrow("VB_PREF",,,,.t.)]]>
    </method>
    <part class="icon">
      <style>
        <property name="Geometry">{43,595,32,32}</property>
        <property name="Name">[oIcon1]</property>
        <property name="Icon">[icon\obras.ico]</property>
      </style>
    </part>
  </part>
  <part class="link">
    <style>
      <property name="Geometry">{272,576,345,22}</property>
      <property name="Name">[olink1]</property>
      <property name="Caption">[Consulta CNPJ no Cadastro Nacional da NFE]</property>
      <property name="Link">[https://www.sefaz.rs.gov.br/NFE/NFE-CCC.aspx]</property>
      <property name="Transparent">.T.</property>
      <property name="ToolTip">
[Consulta CNPJ versus Inscricao Estadual para geracao de NFE]      </property>
      <property name="TabIndex">1007</property>
    </style>
  </part>
  <part class="link">
    <style>
      <property name="Geometry">{272,550,321,22}</property>
      <property name="Name">[oLink2]</property>
      <property name="Caption">[Consulta Dados do CNPJ no Sintegra]</property>
      <property name="Link">[http://www.sintegra.gov.br/]</property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">1008</property>
    </style>
  </part>
  <part class="link">
    <style>
      <property name="Geometry">{272,603,345,22}</property>
      <property name="Name">[oLink3]</property>
      <property name="Caption">[Consulta Dados do CNPJ na  Receita Federal]</property>
      <property name="Link">
[http://www.receita.fazenda.gov.br/PessoaJuridica/CNPJ/cnpjreva/Cnpjreva_Solicitacao.asp]      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">1009</property>
    </style>
  </part>
</part>
