<?xml version="1.0" encoding="UTF-8"?>
<part class="form">
  <style>
    <property name="Geometry">{288,42,1022,598}</property>
    <property name="Name">[sp_movfn_precos.scr]</property>
    <property name="Caption">[Produtos a Receber]</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_default.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 zbRefreshPrd:={||se_prod->( sp_movf->pCod=pCod.or.DbSeek(sp_movf->pCod), oPdesc:SetGet(pdesc),oPdesc:Refresh(), opVluVen3:SetGet(pVluVen3),opVluVen3:Refresh(), opItens:SetGet(pItens),opItens:Refresh(), opVluEmb3:SetGet(pItens*pVluVen3),opVluEmb3:Refresh(), opVluEmb:SetGet(pItens*pVluVenda),opVluEmb:Refresh(), opDataAlter:SetGet(pDataAlter),opDataAlter:Refresh() )}
//skel variavel zbSeraAtualizado:={||if( pVluItem<>se_prod->pVluVenda.and.(pVluVenda<pVluItem.or.S_E_RPVME="S"),"Sim","Nao") }
//skel variavel zReajustaPrecosDeVendaPelaEntrada:=S_E_RPVUC
//skel variavel zPermiteReajustarPrecosParaMenor:=S_E_RPVME
//skel COMANDO ANTES sp_movf->( abra_arq("sccpfab") )
//skel COMANDO DEPOIS sccpfab->(DbCloseArea())
oContextMenu:=Hwg_ContextMenu()
hwg_Btn(oToolbar,5,5,64,64)
//hwg_TbMt(oToolbar,' 22;ins_prd(D_oB,"R",.t.,.t.);Ins-Inclui ;Ins-Inclui;cadastrar.ico;;;;;Inclui;;;')
//hwg_TbMt(oToolbar,'  7;tb_del(D_oB);Del-Cancela ;Del-Deleta;deletar.ico;;;;;Deleta;;;')
//d_ob:lEditable := .t.
hwg_TbMt(oToolbar,' 79;tb_index(D_OB);O-Ordena ;O-Ordena a coluna do cursor;ordenar.ico;;;;;&O-Ordena;;;')
hwg_TbMt(oToolbar,' 73;Lst_alias(D_OB);I-Imprime Pedido ;I-Imprime;impressora.ico;;;;;&I-Imprime;;;')
hwg_Btn(oToolbar,10,544,70,24)
hwg_TbMt(oToolbar,' 13;pf_DoGet(D_oB,"R");Enter-Altera ;Enter - Altera;sembitmap;;;Lucida Bright;-11;Altera;;6;')
//hwg_TbMt(oToolbar,' 43;insprdsm(D_oB,"R",.f.,.t.);+-Inclui ;+ - Inclui;sembitmap;;;Lucida Bright;-11;&+-Inclui;;6;')
hwg_TbMt(oToolbar,' 66;pf_ean(nrow,d_ob);B-Cod_Barras ;B - Cod_Barras;sembitmap;;;Lucida Bright;-11;&B-Cod_Barras;;6;')
//hwg_TbMt(oToolbar,' 82;pfrecquant(D_oB);R-Confirma_Todos ;R - Confirma_Todos;sembitmap;;;Lucida Bright;-11;&R-Confirma_Todos;;6;')
hwg_TbMt(oToolbar,' 86;pfvalor(D_oB);V-Valor_Pedido ;V - Valor_Pedido;sembitmap;;;Lucida Bright;-11;&V-Valor_Pedido;;6;')
hwg_TbMt(oToolbar,' 63;chk_sp_movf(,,,"CALCULA_VALOR");?-Valor_NF ;? - Valor_NF;sembitmap;;;Lucida Bright;-11;&?-Valor_NF;;6;')
hwg_TbMt(oToolbar,' 47;chk_sp_movf(,,D_oB,"AJUSTA_TODOS");/-Ajusta_Valores ;/ - Ajusta_Valores;sembitmap;;;Lucida Bright;-11;&/-Ajusta_Valores;;6;')
hwg_TbMt(oToolbar,' 32;OrdSetFocus(0);Barra-Ordem_Digitacao ;Barra - Ordem_Digitacao;sembitmap;;;Lucida Bright;-11;Ordem_Digitacao;;6;')
hwg_TbMt(oToolbar,' 69;dispent(pcod);E-Entradas ;E - Entradas;sembitmap;;;Lucida Bright;-11;&E-Entradas;;6;')
hwg_TbMt(oToolbar,' 76;lestmax(d_ob);L-Excessos ;L - Excessos;sembitmap;;;Lucida Bright;-11;&L-Excessos;;6;')
//hwg_TbMt(oToolbar,' 68;upd_dic(d_ob,,pcod);D-Dic_Altera ;D - Dic_Altera;sembitmap;;;Lucida Bright;-11;&D-Dic_Altera;;6;')
//hwg_TbMt(oToolbar,' 67;checadic(pcod);C-Dic_Consulta ;C - Dic_Consulta;sembitmap;;;Lucida Bright;-11;&C-Dic_Consulta;;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()

