<?xml version="1.0" encoding="UTF-8"?>
<part class="form">
  <style>
    <property name="Geometry">{308,132,1022,598}</property>
    <property name="Name">[ci_mde.scr]</property>
    <property name="Caption">[Emissoes para meu CNPJ]</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 
//skel VARIAVEL zbCor=""
//skel VARIAVEL znAzul0:=16711680
//skel VARIAVEL znAzul1:=10027008
//skel VARIAVEL zAzul2:=16776960
//skel VARIAVEL zW:=16777215
//skel VARIAVEL zBlack:=0
//skel VARIAVEL zRed:=255
//skel VARIAVEL zGreen:=32768
//skel VARIAVEL znCinza:=8421504
//skel VARIAVEL zYellow:=65535
//skel VARIAVEL zFgUsaCores:=(xGetEnv("USA_CORES_NO_BROWSE")="S")
//skel VARIAVEL zSitManifestacao:={||Ci_MDe('situacao_de_chavenfe', cSitNfe)}

oContextMenu:=Hwg_ContextMenu()
hwg_Btn(oToolbar,5,5,100,64)

hwg_TbMt(oToolbar,'49;Ci_MDe("cnf_ciencia");1-Ciencia;1 - Confirma ciencia e efetua Download da NFE;sembitmap;;;Lucida Bright;-11;&1-Ciencia;;;')
hwg_TbMt(oToolbar,'13;Ci_MDe("downloadnfe");D-Download;D - Efetua Download da NFE;sembitmap;;;Lucida Bright;-11;Download;;;')
hwg_TbMt(oToolbar,'50;Ci_MDe("cnf_desconhecimento");2-Desconheco;2 - Informa Desconhecimento da Operacao;sembitmap;;;Lucida Bright;-11;&2-Desconheco;;;')
hwg_TbMt(oToolbar,'51;Ci_MDe("cnf_recebida_ok");3-Recebi_ok;3 - Confirma que a operacao e o recebimento foram oks;sembitmap;;;Lucida Bright;-11;&3-Recebi_ok;;;')
hwg_TbMt(oToolbar,'52;Ci_MDe("cnf_devolvida");4-Rejeitei;4 - Declara que nao efetuou confirmacao final da compra/operacao;sembitmap;;;Lucida Bright;-11;&4-Nao_Recebi_Ok;;;')
hwg_TbMt(oToolbar,'52;ChecaPortalNFE(AllTrim(ChNfe));5-BaixaCert;5 - Efetua download do XML direto do Site COM Certificado Digital, com CAPTCHA;sembitmap;;;Lucida Bright;-11;&5-BaixaCert;;;')
hwg_TbMt(oToolbar,'52;ChecaPortalNFE(AllTrim(ChNfe),4,"www.fsist.com.br");6-BaixaSemCert;6 - Efetua download DO XML direto do Site SEM Certificado Digital, com CAPTCHA;sembitmap;;;Lucida Bright;-11;&6-BaixaSemCert;;;')

hwg_Btn(oToolbar,10,544,70,24)
hwg_TbMt(oToolbar,'79;tb_index(D_OB);O-Ordena ;O-Ordena a coluna do cursor;sembitmap;;;Lucida Bright;-11;&O-Ordena;;6;')
hwg_TbMt(oToolbar,'80;tb_pesq(D_OB);P-Pesquisa ;P-Pesquisa na coluna do cursor;sembitmap;;;Lucida Bright;-11;&P-Pesquisa;;6;')

