<?xml version="1.0" encoding="UTF-8"?>
<part class="form">
  <style>
    <property name="Geometry">{308,132,1022,598}</property>
    <property name="Name">[ct_trld.scr]</property>
    <property name="Caption">[Relacoes de Cheques]</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 zbNomeSitCheque:={|cSit| IF(cSit='S','Depositada', if(cSit='U','Custodiada',if(cSit='P','Repassada em Pagto',if(cSit='T','Trocada em Factoring','A ser Confirmada')))) }

oContextMenu:=Hwg_ContextMenu()

hwg_Btn(oToolbar,5,5,64,64)
hwg_TbMt(oToolbar,' 22;gera_rldep(0,"ADD");Ins-Cria_Relacao ;Ins-Inclui;cadastrar.ico;;;;;Inclui;;;')
hwg_TbMt(oToolbar,'65;gera_rldep(ct_trld->fNUMPED,"UPD");A-Altera ;A-Altera;alterar.ico;;;;;&A-Altera;;;')
hwg_TbMt(oToolbar,'  7;gera_rldep(ct_trld->fNumPed,"DEL");Del-Apaga Relacao;Del-Deleta;deletar.ico;;;;;Deleta;;;')

hwg_TbMt(oToolbar,'13;gera_rldep(ct_trld->fNUMPED,"CONFIRMA_T");T-Factoring ;T - Trocar Cheques em Operacao de FACTORING;chq_factoring.ico;;;Lucida Bright;-11;T-Factoring;;;')
hwg_TbMt(oToolbar,'13;gera_rldep(ct_trld->fNUMPED,"CONFIRMA_P");P-Pagar_Forn ;P - Pagar Fornecedores com Cheques;chq_forn.ico;;;Lucida Bright;-11;P-Pagar_Forn;;;')
hwg_TbMt(oToolbar,'13;gera_rldep(ct_trld->fNUMPED,"CONFIRMA_S");S-Depositar ;S - Confirmar Deposito da Relacao;chq_bco.ico;;;Lucida Bright;-11;S-Depositar;;;')
hwg_TbMt(oToolbar,'13;gera_rldep(ct_trld->fNUMPED,"CONFIRMA_U");U-Custodiar ;U - Custodiar/Depositar Cheques;chq_bco.ico;;;Lucida Bright;-11;U-Custodiar;;;')

d_ob:lEditable = .t.
//hwg_Btn(oToolbar,10,544,70,24)
//hwg_TbMt(oToolbar,'65;gera_rldep(ct_trld->fNUMPED,"UPD");Enter-Altera_Relacao ;Enter - Altera_Relacao;sembitmap;;;Lucida Bright;-11;Altera_Relacao;;6;')

// hwg_TbMt(oToolbar,'65;doget(D_ob);A-Edita ;A - Edita;sembitmap;;;Lucida Bright;-11;&A-Edita;;6;')
// hwg_TbMt(oToolbar,'32;gera_rldep(fNUMPED,"RECALCULA");R-Recalcula ;R - Recalcula;sembitmap;;;Lucida Bright;-11;&R-Recalcula;;6;')
//hwg_TbMt(oToolbar,'76;lanc_rldep(d_ob,numero);L-Confirma ;L - Confirma;sembitmap;;;Lucida Bright;-11;&L-Confirma;;6;')
//hwg_TbMt(oToolbar,'90;atu_bco(d_ob,numero);Z-Banco ;Z - Banco;sembitmap;;;Lucida Bright;-11;&Z-Banco;;6;')
//hwg_TbMt(oToolbar,'71;gera_rlrc(numero);G-Gera_pela_RC ;G - Gera_pela_RC;sembitmap;;;Lucida Bright;-11;&G-Gera_pela_RC;;6;')
//hwg_TbMt(oToolbar,'74;ajust_reg(d_ob,numero);J-Ajusta Reg;J - Ajusta Reg;sembitmap;;;Lucida Bright;-11;&J-Ajusta;;6;')
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()