EVAL(zbRefreshPrd)
// 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="bitmap">
    <style>
      <property name="Geometry">{954,10,58,50}</property>
      <property name="Name">[oBitmap1]</property>
      <property name="Anchor">9</property>
      <property name="Bitmap">[icon\logo_up.jpg]</property>
    </style>
  </part>
  <part class="browse">
    <style>
      <property name="Geometry">{7,71,1008,306}</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="onPosChange">
      <![CDATA[EVAL(zbRefreshPrd)
]]>
    </method>
    <method name="onInit">
      <![CDATA[hwg_TbFi(D_oB, 'Descricao;se_prod->(sp_movf->pCod=pCod.or.DbSeek(sp_movf->pCod), PDESC);P;@S30; 30;N;')
hwg_TbFi(D_oB, 'Sera Alterado?;eVal(zbSeraAtualizado);P;@S14;14;N;')
hwg_TbFi(D_oB, 'Preco_Atual;se_prod->pvluvenda;P;999999.99;9;S;')
hwg_TbFi(D_oB, 'MargemAtual;se_prod->((pvluvenda-pvluven3)/pvluvenda*100);P;999.99%;11;N;')
hwg_TbFi(D_oB, 'MarkupAtual;se_prod->((MarkupPrd(PgPreco)-1)*100);P;999.99%;11;N;')
hwg_TbFi(D_oB, 'PrecoNoXML;pvluitem;N;999999.99;9;S;')
hwg_TbFi(D_oB, 'NovoPreco;pNovoPreco;N;9999.99;7;S;')

hwg_TbFi(D_oB, 'Margem_XML;if(pvluItem>0, (pvluItem-pvluven3/if(pitens>0,pitens,1))/pvluItem*100, 0);P;999.99%;11;N;')

hwg_TbFi(D_oB, 'Dif_XML; se_prod->((pvluvenda-pvluven3)/pvluvenda*100) - if(pvluItem>0, (pvluItem-pvluven3/if(pitens>0,pitens,1))/pvluItem*100, 0) ;P;999.99%;11;N;')
hwg_TbFi(D_oB, 'ItensCadaEmb;pitens;N;9999;  4;N;')

hwg_TbFi(D_oB, 'PrecoEmb;se_prod->pvluemb;P;999999.99;9;S;')

hwg_TbFi(D_oB, 'Cod;PCOD;N;999999;6;N;')
hwg_TbFi(D_oB, 'DtUltAlter;pDataAlter;D;99.99.9999;10;N;')
hwg_TbFi(D_oB, 'PrUnCompraXML;pvluven3;N;99999999.99;13;N;')
hwg_TbFi(D_oB, 'UltPrCompraFicha;se_prod->(sp_movf->pCod=pCod.or.DbSeek(sp_movf->pCod), pVluVen3);N;99999999.99;13;N;')
hwg_TbFi(D_oB, 'Cf;se_prod->pcategoria;P;xxx;3;S;')
hwg_TbFi(D_oB, 'Gp;se_prod->pgpreco;P;!!;2;S;')
hwg_TbFi(D_oB, '%DMax;se_prod->pdesconto;P;99.99%;6;S;')
hwg_TbFi(D_oB, '%Gere;se_prod->pdescfarm;P;99.99%;6;S;')
hwg_TbFi(D_oB, '%dinhe;se_prod->pdescbon;P;99.99%;6;S;')
hwg_TbFi(D_oB, 'PrPromo;se_prod->Pvluven2;P;999.99;6;S;')
hwg_TbFi(D_oB, 'BloqVnd;se_prod->pbloqvenda;P;!;7;S;')
hwg_TbFi(D_oB, 'DtPromo;se_prod->Pdataprog;P;;8;S;')
hwg_TbFi(D_oB, '')
hwg_TbFi(D_oB, '%ComVis;se_prod->pcomisvis;P;99.99%;6;S;')
hwg_TbFi(D_oB, '')
hwg_TbFi(D_oB, 'PrTab;pvlutab;N;9999.99;7;S;')
hwg_TbFi(D_oB, '%Negoc;PdscCompr;N;999.99;6;S;')
hwg_TbFi(D_oB, '%Prd;Pdesconto;N;999.99;6;N;')
hwg_TbFi(D_oB, '')
hwg_TbFi(D_oB, 'CstTotl;mvalor3;N;9999.99;7;S;')
hwg_TbFi(D_oB, 'Cfop;pCfop;C;9999;4;S;')
hwg_TbFi(D_oB, '%Rod;PdscRodape;N;999.99;6;S;')
hwg_TbFi(D_oB, '*;pnegpos;C;x;1;S;')
hwg_TbFi(D_oB, 'XmlCf;xml_categf;C;xxx;5;S;')
hwg_TbFi(D_oB, 'CstIcm;Cst_Icms;C;xxx;6;S;')
hwg_TbFi(D_oB, 'CstPIS;Cst_Pis;C;xxx;6;S;')
hwg_TbFi(D_oB, 'CstCOF;Cst_Cofins;C;xxx;6;S;')
hwg_TbFi(D_oB, 'Base_ICM;mBaseIcms;N;9999.99;8;S;')
hwg_TbFi(D_oB, '%ICMs;mTaxaIcms;N;99.99;5;S;')
hwg_TbFi(D_oB, 'Tot_ICM;mTotIcms;N;9999.99;8;S;')
hwg_TbFi(D_oB, 'BaseST;mBaseRetid;N;9999.99;8;S;')
hwg_TbFi(D_oB, '%ST;mTaxaST;N;99.99;5;S;')
hwg_TbFi(D_oB, 'ICM_ST;mIcmRetido;N;9999.99;8;S;')
hwg_TbFi(D_oB, 'BasePIS;vl_bc_pis;N;9999.99;8;S;')
hwg_TbFi(D_oB, '%PIS;aliq_pis;N;99.99;5;S;')
hwg_TbFi(D_oB, 'Tot_PIS;vl_pis;N;9999.99;8;S;')
hwg_TbFi(D_oB, 'BaseCOF;vlbccofins;N;9999.99;8;S;')
hwg_TbFi(D_oB, '%COF;aliqcofins;N;99.99;5;S;')
hwg_TbFi(D_oB, 'Tot_COF;vl_cofins;N;9999.99;8;S;')
hwg_TbFi(D_oB, '%Repas;prepasse;N;999.99;6;S;')
hwg_TbFi(D_oB, '%IPI;pipient;N;999.99;6;S;')
hwg_TbFi(D_oB, '%Liq;PdescComp;N;999.99;6;S;')
hwg_TbFi(D_oB, '%Distr;PdescDist;N;999.99;6;S;')
hwg_TbFi(D_oB, '%DscTt;if(mvalor3>0,100*(mqatend*pvlutab-mvalor3)/(mqatend*pvlutab),0);N;999.99;6;N;')
hwg_TbFi(D_oB, 'Pend;unid_fech-mqatend;N;9999; 4;N;')
hwg_TbFi(D_oB, 'UndVnd;mquant;N;999999;  6;N;')
hwg_TbFi(D_oB, 'xmlCstIcm;xml_csticm;C;xxx;9;S;')
hwg_TbFi(D_oB, 'xmlCstPis;xml_cstpis;C;xxx;9;S;')
hwg_TbFi(D_oB, 'xmlCstCof;xml_cstcof;C;xxx;9;S;')
hwg_TbFi(D_oB, 'XmlBaseICM;xml_IcmBC;N;9999.99;10;S;')
hwg_TbFi(D_oB, 'Xml%ICM;xml_IcmTx;N;99.99;7;S;')
hwg_TbFi(D_oB, 'XmlTotICM;xml_ICMVl;N;9999.99;9;S;')
D_oB:bColorSel:= RGB(3,23,233)
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.,"SP_MOVF",.F.,.T.,{||.T.} }
d_ob:bEdit := {|D_oB| nKey:=13,pf_DoGet(D_oB,"R")}
AADD(aBrowses,{D_oB,D_oB:Alias,{||.f.},{|| .T.},})
]]>
    </method>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{679,9,271,59}</property>
      <property name="Name">[oLabel2]</property>
      <property name="Caption">[Conferencia de Precos dos Itens Recebidos]</property>
      <property name="Justify">[Right]</property>
      <property name="Anchor">9</property>
      <property name="font">
        <font name="Arial" width="0" height="-24" weight="700"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">5</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{0,0,1022,5}</property>
      <property name="Name">[oLabel1]</property>
      <property name="Caption">[]</property>
      <property name="Anchor">11</property>
      <property name="BackColor">8388608</property>
      <property name="TabIndex">6</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{0,0,5,598}</property>
      <property name="Name">[oLabel3]</property>
      <property name="Caption">[]</property>
      <property name="Anchor">7</property>
      <property name="BackColor">8388608</property>
      <property name="TabIndex">6</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{1017,0,5,598}</property>
      <property name="Name">[oLabel4]</property>
      <property name="Caption">[]</property>
      <property name="Anchor">13</property>
      <property name="BackColor">8388608</property>
      <property name="TabIndex">6</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{0,593,1022,5}</property>
      <property name="Name">[oLabel5]</property>
      <property name="Caption">[]</property>
      <property name="Anchor">12</property>
      <property name="BackColor">8388608</property>
      <property name="TabIndex">6</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{176,409,278,19}</property>
      <property name="Name">[oLabel6]</property>
      <property name="Caption">[Preco de Compra de cada unid de venda:]</property>
      <property name="Justify">[Right]</property>
      <property name="Anchor">6</property>
      <property name="TabIndex">7</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{145,432,309,19}</property>
      <property name="Name">[oLabel7]</property>
      <property name="Caption">[Unidades de Venda em cada Unid. de Compra:]</property>
      <property name="Justify">[Right]</property>
      <property name="Anchor">6</property>
      <property name="TabIndex">7</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{172,455,282,19}</property>
      <property name="Name">[oLabel8]</property>
      <property name="Caption">[Preco da Embalagem Fechada de Compra:]</property>
      <property name="Justify">[Right]</property>
      <property name="Anchor">6</property>
      <property name="TabIndex">7</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{106,477,348,19}</property>
      <property name="Name">[oLabel10]</property>
      <property name="Caption">[Preco de Venda da Embalagem Fechada de Compra:]</property>
      <property name="Justify">[Right]</property>
      <property name="Anchor">6</property>
      <property name="TabIndex">7</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{641,381,249,19}</property>
      <property name="Name">[oLabel11]</property>
      <property name="Caption">[Data da Ultima alteracao de Precos:]</property>
      <property name="Anchor">12</property>
      <property name="TabIndex">7</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{27,381,150,19}</property>
      <property name="Name">[oLabel12]</property>
      <property name="Caption">[Produto Selecionado:]</property>
      <property name="Justify">[Right]</property>
      <property name="Anchor">6</property>
      <property name="TabIndex">7</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{636,411,326,36}</property>
      <property name="Name">[oLabel9]</property>
      <property name="Caption">
