<?xml version="1.0" encoding="UTF-8"?>
<part class="form">
  <style>
    <property name="Geometry">{304,17,1020,650}</property>
    <property name="Name">[xml_mov.scr]</property>
    <property name="Caption">[Produtos disponiveis no XML]</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 = ( Abra("0NOIDX",r_siga,SE_PROD,"SE_PROD",SEIP_C,"PCOD"), DbSelectArea("xml_mov") )
//skel VARIAVEL zBlkDesc = {|nPcod| if(se_prod->(dbseek(nPcod)),se_prod->pdesc,"Nao Associado/Cadastrado") }
//skel VARIAVEL zBlkUnid = {|nPcod| se_prod->( if(nPcod=pCod.or.dbseek(nPcod),pUnidade,"") ) }
//skel VARIAVEL zbPrtConferente := {|| zrecn:=recno(), Relat('lst_exec("XML_CONFERENTE")',"nb","DontCloseNaSaida","X"), DbGoto(zRecn) }

//skel COMANDO DEPOIS zNil = if( select("se_prod")>0, se_prod->(DbCloseArea()), "")

//--- //skel VARIAVEL zbPrtRelat := {|| zrecn:=recno(), Relat('lst_exec("CR_RECFX")',"nb"), eVal(zbReopenAll), DbGoTo(zRecn) }

oContextMenu:=Hwg_ContextMenu()
hwg_Btn(oToolbar,5,5,54,54)
d_ob:lEditable = .t.
hwg_TbMt(oToolbar,"69;doget(D_ob);E-Edita ;E - Edita;;")
hwg_TbMt(oToolbar,"80;tb_pesq(D_OB);P-Pesquisa ;P-Pesquisa;;")
hwg_TbMt(oToolbar,"84;tb_locate(D_oB);T-Trecho ;T-Acha Trecho;;")
hwg_TbMt(oToolbar,"76;tb_locate(D_oB);L-Iniciais ;L-Acha Trecho;;")
hwg_TbMt(oToolbar,"67;tb_locate(D_oB);C-Repete_Busca ;C-Acha Trecho;;")
hwg_TbMt(oToolbar,"79;tb_index(D_OB);O-Ordena ;O-Ordena;;")
// hwg_TbMt(oToolbar,"73;lst_alias(D_OB);I-Imprime ;I-Imprime;;")
hwg_TbMt(oToolbar,"70;tb_filter(d_ob);F-Filtra ;F-Filtra Cursor;;")
hwg_TbMt(oToolbar,"0;;;espaco;espaco;")
hwg_TbMt(oToolbar,"0;;;espaco;espaco;")
// hwg_Btn(oToolbar,380-120,533+22,150,70)
hwg_Btn(oToolbar,380-120-120,533+22,150,70)
hwg_TbMt(oToolbar,'13;XmlMov_BrwPrds(d_ob,xProd);Enter;Enter-Associa Produto;sembitmap;;;Lucida Bright;-12;<Enter> Associa Item do XML a produto ja cadastrado;;6;')
hwg_TbMt(oToolbar,'22;InsertProdByXml("EDIT");Insert;Insert-Adiciona Produto;sembitmap;;;Lucida Bright;-12;<Ins> Adiciona Produto Sem Cadastro pelo Item do XML;;6;')
hwg_TbMt(oToolbar,'32;ChecaDicForn(,,,"INSERT_AUTO");TODOS;Barra-Adiciona TODOS;sembitmap;;;Lucida Bright;-12;<Barra> Adiciona TODOS os Produtos sem Cadastro;;6;')
 
hwg_TbMt(oToolbar,'7;DesCadastraPcodNoDicForn(,Pcod);Desassociar;Del-Desassocia Produto;sembitmap;;;Lucida Bright;-12;<Del> Desassocia produto do Dicionario de Codigos;;6;')
hwg_TbMt(oToolbar,'-1;DicFornOk(pCod,"SET_EQUIVALENCIA",d_ob);F2-Conversao de Unidades;F2-Conversao de Unidades;sembitmap;;;Lucida Bright;-12;F2-Conversao de Unidades;;6;')

hwg_TbMt(oToolbar,' 73;eVal(zbPrtConferente);I-Conferente;I-Imprime o Conferente de separacao de produtos;impressora.ico;;;;;&I-Conferente;;6;')

