<?xml version="1.0" encoding="UTF-8"?>
<part class="form">
  <style>
    <property name="Geometry">{3,50,992,636}</property>
    <property name="Name">[SF_LNFE.scr]</property>
    <property name="Caption">[Relação de Notas Geradas NFE]</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">[0 - No Border]</property>
    <property name="nBackColor">14215660</property>
    <property name="Icon">[]</property>
    <property name="Bitmap">[icon\fundo.scr.jpg]</property>
    <property name="NoIcon">.F.</property>
    <property name="SystemMenu">.T.</property>
    <property name="Minimizebox">.T.</property>
    <property name="Maximizebox">.T.</property>
    <property name="AbsAlignment">.T.</property>
    <property name="WindowState">[3 - Maximized]</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 w_colsep = chr(179)
//skel VARIAVEL w_headsep = chr(196)
//skel zFiltEmit = "Val(nfe_nprot)>0" 
//skel VARIAVEL zBlB={|| Zrecn:=recno(),Nfe_CriarLoteXml(froman,fnum), DbGoto(Zrecn)}
//skel VARIAVEL zBlC={|| Zrecn:=recno(),Nfe_ImprimirDanfe(froman,fnum), SetFocus(d_ob), DbGoto(Zrecn)}
//skel VARIAVEL zBlD={|| Zrecn:=recno(),Nfe_EnviarNFE(froman,fnum), DbGoto(Zrecn)}
//skel VARIAVEL zBlE={|| Zrecn:=recno(),Nfe_ConsultarNFE(froman,fnum), DbGoto(Zrecn)}
//skel VARIAVEL zBlF={|| Zrecn:=recno(),Nfe_CancelarNFE(froman,fnum), DbGoto(Zrecn)}
//skel VARIAVEL zBlG={|| Zrecn:=recno(),Nfe_InutilizarNFE(froman,fnum), DbGoto(Zrecn)}
//skel VARIAVEL zBlH={|| Zrecn:=recno(),NFE_AssinarNFe(froman,fnum), DbGoto(Zrecn)}
//skel VARIAVEL zBlI={|| Zrecn:=recno(),NFE_ValidarNFe(froman,fnum), DbGoto(Zrecn)}
//skel VARIAVEL zBlJ={|| Zrecn:=recno(),NFE_Email(froman,fnum), DbGoto(Zrecn)}
//skel VARIAVEL zBlU={|| DbSetFilter(_CreateBlock("val(nfe_nprot)>0"),"val(nfe_nprot)>0"), DbGoTop(), DobRefresh(d_ob) }
//skel VARIAVEL zBlV={|| DbSetFilter(_CreateBlock("'Cancelament'$nfe_xmotiv"),"'Cancelament'$nfe_xmotiv"), DbGoTop(), DobRefresh(d_ob)}
//skel VARIAVEL zBlV={|| DbSetFilter(_CreateBlock("'Inutilizacao'$nfe_xmotiv.and.'Autoriza'$nfe_xmotiv"),"'Inutilizacao'$nfe_xmotiv.and.'Autoriza'$nfe_xmotiv"), DbGoTop(), DobRefresh(d_ob)}
//skel VARIAVEL zBlX={|| DbSetFilter(_CreateBlock("'Inutilizacao'$nfe_xmotiv.and.!'Autoriza'$nfe_xmotiv"),"'Inutilizacao'$nfe_xmotiv.and.!'Autoriza'$nfe_xmotiv"), DbGoTop(), DobRefresh(d_ob)}

 
//skel VARIAVEL zBlZ={|| DbClearFilter(),DbGoTop(),DobRefresh(d_ob)}
oContextMenu:=Hwg_ContextMenu()
hwg_Btn(oToolbar,22,27,54,54)
hwg_TbMt(oToolbar,'66;eval(zBlB);B-Criar_Assinar_Validar ;B - Criar_Assinar_Validar;xml\icon\ass-validar.jpg;47;47;;;')
hwg_TbMt(oToolbar,'0;;;espaco;espaco;')
hwg_TbMt(oToolbar,'68;eval(zBlD);D-Enviar_NFE;D - Enviar_NFE;xml\icon\nfe_enviar.jpg;47;47;;;')
hwg_TbMt(oToolbar,'0;;;espaco;espaco;')
hwg_TbMt(oToolbar,'74;eval(zBlJ);J-Email_NFe ;J - Email_NFe;xml\icon\nfe_email.jpg;47;47;;;')
hwg_TbMt(oToolbar,'0;;;espaco;espaco;')
hwg_TbMt(oToolbar,'69;eval(zBlE);E-Consulta_NFe ;E - Consulta_NFe na Base so SEFAZ;xml\icon\nfe_consulta.jpg;47;47;;;')
hwg_TbMt(oToolbar,'0;;;espaco;espaco;')
hwg_TbMt(oToolbar,'67;eval(zBlC);C-Imprimir_DANFE ;C - Imprimir_DANFE;xml\icon\nfe_imprimir.jpg;47;47;;;')
hwg_TbMt(oToolbar,'0;;;espaco;espaco;')
hwg_TbMt(oToolbar,'70;eval(zBlF);F-Cancelar_NFe ;F - Cancelar_NFe na Base da SEFAZ;xml\icon\nfe_cancelar.jpg;47;47;;;')
hwg_TbMt(oToolbar,'0;;;espaco;espaco;')
hwg_TbMt(oToolbar,'71;eval(zBlG);G-Inutilizar_NFe ;G - Inutilizar_NFe na Base da SEFAZ;xml\icon\nfe_inutilizar.jpg;47;47;;;')
hwg_TbMt(oToolbar,'0;;;espaco;espaco;')
hwg_TbMt(oToolbar,'79;tb_index(D_OB);O-Ordena ;O - Ordena;xml\icon\ordena.jpg;47;47;;;')
hwg_TbMt(oToolbar,'0;;;espaco;espaco;')
hwg_TbMt(oToolbar,'66;tb_insert(D_OB);Reimportar NFE ;Reimportar NFE;;;')
hwg_TbMt(oToolbar,'0;;;espaco;espaco;')
//hwg_TbMt(oToolbar,'13;doget(D_ob);Enter-Editar ;Enter-Edita coluna;;;')
hwg_Btn(oToolbar,250,530,70,70)
hwg_TbMt(oToolbar,'0;;;espaco;espaco;')
hwg_TbMt(oToolbar,'27;Eval(zBlU);Emitidas;Emitidas;xml\icon\nfe_enviadas.jpg;47;47;;;')
hwg_TbMt(oToolbar,'27;Eval(zBlV);Canceladas;Canceladas;xml\icon\nfe_canceladas.jpg;47;47;;;')
hwg_TbMt(oToolbar,'27;Eval(zBlX);Inutilizadas;Inutilizadas;xml\icon\nfe_inutilizadas.jpg;47;47;;;')
hwg_TbMt(oToolbar,'27;Eval(zBlZ);Todas;Todas;xml\icon\nfe_todas.jpg;47;47;;;')
hwg_TbMt(oToolbar,'27;hwg_oDlgKey(oDlg, 27, nBrwAtivo);Saida;Saida;xml\icon\saida.ico;28;28;;;;')
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()]]>
  </method>
  <method name="onPaint">
    <![CDATA[Parameters oCtrl,hDC
oCtrl:bpaint:=NIL
D_oB:setFocus()]]>
  </method>
  <part class="status">
    <style>
      <property name="Geometry">{0,606,992,30}</property>
      <property name="Name">[oDlgStatusBar]</property>
      <property name="aParts">{640,160,0}</property>
    </style>
  </part>
  <part class="browse">
    <style>
      <property name="Geometry">{19,110,967,398}</property>
      <property name="Name">[D_oB]</property>
      <property name="Anchor">240</property>
      <property name="TabIndex">4</property>
    </style>
    <method name="onGetFocus">
      <![CDATA[nBrwAtivo:=1]]>
    </method>
    <method name="onInit">
      <![CDATA[D_oB:bColorSel:= RGB(3,23,133)
D_oB:tColorSel:= RGB(255,255,255)
D_oB:bKeyDown := {|self, wParam| (aBrowses[nBrwAtivo,2])->(hwg_oDlgKey(self, wparam,1)) , .T. }
hwg_TbFi(D_oB, 'Numero Lote;froman;N;999999;  9;N;')
hwg_TbFi(D_oB, 'Numero NF;fnum;N;999999;  8;;')
hwg_TbFi(D_oB, 'Ok?   ;nfe_valid;C;!!!!;4;;')
hwg_TbFi(D_oB, 'DANFE  ;nfe_prt;C;!;8;;')
hwg_TbFi(D_oB, 'Dtata Lote ;fData;D;; 10;;')
hwg_TbFi(D_oB, 'Status  ;NFE_CSTAT;C;9999;7;;')
hwg_TbFi(D_oB, 'Numero Protocolo;nfe_nprot;C;@18;18;;')
hwg_TbFi(D_oB, 'Email;nfe_email;C;!;5;;')
hwg_TbFi(D_oB, 'Obs  ;nfe_xmotiv;C;@S58;40;;')
hwg_TbFi(D_oB, 'Chave  ;nfe_chnfe;C;@S44;44;;')
hwg_TbFi(D_oB, 'XML  ;nfe_xml;C;@S75;74;;')
hwg_TbFi(D_oB, 'Numero Recibo  ;nfe_nrec;C;@18;18;;')
D_oB:Alias := alias()
DBGOBottom()
DbSkip( 0-D_oB:RowCount )
D_oB:bOther:={|o,m,wp,lp| MessagesBrowse(o,m,wp,lp)}
D_oB:cargo:={.T.,.T.,"SF_LNFE",.F.,.T.,{||.T.} }
AADD(aBrowses,{D_oB,D_oB:Alias,{||.f.},{|| .T.},})]]>
    </method>
    <method name="onPaint">
      <![CDATA[SETFOCUS(d_Ob) 
      if select("sf_lnfe")=0
Abra ('1', R_SIGA, "SF_LNFE", "SF_LNFE", "SF_LNFE", 'FROMAN', "SF_ROMA2", 'FNUM') 
else
select sf_lnfe
endif
DBSEEK(m_froman)]]>
    </method>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{68,520,163,19}</property>
      <property name="Name">[oLabel1]</property>
      <property name="Caption">[Filtros Para Exibição:]</property>
      <property name="font">
        <font name="Arial" width="0" height="-16" weight="400"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">5</property>
    </style>
  </part>
</part>