hwg_TbMt(oToolbar,'84;tb_locate(D_oB);T-Busca_Trecho ;T-Pesquisa Trecho na coluna do cursor;sembitmap;;;Lucida Bright;-11;&T-Trecho;;6;')
hwg_TbMt(oToolbar,'76;tb_locate(D_oB);L-Busca_Iniciais ;L-Busca pelas Iniciais na coluna do cursor;sembitmap;;;Lucida Bright;-11;&L-Iniciais;;6;')
hwg_TbMt(oToolbar,'67;tb_locate(D_oB);C-Repete_Busca ;C-Repete Busca na coluna do cursor;sembitmap;;;Lucida Bright;-11;&C-Continua;;6;')
hwg_TbMt(oToolbar,'70;tb_filter(d_ob);F-Filtra ;F-Filtra Cursor;sembitmap;;;Lucida Bright;-11;&F-Filtra;;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()
if type("oDlgStatusBar")="B"
   oDlgStatusBar:Anchor:=14
endif

         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,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,458}</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="onInit">
      <![CDATA[   if zFgUsaCores
      zbCor:={||if(cSitNfe$"23".or.tpNF="0",{znCinza,zW,zW,znCinza},IF(FG_FAT=" ",if( Day(DT_OP_OK)>0.or.Day(DT_KNOWN)>0,{znAzul0,zW,zW,znAzul0},{zRed,zW,zW,zRed}),if(FG_FAT="D",{znAzul0,zW,zW,znAzul0},{zGreen,zW,zW,zGreen})))}
      hwg_TbFi(D_oB, 'DtEmissao;DEMI;D;;  8;N;zbCor;')
      hwg_TbFi(D_oB, 'Emitente;XNOME;C;@S30; 30;N;zbCor;')
      hwg_TbFi(D_oB, 'ValorNf;VNF;N;999999999.99; 14;N;zbCor;')
      hwg_TbFi(D_oB, 'Situacao;eVal(zSitManifestacao);P;@S20; 20;N;zbCor;')
      hwg_TbFi(D_oB, 'TpNf;if(TPNF="1",if(file(sys_DanfeDir+ChNfe+"-nfe.xml"),"* Download ja OK","Sou Destinatario"),"Remetente de Devolucao");P;@S22;22;N;zbCor;')
   else
      hwg_TbFi(D_oB, 'DtEmissao;DEMI;D;;  8;N;;')
      hwg_TbFi(D_oB, 'Emitente;XNOME;C;@S30; 30;N;;')
      hwg_TbFi(D_oB, 'ValorNf;VNF;N;999999999.99; 14;N;;')
      hwg_TbFi(D_oB, 'Situacao;if(FG_FAT=" ",eVal(zSitManifestacao),"Entrada Confirmada");P;@S20; 20;N;;')
      hwg_TbFi(D_oB, 'TpNf;if(TPNF="1","Sou Destinatario","Remetente de Devolucao");P;@S22;22;N;;')
   endif
   hwg_TbFi(D_oB, 'NF;Val(SubStr(CHNFE,26,9));P;@S9;9;N;')
   hwg_TbFi(D_oB, 'ChaveNFe;CHNFE;C;@S44; 44;S;')
   hwg_TbFi(D_oB, 'CNPJ_Emit;CNPJ;C;@S14; 14;S;')
   hwg_TbFi(D_oB, 'Forn;PFFOR;N;999999;  6;S;')
   hwg_TbFi(D_oB, 'NF;PFNUM;N;999999999;  9;S;')
   hwg_TbFi(D_oB, 'DataCheg;PFDATACHE;D;;  8;S;')
   hwg_TbFi(D_oB, 'NSU;NSU;N;999999;6;N;')
   hwg_TbFi(D_oB, 'IE;IE;C;@S18; 18;S;')
   hwg_TbFi(D_oB, 'SitNf;CSITNFE;C;x;1;N;')
D_oB:bColorSel:= RGB(3,23,233)
D_oB:tColorSel:= RGB(255,255,255)
D_oB:Alias := alias()
d_ob:lEditable := .t.
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.,"CI_MDE",.F.,.T.,{||.T.} }
// d_ob:bEdit := {|D_oB| .t.}
AADD(aBrowses,{D_oB,D_oB:Alias,{||.f.},{|| .T.},})
]]>
    </method>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{715,0,163,67}</property>
      <property name="Name">[oLabel1]</property>
      <property name="Caption">
[Operacoes onde meu CNPJ foi Destinatario ou Remetente]      </property>
      <property name="Justify">[Right]</property>
      <property name="TextColor">16711680</property>
      <property name="BackColor">16777215</property>
      <property name="font">
        <font name="Arial" width="0" height="-16" weight="400" italic="255"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">5</property>
    </style>
  </part>
</part>
