<?xml version="1.0" encoding="UTF-8"?>
<part class="form">
  <style>
    <property name="Geometry">{136,83,1020,650}</property>
    <property name="Name">[xml_dir.scr]</property>
    <property name="Caption">[XMLs disponiveis de Notas Fiscais Eletronicas]</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 zNil := (dbSetOrder(0), dbGoBottom(), dbSkip(-5) )
//skel variavel bDel := {|cXmlFile| if( tb_del(d_ob), fErase( sys_DanfeDir+AllTrim(cXmlFile) ), NIL) }
oContextMenu:=Hwg_ContextMenu()
d_ob:lEditable = .t.
hwg_Btn(oToolbar,5,40,150,70)
hwg_TbMt(oToolbar,'47;ChecaPortalNFE(AllTrim(chnfe));B-Portal ;Acessa Portal NFE com a Chave Selecionada;sembitmap;;;Lucida Sans Unicode;-12;Consultar/&Baixar NFE pelo Certificado Digital;')
// hwg_TbMt(oToolbar,'47;ChecaPortalNFE(AllTrim(chnfe),,xGetEnv("NFC_URL"));B-Portal NFC;Acessa Portal NFC com a Chave Selecionada;sembitmap;;;Lucida Sans Unicode;-12;Consultar/&Baixar NFC pelo Certificado Digital;')
hwg_TbMt(oToolbar,'47;AcbrRecuperaXml(chnfe);R-Recupera ;Recupera XML sem Certificado;sembitmap;;;Lucida Sans Unicode;-12;&Recuperar XML sem Certificado Digital;')
// hwg_TbMt(oToolbar,'47;AcbrRecupXml(chnfe);/-Portal ;Recupera XML pela Chave da NFE;sembitmap;;;Lucida Bright;-12;Recuperar XML sem Certificado;')
hwg_TbMt(oToolbar,'47;NfeXmlSelectFile();S-Copia Xml ;Seleciona XML baixado pelo PortalNFE ou por Email;sembitmap;;;Lucida Sans Unicode;-12;&Copia Xml de Outra Pasta para o Vciga;')
hwg_TbMt(oToolbar,'0;;;espaco;espaco;')
hwg_TbMt(oToolbar,'13;BrwXmlNFE(XmlFile, ChNfe, nNF, recno());Enter-Produtos ;Enter-Exibe Produtos do XML;sembitmap;;;Lucida Sans Unicode;-13;<Enter> &Exibir Produtos do XML;')
hwg_TbMt(oToolbar,'0;;;espaco;espaco;')
hwg_TbMt(oToolbar,'32;BrwXmlAddPed(XmlFile, ChNfe, nNF, recno());Barra-CriaPedido ;Barra-Criar Pedido pelo XML;sembitmap;;;Lucida Sans Unicode;-13;<Barra> Criar &Pedido pelo XML;')
hwg_Btn(oToolbar,5,560,64,64)
hwg_TbMt(oToolbar,'80;tb_pesq(D_OB);P-Pesquisa ;P-Pesquisa;pesquisa.ico;;;;;Pesquisa;;6;')
hwg_TbMt(oToolbar,'79;tb_index(D_OB);O-Ordena ;O-Ordena;ordenar.ico;;;;;Ordena;;6;')
hwg_TbMt(oToolbar,'0;;;espaco;espaco;')
hwg_TbMt(oToolbar,'65;doget(D_ob);A-Edita ;A - Edita Informacoes sobre o XML;alterar.ico;;;;;Editar;;6;')
hwg_TbMt(oToolbar,'7;eVal(bDel,XmlFile);DEL-DELeta ;DEL-Deleta;deletar.ico;;;;;Deleta;;6;')
hwg_TbMt(oToolbar,'73;AcbrRecuperaXml(XmlFile,"imprimir");I-Conferente;I-Imprime DANFe correspondente ao XML;impressora.ico;;;;;&I-ImpDanfe;;6;')


