<?xml version="1.0" encoding="UTF-8"?>
<part class="form">
  <style>
    <property name="Geometry">{74,82,1022,598}</property>
    <property name="Name">[vb_roman_abertos.scr]</property>
    <property name="Caption">[Relacao de Romaneios]</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 zBlCli := {|nCli| sccrcli->( if(nCli<>Recno(),DbGoTo(nCli),""), str(nCli,6)+"-"+cr_nome) }
//skel variavel zbIsGed := {|nCli,cTipoEnc,nfNum,nFnumPed|sccrcli->(DbGoTo(nCli),Ged_Files("locacao",if(cTipoEnc="DV","COMPROVANTE","ADITIVO"),Cr_Cgc,nfNum,nfNumPed))}
//skel VARIAVEL zbPrt:= {||z_recno:=Recno(), Relat('imp_rom("-'+LTRIM(STR(Romaneio))+'")' ,"nb",,"X") , eVal(zbOpenAll) }

d_ob:lEditable = .t.
oContextMenu:=Hwg_ContextMenu()
hwg_Btn(oToolbar,5,5,64,64)
hwg_TbMt(oToolbar,' 13;marca(D_ob,"Quita_KmRetorno");K-KM_Retorno ;K- Informar Km Retorno;transportador.ico;;;Lucida Bright;-11;&K-KmRetorno;;;')
hwg_TbMt(oToolbar,' 73;eVal(zbPrt);I-Imprime Listagem;I-Imprime;impressora.ico;;;;;&I-Imprime;;;')
hwg_TbMt(oToolbar,' 79;tb_index(D_OB);O-Ordena ;O-Ordena a coluna do cursor;ordenar.ico;;;;;&O-Ordena;;;')
hwg_Btn(oToolbar,10,544,70,24)
hwg_TbMt(oToolbar,'32;doget(D_OB);Barra-Edita ;Barra - Edita;sembitmap;;;Lucida Bright;-11;Edita;;6;')
hwg_TbMt(oToolbar,'82;dbgobottom();P-Fim_do_arquivo ;P - Fim_do_arquivo;sembitmap;;;Lucida Bright;-11;&P-Fim_do_arquivo;;6;')
// hwg_TbMt(oToolbar,'7;tb_delR(d_ob);Del-Exclui;Del-Exclui o romaneio selecionado;sembitmap;;;Lucida Bright;-11;Deleta;;6;')
hwg_TbMt(oToolbar,'7;tb_delR(d_ob,vb_roman->romaneio,vb_movro->(Recno()));Del-DelItem;Del-Exclui o item selecionado do Romaneio;sembitmap;;;Lucida Bright;-11;Del_Item;;6;')
//hwg_TbMt(oToolbar,'  7;tb_delR(d_ob);Del-Exclui Romaneio;Del-Deleta;deletar.ico;;;;;Deleta;;;')

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()

oBrwItens:Refresh()]]>
  </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">{9,77,1000,253}</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, 'Romaneio;Romaneio;N;999999; 6;N;')
hwg_TbFi(@D_oB,'Tempo;PadL( AllTrim( hhmmss(Tempo_Seg(HoraS,time(),rData,Date()))),14," ");P;@S14;14;N;')
hwg_TbFi(D_oB, 'Ent;entgd;N;999; 3;N;')
hwg_TbFi(D_oB, 'Data;rdata;D;99.99.99; 8;N;')
hwg_TbFi(D_oB, 'Saida;horas;C;99:99:99; 8;N;')
hwg_TbFi(D_oB, 'Valor;rval;N;999999999.99; 12;N;')
hwg_TbFi(D_oB, 'KmSaida;kms;N;999999;6;S;')
hwg_TbFi(D_oB, 'USUARIO;USUARIO;C;@S8;8;N;')
hwg_TbFi(D_oB, 'Vd;RVEND;N;999;  3;N;')
hwg_TbFi(D_oB, 'Cups;numped;N;999;  3;N;')
hwg_TbFi(D_oB, 'Codigo;NRECNO;N;999999;  6;N;')
//hwg_TbFi(D_oB, 'Volta;horav;C;99:99:99;  8;;')
//hwg_TbFi(D_oB, 'KmVolta;kmv;N;999999;6;S;')
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.,"_roman",.F.,.T.,{||.T.} }
d_ob:bEdit := {|D_oB| .t.}
sHwgKeyEdit:= 32
AADD(aBrowses,{D_oB,D_oB:Alias,{||.f.},{|| .T.},})
]]>
    </method>
  </part>
  <part class="browse">
    <style>
      <property name="Geometry">{9,342,1000,177}</property>
      <property name="Name">[oBrwItens]</property>
      <property name="Anchor">6</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[oBrwItens:Alias := 'vb_movro'
oBrwItens:bColorSel:= RGB(3,23,133)
oBrwItens:tColorSel:= RGB(255,255,255)
DBSELECTAREA( 'vb_movro' ) 
   hwg_TbFi(@oBrwItens,'tr;if(fTipoEnc="AV","Avulso",if(fTipoEnc="VD","Entrega","Devolucao"));P;@S9;9;N;')
   hwg_TbFi(@oBrwItens,'Hora  Cx;left(FHORA,5)+" "+StrZero(si_caixa,2);C;@S8;8;N;')
   hwg_TbFi(@oBrwItens,'Bairro;CR_BAIRRO;C;@S15;15;N;')
   hwg_TbFi(@oBrwItens,'Cliente/Motivo;CR_NOME;C;@S40;40;N;')
   if sys_segmento='locacao'
      hwg_TbFi(@oBrwItens,'Situacao Recibo;IF(fTipoEnc="AV","Avulso",if( eVal(zbIsGed,fCli,fTipoEnc,fNum,fNumPed), "DIGITALIZADO", "NAO_DIGITALIZADO") );P;@S16;16;N;')
      hwg_TbFi(@oBrwItens,'Pedido;fnumped;N;999999;6;N;')
      hwg_TbFi(@oBrwItens,'Cfop;fCodOp;C;@S5;6;N;')
      hwg_TbFi(@oBrwItens,'t;fgdev;C;!;1;N;')
   else
      hwg_TbFi(@oBrwItens,'Cupom;fnumped;N;999999;6;N;')
      hwg_TbFi(@oBrwItens,'Valor;ftipoenc+str(fvAL,9,2);X;@s11;11;N;')
   endif

oBrwItens:lFilter := .T.
oBrwItens:bFirst := {|| vb_movro->( DBSEEK( _roman->romaneio, .F. ) ) } 
oBrwItens:bLast  := {|| vb_movro->( DBSEEK( _roman->romaneio, .F., .T. ) ) }
oBrwItens:bWhile := {|| vb_movro->romaneio = _roman->romaneio}
oBrwItens:Refresh()
DbSelectArea( '_roman' )
]]>
    </method>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{305,7,558,68}</property>
      <property name="Name">[oLabel1]</property>
      <property name="Caption">
[Tecle ENTER sobre o romaneio a informar KM retorno e liberar o Veiculo]      </property>
      <property name="Justify">[Right]</property>
      <property name="TextColor">16711680</property>
      <property name="font">
        <font name="Arial" width="0" height="-29" weight="700"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="ToolTip">
[Apos confirmar o retorno do Veiculo e Motorista, o romaneio ficara ainda com a pendencia de que seja confirmado o recebimento de cada cupom da entrega, ou pendente de que seja confirmado o retorno de itens recolhidos nas operacoes de devolucao]      </property>
      <property name="TabIndex">5</property>
    </style>
  </part>
</part>
