<?xml version="1.0" encoding="UTF-8"?>
<part class="form">
  <style>
    <property name="Geometry">{70,160,371,220}</property>
    <property name="Name">[vb_fpag1.tel]</property>
    <property name="Caption">[Definicao da Parcela]</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,aCbm_CR_TIP_DUP}</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="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 zNpos=0
//skel variavel vOpcoes={Pad('DM-Duplicata',13), Pad('ES-Especie',13),Pad('CH-Cheque',13), Pad('CT-Cartao',13), Pad('CV-Cta_Convenio',13), Pad('CA-Carne',13), Pad('PM-Promissoria',13) }
//skel comando antes zNpos=aScan(vOpcoes,{|x|m_CR_TIP_DUP=left(x,2)})
m_fPlanoPag := zfPlanoPag
aCbm_CR_TIP_DUP := vOpcoes
oCR_TIP_DUP:aitems := aCbm_CR_TIP_DUP
oCR_TIP_DUP:Requery() 
IF znPos>0
   oCR_TIP_DUP:SetItem( znPos )
ELSE
   oCR_TIP_DUP:SetValue( m_CR_TIP_DUP ) 
ENDIF
oCR_TIP_DUP:Refresh() 

SET(5,1960) ]]>
  </method>
  <part class="group">
    <style>
      <property name="Geometry">{7,3,357,170}</property>
      <property name="Name">[oGroup1]</property>
      <property name="TabIndex">1</property>
    </style>
    <part class="line">
      <style>
        <property name="Geometry">{7,180,357,2}</property>
        <property name="Name">[oLine1]</property>
      </style>
    </part>
    <part class="combobox">
      <style>
        <property name="Geometry">{161,53,91,18}</property>
        <property name="Name">[oCR_TIP_DUP]</property>
        <property name="varName">[m_CR_TIP_DUP]</property>
        <property name="ColumnWidth">112</property>
        <property name="Items">{}</property>
        <property name="DisplayCount">7</property>
        <property name="lEdit">.T.</property>
        <property name="FormatText">[UPPERCASE]</property>
        <property name="TabIndex">1</property>
      </style>
      <method name="onGetFocus">
        <![CDATA[IF modus='Incluir'
   MyShowListbox(m_CR_TIP_DUP, vOpcoes, oCr_Tip_Dup)
ELSE
   znPos:=aScan(vOpcoes, {|x| left(m_cr_tip_dup,2)=if(ValType(x)='C',left(x,2),left(x[1],2))} )
   IF znpos>0
      writelog('---> salvando '+vOpcoes[znpos])
      SetDlgItemText( oCr_Tip_Dup:oParent:handle, oCr_Tip_Dup:id, vOpcoes[znpos] )
   else
      writelog('---> ascan falhou left(m_cr_tip_dup,2) : '+LEFT(m_cr_tip_dup,2) )
   ENDIF
   MyShowListbox(m_CR_TIP_DUP, vOpcoes, oCr_Tip_Dup)
endif
RETURN .t.]]>
      </method>
      <method name="onLostFocus">
        <![CDATA[   IF ASCAN(vOpcoes, {|x|left(m_cr_tip_dup,2)=left(x,2)})=0
   ALERT("Voce precisa escolher uma forma de pagamento dentre as listadas!")
   MyShowListbox(, , oCr_Tip_Dup)
   RETURN .f.
   ELSE
   RETURN .t.
ENDIF]]>
      </method>
      <method name="onInteractiveChange">
        <![CDATA[Parameters value,oCR_TIP_DUP
XmlChecaComboBox(value,oCR_TIP_DUP,aCbm_CR_TIP_DUP) ]]>
      </method>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{21,53,140,16}</property>
        <property name="Name">[oSayCR_TIP_DUP]</property>
        <property name="Caption">[Forma de Pagamento:]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Courier New" width="0" height="-12" weight="700"/>
        </property>
        <property name="TabIndex">2</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{161,73,35,18}</property>
        <property name="Name">[oFPRAZO]</property>
        <property name="varName">[m_FPRAZO]</property>
        <property name="nMaxLength">4</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">2</property>
      </style>
      <method name="onGetFocus">
        <![CDATA[ShowToolTip("Informe o prazo de pagamento da Parcela",oFprazo)]]>
      </method>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{21,33,140,16}</property>
        <property name="Name">[oLabel1]</property>
        <property name="Caption">[Forma de Pagamento:]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Courier New" width="0" height="-12" weight="700"/>
        </property>
        <property name="TabIndex">2</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{161,33,35,18}</property>
        <property name="Name">[ofPlanoPag]</property>
        <property name="varName">[m_fPlanoPag]</property>
        <property name="nMaxLength">4</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">2</property>
      </style>
      <method name="onGetFocus">
        <![CDATA[m_fPlanoPag:=zfPlanoPag
RETURN .f.]]>
      </method>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{21,73,140,16}</property>
        <property name="Name">[oSayFPRAZO]</property>
        <property name="Caption">[Prazo da Parcela..:]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Courier New" width="0" height="-12" weight="700"/>
        </property>
        <property name="TabIndex">3</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{161,103,21,18}</property>
        <property name="Name">[oFCARTAO]</property>
        <property name="varName">[m_FCARTAO]</property>
        <property name="nMaxLength">2</property>
        <property name="ToolTip">
[Preencher apenas para forma de pagamento CT-Cartao]        </property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">3</property>
      </style>
      <method name="onGetFocus">
        <![CDATA[left(m_cr_tip_dup,2)="CT".AND.ShowToolTip("Informe o codigo do cartao caso deseje que a opcao de venda funcione apenas para o mesmo!",oFcartao)]]>
      </method>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{21,103,140,16}</property>
        <property name="Name">[oSayFCARTAO]</property>
        <property name="Caption">[Apenas para Cartao:]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Courier New" width="0" height="-12" weight="700"/>
        </property>
        <property name="TabIndex">4</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{161,123,28,18}</property>
        <property name="Name">[oFBANCO]</property>
        <property name="varName">[m_FBANCO]</property>
        <property name="nMaxLength">3</property>
        <property name="ToolTip">
[Preencher apenas para forma de pagamento CH-Cheque]        </property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">4</property>
      </style>
      <method name="onGetFocus">
        <![CDATA[left(m_cr_tip_dup,2)="CH".AND.ShowToolTip("Informe o codigo do Banco caso deseje que a opcao de venda funcione apenas para o mesmo!",ofBanco)]]>
      </method>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{21,123,140,16}</property>
        <property name="Name">[oSayFBANCO]</property>
        <property name="Caption">[Apenas para Banco :]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Courier New" width="0" height="-12" weight="700"/>
        </property>
        <property name="TabIndex">5</property>
      </style>
    </part>
  </part>
  <part class="button">
    <style>
      <property name="Geometry">{214,186,70,28}</property>
      <property name="Name">[oOwnerbutton1]</property>
      <property name="Id">[IDOK]</property>
      <property name="Caption">[&amp;OK]</property>
      <property name="TabIndex">1000</property>
    </style>
  </part>
  <part class="button">
    <style>
      <property name="Geometry">{294,186,70,28}</property>
      <property name="Name">[oOwnerbutton2]</property>
      <property name="Id">[IDCANCEL]</property>
      <property name="Caption">[&amp;Cancela]</property>
      <property name="TabIndex">1001</property>
    </style>
  </part>
</part>
