<?xml version="1.0" encoding="UTF-8"?>
<part class="form">
  <style>
    <property name="Geometry">{297,123,1030,528}</property>
    <property name="Name">[SF_NFE.scr]</property>
    <property name="Caption">[Relacao 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\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">[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
// oDlg:Move( , , MAX(798,GetDesktopWidth()*0.95), MAX(570,GetDesktopHeight()*0.90), 1 )
oDlg:CENTER()
//skel variavel m_fnum:=sf_fatnf->fNum
//skel variavel m_pDesc:="Lancamentos da "+if(sf_fatnf->fCodop="1.918","Devolucao","Relocacao")+" (Ped "+lTrim(Str(Abs(m_fnum),10))+") Referente ao Aditivo ("+lTrim(Str(Abs(sf_fatnf->pfnum),10))+")"+Space(20)
//skel VARIAVEL zBlkPrd = {|nPcod| se_prod->(dbseek(nPcod)), se_prod->pdesc }
//skel VARIAVEL znil := OrdScope(0, m_fnum)
//skel VARIAVEL znil := OrdScope(1, m_fnum)
//skel comando saida znil := (OrdScope(0),OrdScope(1))

//oContextMenu:=Hwg_ContextMenu()
//hwg_Btn(oToolbar,11,45,54,54)
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>
  <part class="status">
    <style>
      <property name="Geometry">{0,498,1030,30}</property>
      <property name="Name">[oDlgStatusBar]</property>
      <property name="aParts">{640,160,0}</property>
    </style>
  </part>
  <part class="browse">
    <style>
      <property name="Geometry">{3,94,1025,359}</property>
      <property name="Name">[D_oB]</property>
      <property name="font">
        <font name="Arial" width="0" height="-13" weight="400"/>
      </property>
      <property name="Border">.F.</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, 'Prod;Pcod;N;999999;6;;;')
hwg_TbFi(@D_oB, 'Descricao;eVal(zBlkPrd,pcod);C;@S50;50;;')
IF sys_segmento='locacao'
   hwg_TbFi(@D_oB, 'Quant;if(sf_fatnf->fgdev="E","",TRANSFORM(mQuant,"@e 9999999"));P;@S8;8;N;')
   hwg_TbFi(@D_oB, 'Devol;if(sf_fatnf->fgdev="E",mQuant,mQdevol) ;P;@e 9999999;8;N;')
   hwg_TbFi(@D_oB, 'Locadas;if(sf_fatnf->fgdev="E","",TRANSFORM(mQuant-mQdevol,"@e 9999999"));P;@S8;8;N;')
   hwg_TbFi(@D_oB, 'LocMensal;pValLoca;N;@E 9999.99;9;;')
ELSE
   hwg_TbFi(@D_oB, 'Quant;mQuant;N;999999.99;9;N;')
endif
hwg_TbFi(@D_oB, '*;mFgEs;C;!;1;;')
hwg_TbFi(D_oB, 'IndenizUnt;mValor/mQuant;P;9999999.99;10;;')
hwg_TbFi(@D_oB, 'TotIndeniz;mValor;N;9999999.99;10;;')
hwg_TbFi(@D_oB, 'Un;se_prod->pUNIDADE;C;XXX;3;;')
hwg_TbFi(@D_oB, 'CFOP;pCfop;C;XXXXX;5;S;')
IF sys_segmento='locacao'
   hwg_TbFi(@D_oB, 'Quant;mQuant;N;@e 9999.999;8;S;')
   hwg_TbFi(@D_oB, 'QtdJaDev;mQdevol;N;@e 9999.999;8;S;')
ENDIF
hwg_TbFi(D_oB, 'Controle;mFnum;N;999999999;9;;')
hwg_TbFi(@D_oB, 'NCM;se_prod->pcodclafis;N;99999999;8;;')
hwg_TbFi(@D_oB, 'ST;se_prod->pCATEGORIA;C;XXX;3;;')
hwg_TbFi(@D_oB, 'CodBarra;se_prod->pdic6;N;9999999999999;13;;')

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.,"SE_MOVNF",.F.,.T.,{||.T.} }
aAdd(aBrowses,{D_oB,D_oB:Alias,{||.f.},{|| .T.},})

D_oB:lFilter := .T.
D_oB:bFor := {|| se_movnf->mCodForc=Sf_FatNf->fCli .AND. se_movnf->fNumPed=sf_fatnf->fNumPed } 
D_oB:bFirst := {|| se_movnf->( DBSEEK( Sf_FatNf->fnum, .F. ) ) } 
D_oB:bLast  := {|| se_movnf->( DBSEEK( Sf_FatNf->fnum , .F., .T. ) ) }
D_oB:bWhile := {|| se_movnf->mfnum = Sf_FatNf->fnum }

// alert('definiu D_oB:alias '+D_oB:alias+' Sf_FatNf->fnum '+str(Sf_FatNf->fnum,6)+ ' D_oB:nColumns '+str(D_oB:nColumns,4) )
]]>
    </method>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{3,9,726,80}</property>
      <property name="Name">[oPdesc]</property>
      <property name="varName">[m_pDesc]</property>
      <property name="Anchor">240</property>
      <property name="TextColor">16777215</property>
      <property name="BackColor">4194304</property>
      <property name="Transparent">.T.</property>
      <property name="font">
        <font name="Arial" width="0" height="-32" weight="700"/>
      </property>
      <property name="Multiline">.T.</property>
      <property name="FormatText">[UPPERCASE]</property>
      <property name="cPicture">[]</property>
      <property name="Border">.F.</property>
      <property name="3DLook">.T.</property>
      <property name="TabIndex">7</property>
    </style>
    <method name="onGetFocus">
      <![CDATA[.f.]]>
    </method>
  </part>
  <part class="button">
    <style>
      <property name="Geometry">{940,460,79,24}</property>
      <property name="Name">[oButton1]</property>
      <property name="Id">[IDCANCEL]</property>
      <property name="Caption">[Esc - Sair]</property>
      <property name="TabIndex">8</property>
    </style>
  </part>
</part>