[Sua Configuracao: Reajusta precos de venda e de custo automaticamente pela ultima compra ?]      </property>
      <property name="Justify">[Right]</property>
      <property name="Anchor">12</property>
      <property name="TabIndex">7</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{714,449,248,37}</property>
      <property name="Name">[oLabel13]</property>
      <property name="Caption">
[Sua Configuracao: Permite reajustar precos de venda para menor ?]      </property>
      <property name="Justify">[Right]</property>
      <property name="Anchor">12</property>
      <property name="TabIndex">7</property>
    </style>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{189,381,379,22}</property>
      <property name="Name">[opDesc]</property>
      <property name="varName">[m_pDesc]</property>
      <property name="Anchor">6</property>
      <property name="TabIndex">8</property>
    </style>
    <method name="onGetFocus">
      <![CDATA[.f.]]>
    </method>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{461,406,107,22}</property>
      <property name="Name">[opVluVen3]</property>
      <property name="varName">[m_pVluVen3]</property>
      <property name="Anchor">6</property>
      <property name="cPicture">[99999999.99]</property>
      <property name="TabIndex">8</property>
    </style>
    <method name="onGetFocus">
      <![CDATA[.f.]]>
    </method>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{461,429,107,22}</property>
      <property name="Name">[opItens]</property>
      <property name="varName">[m_pItens]</property>
      <property name="Anchor">6</property>
      <property name="cPicture">[99999999.99]</property>
      <property name="TabIndex">8</property>
    </style>
    <method name="onGetFocus">
      <![CDATA[.f.]]>
    </method>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{461,452,107,22}</property>
      <property name="Name">[opVluEmb3]</property>
      <property name="varName">[m_pVluEmb3]</property>
      <property name="Anchor">6</property>
      <property name="cPicture">[99999999.99]</property>
      <property name="TabIndex">8</property>
    </style>
    <method name="onGetFocus">
      <![CDATA[.f.]]>
    </method>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{898,381,107,22}</property>
      <property name="Name">[opDataAlter]</property>
      <property name="varName">[m_pDataAlter]</property>
      <property name="Anchor">12</property>
      <property name="cPicture">[99.99.9999]</property>
      <property name="TabIndex">8</property>
    </style>
    <method name="onGetFocus">
      <![CDATA[.f.]]>
    </method>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{461,477,107,22}</property>
      <property name="Name">[opVluEmb]</property>
      <property name="varName">[m_pVluEmb]</property>
      <property name="Anchor">6</property>
      <property name="cPicture">[99999999.99]</property>
      <property name="TabIndex">8</property>
    </style>
    <method name="onGetFocus">
      <![CDATA[.f.]]>
    </method>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{975,420,27,22}</property>
      <property name="Name">[oEdit1]</property>
      <property name="varName">[zReajustaPrecosDeVendaPelaEntrada]</property>
      <property name="Anchor">12</property>
      <property name="TabIndex">9</property>
    </style>
    <method name="onGetFocus">
      <![CDATA[.f.]]>
    </method>
  </part>
  <part class="editbox">
    <style>
      <property name="Geometry">{975,454,27,22}</property>
      <property name="Name">[oEdit2]</property>
      <property name="varName">[zPermiteReajustarPrecosParaMenor]</property>
      <property name="Anchor">12</property>
      <property name="TabIndex">9</property>
    </style>
    <method name="onGetFocus">
      <![CDATA[.f.]]>
    </method>
  </part>
</part>
