<?xml version="1.0" encoding="UTF-8"?>
<part class="form">
  <style>
    <property name="Geometry">{531,212,458,412}</property>
    <property name="Name">[vdaCplPsico]</property>
    <property name="Caption">[Complemento:]</property>
    <property name="AlwaysOnTop">.F.</property>
    <property name="AutoCenter">.T.</property>
    <property name="Font">
      <font name="Courier New" width="0" height="-12" 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,zOk}</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="Icon">[]</property>
    <property name="NoIcon">.F.</property>
    <property name="SystemMenu">.T.</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 ),)
SET(5,1960) 
IF UPPER(Se_Prod->ppedelote)="S" .OR. Se_Prod->pfgcontrol<>" "
   m_TipReceita := 1
Else
   oGrupoReceita:Disable()
   oTipReceita:Disable()
   onumReceita:Disable()
   oMDATARECEI:Disable()
ENDIF]]>
  </method>
  <part class="group">
    <style>
      <property name="Geometry">{7,7,442,322}</property>
      <property name="Name">[oGroup1]</property>
      <property name="TabIndex">1</property>
    </style>
    <part class="label">
      <style>
        <property name="Geometry">{21,47,77,16}</property>
        <property name="Name">[oSaypaciente]</property>
        <property name="Caption">[Paciente.:]</property>
        <property name="font">
          <font name="Courier New" width="0" height="-12" weight="700"/>
        </property>
        <property name="TabIndex">2</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{21,67,77,16}</property>
        <property name="Name">[oSaycomprador]</property>
        <property name="Caption">[Comprador:]</property>
        <property name="font">
          <font name="Courier New" width="0" height="-12" weight="700"/>
        </property>
        <property name="TabIndex">3</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{21,87,77,16}</property>
        <property name="Name">[oSaycrm]</property>
        <property name="Caption">[CRM......:]</property>
        <property name="font">
          <font name="Courier New" width="0" height="-12" weight="700"/>
        </property>
        <property name="TabIndex">4</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{21,107,77,16}</property>
        <property name="Name">[oSaymedico]</property>
        <property name="Caption">[Medico...:]</property>
        <property name="font">
          <font name="Courier New" width="0" height="-12" weight="700"/>
        </property>
        <property name="TabIndex">5</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{21,127,77,16}</property>
        <property name="Name">[oSayposologia]</property>
        <property name="Caption">[Posologia:]</property>
        <property name="font">
          <font name="Courier New" width="0" height="-12" weight="700"/>
        </property>
        <property name="TabIndex">6</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{98,47,217,18}</property>
        <property name="Name">[opaciente]</property>
        <property name="varName">[m_paciente]</property>
        <property name="nMaxLength">30</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">10</property>
      </style>
      <method name="onLostFocus">
        <![CDATA[zOk := vb_pac->(DBSEEK(RTRIM(M_paciente),.t.))
IF zOk
   m_paciente  := vb_pac->paciente
   m_comprador := vb_pac->paciente
   oPaciente:Refresh()
   oComprador:Refresh()
EndIf
RETURN Psq_brow("vb_pac","pvbpac","m_paciente","N","S",0,0,"","","",,oPaciente)]]>
      </method>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{98,67,217,18}</property>
        <property name="Name">[ocomprador]</property>
        <property name="varName">[m_comprador]</property>
        <property name="nMaxLength">30</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">11</property>
      </style>
      <method name="onLostFocus">
        <![CDATA[zOk:= vb_pcomp->(DBSEEK(RTRIM(M_comprador),.t.))
IF zOk
   m_comprador := vb_pcomp->comprador
   oComprador:Refresh()
EndIf
RETURN Psq_brow("vb_pcomp","pvbpcomp","m_comprador","N","S",0,0,"","","",,oComprador) 
]]>
      </method>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{98,87,49,18}</property>
        <property name="Name">[ocrm]</property>
        <property name="varName">[m_crm]</property>
        <property name="nMaxLength">6</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">12</property>
      </style>
      <method name="onLostFocus">
        <![CDATA[zOk:=empty(m_crm)
IF !zOk
   DBSETORDER(2)
   zOk := Psq_brow("vb_crm","pvbcrm","m_crm","N","S",0,0,"","@s10","",,oCrm)
   m_medico:=vb_crm->medico
   oMedico:Refresh()
Endif
RETURN zOk]]>
      </method>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{98,107,217,18}</property>
        <property name="Name">[omedico]</property>
        <property name="varName">[m_medico]</property>
        <property name="nMaxLength">30</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">13</property>
      </style>
      <method name="onLostFocus">
        <![CDATA[zOk:=!empty(m_medico)
IF zOk
   DBSETORDER(1)
   DBSEEK(RTRIM(m_medico),.t.)
   m_medico:=vb_crm->medico
   m_crm:=vb_crm->crm
   oMedico:Refresh()
   oCrm:Refresh()
   zOk:=Psq_brow("vb_crm","pvbcrm","m_medico","N","S",0,0,"","","",,oMedico) 
ENDIF
RETURN zOk
   
                               ]]>
      </method>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{98,127,42,18}</property>
        <property name="Name">[oposologia]</property>
        <property name="varName">[m_posologia]</property>
        <property name="nMaxLength">5</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">14</property>
      </style>
      <method name="onLostFocus">
        <![CDATA[RETURN m_posologia>0]]>
      </method>
    </part>
    <part class="group">
      <style>
        <property name="Geometry">{16,170,414,121}</property>
        <property name="Name">[oGrupoReceita]</property>
        <property name="TabIndex">20</property>
      </style>
      <part class="label">
        <style>
          <property name="Geometry">{30,260,98,16}</property>
          <property name="Name">[oSayMDATARECEI]</property>
          <property name="Caption">[Data Receita:]</property>
          <property name="font">
            <font name="Courier New" width="0" height="-12" weight="700"/>
          </property>
          <property name="TabIndex">9</property>
        </style>
      </part>
      <part class="datepicker">
        <style>
          <property name="Geometry">{137,260,84,18}</property>
          <property name="Name">[oMDATARECEI]</property>
          <property name="varName">[m_MDATARECEI]</property>
          <property name="3DLook">.T.</property>
          <property name="TabIndex">17</property>
        </style>
      </part>
      <part class="label">
        <style>
          <property name="Geometry">{30,233,98,16}</property>
          <property name="Name">[oSaynumreceita]</property>
          <property name="Caption">[Num. Receita:]</property>
          <property name="font">
            <font name="Courier New" width="0" height="-12" weight="700"/>
          </property>
          <property name="TabIndex">8</property>
        </style>
      </part>
      <part class="editbox">
        <style>
          <property name="Geometry">{136,232,77,18}</property>
          <property name="Name">[onumreceita]</property>
          <property name="varName">[m_numreceita]</property>
          <property name="nMaxLength">10</property>
          <property name="3DLook">.T.</property>
          <property name="TabIndex">16</property>
        </style>
      </part>
      <part class="label">
        <style>
          <property name="Geometry">{29,205,98,16}</property>
          <property name="Name">[oSaytipreceita]</property>
          <property name="Caption">[Tip. Receita:]</property>
          <property name="font">
            <font name="Courier New" width="0" height="-12" weight="700"/>
          </property>
          <property name="TabIndex">7</property>
        </style>
      </part>
      <part class="editbox">
        <style>
          <property name="Geometry">{140,205,14,18}</property>
          <property name="Name">[otipreceita]</property>
          <property name="varName">[m_tipreceita]</property>
          <property name="nMaxLength">1</property>
          <property name="3DLook">.T.</property>
          <property name="TabIndex">15</property>
        </style>
      </part>
    </part>
  </part>
  <part class="button">
    <style>
      <property name="Geometry">{297,347,50,38}</property>
      <property name="Name">[oOwnerbutton1]</property>
      <property name="Id">[IDOK]</property>
      <property name="Caption">[OK]</property>
      <property name="TabIndex">18</property>
    </style>
  </part>
  <part class="button">
    <style>
      <property name="Geometry">{374,350,70,38}</property>
      <property name="Name">[oOwnerbutton2]</property>
      <property name="Id">[IDCANCEL]</property>
      <property name="Caption">[Cancela]</property>
      <property name="TabIndex">19</property>
    </style>
  </part>
</part>