hwg_TbMt(oToolbar,'27;hwg_oDlgKey(oDlg, 27, nBrwAtivo);Saida;Saida;xml\icon\sair.ico;;;;;;;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() 
oDlg:MAXIMIZE()

CiSetKey( "VK_F2","DicFornOk(pCod,'SET_EQUIVALENCIA',d_ob)",,,"F2:Conversao de Unidades")
]]>
  </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">{7,147,1004,409}</property>
      <property name="Name">[D_oB]</property>
      <property name="Anchor">15</property>
      <property name="font">
        <font name="Arial" width="0" height="-13" 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[DBSELECTAREA("xml_mov")
D_oB:Alias := alias()

hwg_TbFi(D_oB, 'MeuCod;Pcod;N;999999;6;S;')
hwg_TbFi(D_oB, 'Qtd_XML;qCom;N;99999.999;9;S;')
hwg_TbFi(D_oB, 'Und_XML;uCom;C;@S5;5;S;')
IF sFgConfereXml
   hwg_TbFi(D_oB, 'QtdConf;qtdConf;N;99999.999;9;S;')
endif
if sFgContaPecas
   hwg_TbFi(D_oB, 'QPerfis;pPecas;N;99999;8;S;')
   IF sFgConfereXml
      hwg_TbFi(D_oB, 'QPerfCnf;pPecasConf;N;99999;8;S;')
   ENDIF
endif
hwg_TbFi(D_oB, 'PrUntXML;vUnCom;N;99999.999;9;S;')
hwg_TbFi(D_oB, 'PrTotXML;vProd;N;99999.99;8;S;')
hwg_TbFi(D_oB, 'Descricao XML;xProd;C;@S30;30;S;')
hwg_TbFi(D_oB, 'Minha Descricao;DicFornOk(pcod)+pDesc;P;@S24;22;N;')
hwg_TbFi(D_oB, 'MinhaUnd;pUnidade;C;@S7;7;S;')
hwg_TbFi(D_oB, 'Qtd1Est;pitens;C;9999.999;8;S;')
IF sys_segmento='farma'
   hwg_TbFi(D_oB, 'PMC;vpmc;N;9999.99;7;S;')
   hwg_TbFi(D_oB, 'MeuPrVenda;if(pcod>0,(znpCod:=pCod,se_prod->(pcod=znpCod.or.DbSeek(znpCod),pVluVenda)),0);P;9999.99;7;S;')
   hwg_TbFi(D_oB, 'Lote?;if(se_prod->pPedeLote="S","PedeLOTE","");P;@S8;8;N;')
endif
hwg_TbFi(D_oB, 'CFOP;cfop;C;9999;4;N;')
hwg_TbFi(D_oB, 'NCM;ncm;C;@s9;9;N;')
hwg_TbFi(D_oB, 'Minha Finalidade;if(pCod>0,se_prod->(Ptipoitem+" "+Efd_TipoItem()),"");P;@S15;15;N;')
hwg_TbFi(D_oB, 'CodForn;cProd;C;@S30;10;S;')
hwg_TbFi(D_oB, 'Ean;cEAN;C;@S13;13;S;')
hwg_TbFi(D_oB, 'MeuPrCst;pVluVen3;N;999999.99;9;N;')
hwg_TbFi(D_oB, 'PrXML;vUnCom/if(pitens>0,pItens,1);P;999999.99;9;N;')
hwg_TbFi(D_oB, 'IndTot;indTot;C;X;6;N;')
hwg_TbFi(D_oB, 'Orig;ICM_orig;C;X;4;N;')
hwg_TbFi(D_oB, 'CstIcm;ICM_Cst;C;XXX;6;N;')
hwg_TbFi(D_oB, 'modBC;ICM_modBC;C;X;5;N;')
hwg_TbFi(D_oB, 'BaseIcm;ICM_vBC;N;99999.99;9;N;')
hwg_TbFi(D_oB, '%Icm;ICM_pICMS;N;99.99;5;N;')
hwg_TbFi(D_oB, 'Val_Icm;ICM_vICMS;N;99999.99;9;N;')
hwg_TbFi(D_oB, 'modBCST;ICM_mBCST;C;X;7;N;')
hwg_TbFi(D_oB, 'BaseIcmST;ICM_vBCST;N;99999.99;9;N;')
hwg_TbFi(D_oB, '%IcmST;ICM_pICMST;N;99.99;6;N;')
hwg_TbFi(D_oB, 'Val_IcmST;ICM_vICMST;N;99999.99;9;N;')
hwg_TbFi(D_oB, '%AgrST;ICM_pMVAST;N;99.99;6;N;')
hwg_TbFi(D_oB, 'CstPIS;PIS_CST;C;XXX;6;N;')
hwg_TbFi(D_oB, 'BasePIS;PIS_vBC;N;99999.99;9;N;')
hwg_TbFi(D_oB, '%PIS;PIS_pPIS;N;99.99;5;N;')
hwg_TbFi(D_oB, 'Val_PIS;PIS_vPIS;N;99999.99;9;N;')
hwg_TbFi(D_oB, 'CstCOF;COF_CST;C;XXX;6;N;')
hwg_TbFi(D_oB, 'BasePIS;COF_vBC;N;99999.99;9;N;')
hwg_TbFi(D_oB, '%Cof;COF_pCOF;N;99.99;5;N;')
hwg_TbFi(D_oB, 'Val_Cof;COF_vCOF;N;99999.99;9;N;')
D_oB:bColorSel:= RGB(3,23,133)
D_oB:tColorSel:= RGB(255,255,255)
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_mov",.F.,.T.,{||.T.} }
sHwgKeyEdit:= 65
d_ob:bEdit := {|D_oB| .t.}
AADD(aBrowses,{D_oB,D_oB:Alias,{||.f.},{|| .T.},})
]]>
    </method>
  </part>
  <part class="group">
    <style>
      <property name="Geometry">{13,63,490,79}</property>
      <property name="Name">[oGroup1]</property>
      <property name="Caption">