hwg_Btn(oToolbar,930,595,10,24)
hwg_TbMt(oToolbar,'82;BrwXmlNFE(XmlFile, ChNfe, nNF, recno(),,.t.);R-Produtos ;R-Reprocessa Produtos do XML;sembitmap;;;Lucida Sans Unicode;-13;&R-Reprocessa Produtos do XML;;6;')

hwg_Btn(oToolbar,950,560,64,64)
hwg_TbMt(oToolbar,'27;hwg_oDlgKey(oDlg, 27, nBrwAtivo);Saida;Saida;xml\icon\saida.ico;;;;;;;12;')
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() 

odlg:MAXIMIZE()]]>
  </method>
  <method name="onPaint">
    <![CDATA[Parameters oCtrl,hDC
oCtrl:bpaint:=NIL
D_oB:setFocus()]]>
  </method>
  <part class="status">
    <style>
      <property name="Geometry">{0,620,1020,30}</property>
      <property name="Name">[oDlgStatusBar]</property>
      <property name="aParts">{608,152,0}</property>
    </style>
  </part>
  <part class="browse">
    <style>
      <property name="Geometry">{5,114,1007,444}</property>
      <property name="Name">[D_oB]</property>
      <property name="Anchor">15</property>
      <property name="font">
        <font name="Arial" width="0" height="-21" 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[hwg_TbFi(D_oB, 'doc;nfe_cte;C;!!!;3;S;')
hwg_TbFi(D_oB, 'Emitente;razao;C;@S35;32;S;')
hwg_TbFi(D_oB, 'DtEmissao;dEmi;C;@s10;10;S;')
hwg_TbFi(D_oB, 'Valor;vNf;N;@ 9999,999.99;11;S;')
hwg_TbFi(D_oB, 'Numero;nNf;N;999999999;9;S;')
hwg_TbFi(D_oB, 'Sr;Serie;N;!!!;3;S;')
hwg_TbFi(D_oB, 'MeuCod;Cp_Cod_For;N;999999;6;S;')
hwg_TbFi(D_oB, 'Pedido;fsp_movf;C;@s8;8;S;')
hwg_TbFi(D_oB, 'ChaveNfe;chnfe;C;@s44;44;S;')
D_oB:bColorSel:= RGB(3,23,133)
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.,"xml_dir",.F.,.T.,{||.T.} }
sHwgKeyEdit:= 65
d_ob:bEdit := {|D_oB| .t.}
AADD(aBrowses,{D_oB,D_oB:Alias,{||.f.},{|| .T.},})
]]>
    </method>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{9,9,206,33}</property>
      <property name="Name">[oLabel3]</property>
      <property name="Caption">[Entrada por XMLs]</property>
      <property name="font">
        <font name="Arial" width="0" height="-24" weight="400"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">6</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{220,9,651,33}</property>
      <property name="Name">[oLabel1]</property>
      <property name="Caption">[(sys_danfedir)]</property>
      <property name="Justify">[Right]</property>
      <property name="font">
        <font name="Arial" width="0" height="-24" weight="400"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">6</property>
    </style>
  </part>
  <part class="link">
    <style>
      <property name="Geometry">{378,575,393,22}</property>
      <property name="Name">[oLink1]</property>
      <property name="Caption">
[Acessar Portal Nacional da NFE com seu navegador padrao]      </property>
      <property name="Link">
[http://www.nfe.fazenda.gov.br/portal/consultaRecaptcha.aspx?tipoConsulta=completa&amp;tipoConteudo=XbSeqxE8pl8=]      </property>
      <property name="Anchor">6</property>
      <property name="TabIndex">7</property>
    </style>
  </part>
  <part class="link">
    <style>
      <property name="Geometry">{378,595,393,22}</property>
      <property name="Name">[oLink2]</property>
      <property name="Caption">
[Acessar Portal Nacional do CTE com seu navegador padrao]      </property>
      <property name="Link">
[http://www.cte.fazenda.gov.br/consulta.aspx?tipoConsulta=completa&amp;tipoConteudo=mCK/KoCqru0=]      </property>
      <property name="Justify">[Center]</property>
      <property name="Anchor">6</property>
      <property name="TabIndex">7</property>
    </style>
  </part>
</part>