DBGOBOTTOM()
DBSKIP(-7)]]>
  </method>
  <method name="onPaint">
    <![CDATA[Parameters oCtrl,hDC
oCtrl:bpaint:=NIL
D_oB:setFocus()]]>
  </method>
  <part class="status">
    <style>
      <property name="Geometry">{0,568,1022,30}</property>
      <property name="Name">[oDlgStatusBar]</property>
      <property name="aParts">{608,152,0}</property>
    </style>
  </part>
  <part class="browse">
    <style>
      <property name="Geometry">{10,77,1000,216}</property>
      <property name="Name">[D_oB]</property>
      <property name="Anchor">15</property>
      <property name="font">
        <font name="Lucida Sans Unicode" width="0" height="-16" weight="400"/>
      </property>
      <property name="GridLinesSepColor">0</property>
      <property name="TabIndex">4</property>
    </style>
    <method name="onGetFocus">
      <![CDATA[nBrwAtivo:=1]]>
    </method>
    <method name="onPosChange">
      <![CDATA[oBrwItens:Refresh()]]>
    </method>
    <method name="onInit">
      <![CDATA[hwg_TbFi(D_oB, 'Rl Dep;fNUMPED;N;999999;  6;;')
hwg_TbFi(D_oB, 'Tipo/Sit;SitCheque;C;!;5;S;')

hwg_TbFi(D_oB, 'Situacao;EVAL(zbNomeSitCheque,SitCheque);P;@S25;25;N;')

hwg_TbFi(D_oB, 'Emissao;fDATAEMI;D;;  8;;')
hwg_TbFi(D_oB, 'N Chq;fTotUnid;N;99999;  5;;')
hwg_TbFi(D_oB, 'Val Chq;fVal;N;9999999.99; 10;;')

D_oB:bColorSel:= RGB(3,23,233)
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.,"CT_TRLD",.F.,.T.,{||.T.} }
// d_ob:bEdit := {|D_oB| .t.}
sHwgKeyEdit:= 65
AADD(aBrowses,{D_oB,D_oB:Alias,{||.f.},{|| .T.},})
]]>
    </method>
  </part>
  <part class="browse">
    <style>
      <property name="Geometry">{10,297,1000,240}</property>
      <property name="Name">[oBrwItens]</property>
      <property name="Anchor">15</property>
      <property name="font">
        <font name="Lucida Sans Unicode" width="0" height="-16" weight="400"/>
      </property>
      <property name="GridLinesSepColor">0</property>
      <property name="TabIndex">4</property>
    </style>
    <method name="onGetFocus">
      <![CDATA[nBrwAtivo:=1]]>
    </method>
    <method name="onInit">
      <![CDATA[DbSelectArea( 'ct_rldep' )
oBrwItens:Alias := 'ct_rldep'
oBrwItens:bColorSel:= RGB(3,23,133)
oBrwItens:tColorSel:= RGB(255,255,255)
hwg_TbFi(oBrwItens, 'T;tipodoc;C;!;  1;N;')
hwg_TbFi(oBrwItens, ';FG_FAT;C;!;  1;N;')
hwg_TbFi(oBrwItens, 'Cheque;Ncheque;N;999999;  6;N;')
hwg_TbFi(oBrwItens, 'Bco;banco;N;999;  3;N;')
hwg_TbFi(oBrwItens, 'Valor;VALOR;N;9999999.99;10;N;')
hwg_TbFi(oBrwItens, 'Bom Para;bomparadia;D;;  8;N;')
hwg_TbFi(oBrwItens, 'Nome_Emit;Cr_Nome;C;@s35;22;S;')
hwg_TbFi(oBrwItens, 'CPF_Emit;Cr_CGC;C;@s18;18;S;')
hwg_TbFi(oBrwItens, '*;SitCheque;C;!;  1;N;')
hwg_TbFi(oBrwItens, 'Doc;Doc;C;@s10; 10;N;')
hwg_TbFi(oBrwItens, 'Relacao;fNumped;N;999999;6;N;')

oBrwItens:lFilter := .T.
oBrwItens:bFirst := {|| ct_rldep->( DBSEEK( Str(Ct_trld->fNumPed,10), .F. ) ) } 
oBrwItens:bLast  := {|| ct_rldep->( DBSEEK( Str(Ct_trld->fNumPed,10), .F., .T. ) ) }
oBrwItens:bWhile := {|| ct_rldep->fNumPed = Ct_trld->fNumPed}

oBrwItens:Refresh()   
DBSELECTAREA( 'Ct_trld' )]]>
    </method>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{497,0,396,47}</property>
      <property name="Name">[oLabel1]</property>
      <property name="Caption">[Borderos de Cheques]</property>
      <property name="Justify">[Right]</property>
      <property name="font">
        <font name="Arial" width="0" height="-37" weight="700"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">5</property>
    </style>
  </part>
</part>