[(&quot;Dados da NF &quot;+StrZero(m_fNum,10)+&quot;,  &quot;+m_cp_nome+&quot; (Cod: &quot;+Ltrim(Str(m_cp_cod_for,6))+&quot;)&quot;)]      </property>
      <property name="BackColor">16744576</property>
      <property name="Transparent">.T.</property>
      <property name="font">
        <font name="Arial" width="0" height="-16" weight="400"/>
      </property>
      <property name="TabIndex">6</property>
    </style>
    <part class="label">
      <style>
        <property name="Geometry">{55,86,141,19}</property>
        <property name="Name">[oLabel3]</property>
        <property name="Caption">[Valor dos Produtos]</property>
        <property name="Justify">[Right]</property>
        <property name="TextColor">4194304</property>
        <property name="font">
          <font name="Arial" width="0" height="-13" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">8</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{306,86,141,19}</property>
        <property name="Name">[oLabel2]</property>
        <property name="Caption">[Valor NF]</property>
        <property name="Justify">[Right]</property>
        <property name="TextColor">4194304</property>
        <property name="font">
          <font name="Arial" width="0" height="-13" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">8</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{41,107,156,33}</property>
        <property name="Name">[oLabel1]</property>
        <property name="Caption">[(Transform(m_fvalprod,&quot;@E 999999,999.99&quot;))]</property>
        <property name="Justify">[Right]</property>
        <property name="TextColor">4194304</property>
        <property name="font">
          <font name="Arial" width="0" height="-21" weight="700"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">10</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{287,107,163,33}</property>
        <property name="Name">[oLabel4]</property>
        <property name="Caption">[(Transform(m_fval,&quot;@E 999999,999.99&quot;))]</property>
        <property name="Justify">[Right]</property>
        <property name="TextColor">4194304</property>
        <property name="font">
          <font name="Arial" width="0" height="-21" weight="700"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">10</property>
      </style>
    </part>
  </part>
  <part class="radiogroup">
    <style>
      <property name="Geometry">{506,9,215,134}</property>
      <property name="Name">[oRadiogroup1]</property>
      <property name="varName">[vRadiogroup1]</property>
      <property name="Caption">[Finalidade da Entrada da NFe]</property>
      <property name="font">
        <font name="Arial" width="0" height="-13" weight="700"/>
      </property>
      <property name="TabIndex">11</property>
    </style>
    <part class="radiobutton">
      <style>
        <property name="Geometry">{512,27,203,22}</property>
        <property name="Name">[oRadiobutton1]</property>
        <property name="Caption">[Mercadoria para Revenda]</property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">12</property>
      </style>
      <method name="onClick">
        <![CDATA[m_ptipoitem := '00'
wPtipoItem := '00'
Efd_MarkupTipoItem('REFRESH',oButtonT01,oButtonFF,oButtonII)
]]>
      </method>
    </part>
    <part class="radiobutton">
      <style>
        <property name="Geometry">{512,93,119,22}</property>
        <property name="Name">[oRadiobutton2]</property>
        <property name="Caption">[Materia Prima]</property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">12</property>
      </style>
      <method name="onClick">
        <![CDATA[m_ptipoitem := '01'
wPtipoItem := '01'
Efd_MarkupTipoItem('REFRESH',oButtonT01,oButtonFF,oButtonII)]]>
      </method>
    </part>
    <part class="radiobutton">
      <style>
        <property name="Geometry">{512,49,203,22}</property>
        <property name="Name">[oRadiobutton3]</property>
        <property name="Caption">[Material de Uso e Consumo]</property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">12</property>
      </style>
      <method name="onClick">
        <![CDATA[m_ptipoitem := '07'
wPtipoItem := '07'
Efd_MarkupTipoItem('REFRESH',oButtonT01,oButtonFF,oButtonII)]]>
      </method>
    </part>
    <part class="radiobutton">
      <style>
        <property name="Geometry">{512,70,203,22}</property>
        <property name="Name">[oRadiobutton4]</property>
        <property name="Caption">[Ativo Imobilizado]</property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">12</property>
      </style>
      <method name="onClick">
        <![CDATA[m_ptipoitem := '08'
wPtipoItem := '08'
Efd_MarkupTipoItem('REFRESH',oButtonT01,oButtonFF,oButtonII)]]>
      </method>
    </part>
    <part class="radiobutton">
      <style>
        <property name="Geometry">{512,115,119,22}</property>
        <property name="Name">[oRadiobutton5]</property>
        <property name="Caption">[Embalagem]</property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">12</property>
      </style>
      <method name="onClick">
        <![CDATA[m_ptipoitem := '02'
wPtipoItem := '02'
Efd_MarkupTipoItem('REFRESH',oButtonT01,oButtonFF,oButtonII)]]>
      </method>
    </part>
  </part>
  <part class="group">
    <style>
      <property name="Geometry">{724,9,163,134}</property>
      <property name="Name">[oGroupMarkup]</property>
      <property name="Caption">[(&quot;Markups Padr??(&quot;+m_ptipoitem+&quot;)&quot;)]</property>
      <property name="font">
        <font name="Arial" width="0" height="-13" weight="700"/>
      </property>
      <property name="TabIndex">13</property>
    </style>
    <part class="buttonex">
      <style>
        <property name="Geometry">{730,27,150,36}</property>
        <property name="Name">[oButtonT01]</property>
        <property name="Caption">[(Efd_MarkupTipoItem(&quot;01&quot;,m_ptipoitem))]</property>
        <property name="WordWrap">.T.</property>
        <property name="TabIndex">15</property>
      </style>
      <method name="onClick">
        <![CDATA[Efd_MarkupTipoItem("01",wPtipoItem,'EDIT',oButtonT01)]]>
      </method>
    </part>
    <part class="buttonex">
      <style>
        <property name="Geometry">{730,63,150,36}</property>
        <property name="Name">[oButtonFF]</property>
        <property name="Caption">[(Efd_MarkupTipoItem(&quot;FF&quot;,m_ptipoitem))]</property>
        <property name="WordWrap">.T.</property>
        <property name="TabIndex">15</property>
      </style>
      <method name="onClick">
        <![CDATA[Efd_MarkupTipoItem("FF",wPtipoItem,'EDIT',oButtonFF)]]>
      </method>
    </part>
    <part class="buttonex">
      <style>
        <property name="Geometry">{729,99,150,36}</property>
        <property name="Name">[oButtonII]</property>
        <property name="Caption">[(Efd_MarkupTipoItem(&quot;II&quot;,m_ptipoitem))]</property>
        <property name="WordWrap">.T.</property>
        <property name="TabIndex">15</property>
      </style>
      <method name="onClick">
        <![CDATA[Efd_MarkupTipoItem("II",wPtipoItem,'EDIT',oButtonII)]]>
      </method>
    </part>
  </part>
</part>
