<?xml version="1.0" encoding="UTF-8"?>
<part class="form">
  <style>
    <property name="Geometry">{81,33,1029,682}</property>
    <property name="Name">[prod_t0.tel]</property>
    <property name="Caption">[ALTERAÇÃO - Cadastro de Produtos]</property>
    <property name="AlwaysOnTop">.F.</property>
    <property name="AutoCenter">.T.</property>
    <property name="Font">
      <font name="Courier New" width="0" height="-12" weight="400"/>
    </property>
    <property name="FormType">[dlgModal]</property>
    <property name="Modal">.F.</property>
    <property name="ScopeVarObj">[Local]</property>
    <property name="lClipper">.T.</property>
    <property name="lExitOnEnter">.T.</property>
    <property name="lExitOnESC">.T.</property>
    <property name="Variables">
{modus,osoSayPDIVISAO,osoSayPgPreco,osoSayPPRINCFORN,osoSayPcodClaFis,,}    </property>
    <property name="FromStyle">[Popup]</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">16777215</property>
    <property name="Icon">[]</property>
    <property name="Bitmap">[icon\tela.jpg]</property>
    <property name="NoIcon">.F.</property>
    <property name="SystemMenu">.F.</property>
    <property name="Minimizebox">.F.</property>
    <property name="Maximizebox">.F.</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="onFormInit">
    <![CDATA[parameters o, p1
modus:=p1]]>
  </method>
  <method name="onDlgInit">
    <![CDATA[IF x_operacao=1
   ORDSETFOCUS("SEIP_C")
ENDIF
preget_prd()
IF(modus<>NIL,SetWindowText( oDlg:handle, modus ),)

//skel VARIAVEL zMsgCatFiscOk = ";;Informe:;01 - Se o Produto for Tributado;FF-Se com Substituicao Tributaria;II-Se Isento;S-Se Servico"
//skel VARIAVEL zCatFisc = {||val(m_pcategoria)>0.or.StrWith(m_pcategoria,'0,T,F,I,N,S').or.(Alert('Categoria fiscal Invalida!'+zMsgCatFiscOk,,'B/W'),.f.)}
//skel Variavel zNIL = GetTaxasTributarias("CARREGA")
//skel variavel wPicmSubCpa=0
//skel variavel wpIcmGarant=0
//skel variavel wPipient=0
//skel variavel wPfreteCpa=0
//skel variavel wPCstEmbCpa=0
//skel variavel wPEncFinCpa=0
//skel variavel wPicmCpa=0
//skel variavel wPdscCpa=0
//skel variavel vTxOp=0
//skel variavel vTxFed=0
//skel variavel vPcom=0
//skel variavel vIcmVda=0
//skel variavel vTxOut=0
//skel variavel mPmargem=0
//skel variavel m_Markup=0
//skel variavel m_MkupPtEq=0
//skel variavel m_MkupPraticado=0
//skel variavel m_pVluLiq=(m_pVluVenda-m_pVluVenda*m_pDesconto/100)
//skel variavel m_MkupLiq=0
//skel VARIAVEL b0PrCst={||m_PVLUcst:=m_PVLUVEN3+wPicmSubCpa+wpIcmGarant+wPipient+wPfreteCpa+wPCstEmbCpa+wPEncFinCpa-wPicmCpa-wPdscCpa}
//skel VARIAVEL b0PrMin={||m_pVluMin:=m_PVLUcst/(1-(m_pTxOper+m_pTxFed+m_pTxIcmVda+m_PtxOutros+m_Pcomisvis)/100)}
//skel VARIAVEL b0Taxas={||vTxOp:=m_pVluMin*m_pTxOper/100,vTxFed:=m_pVluMin*m_pTxFed/100,vIcmVda:=m_pVluMin*m_pTxIcmVda/100,vPcom:=m_pVluMin*m_Pcomisvis/100,vTxOut:=m_pVluMin*m_PtxOutros/100}
//skel VARIAVEL b0PrSug={||m_PvluSug:=m_pVluMin/(1-m_Pmargem/100)}
//skel VARIAVEL b0Markup={||m_Markup:=if(m_PVLUVEN3>0,100*(m_pVluSug/m_PVLUVEN3-1),0)}
//skel VARIAVEL b0MkupPraticado={||m_MkupPraticado:=if(m_PVLUVEN3>0,100*(m_pVluVenda/m_PVLUVEN3-1),0)}
//skel VARIAVEL b0MkupLiq={||m_pVluLiq:=(m_pVluVenda-m_pVluVenda*m_pDesconto/100), m_MkupLiq:=if(m_PVLUVEN3>0,100*(m_pVluLiq/m_PVLUVEN3-1),0)}
//skel VARIAVEL b0MkupPtEq={||m_MkupPtEq:=if(m_PVLUVEN3>0,100*(m_pVluMin/m_PVLUVEN3-1),0)}
//skel VARIAVEL b0RecalcMarg={||m_Pmargem:=if(m_PVLUVEN3>0,(m_PVLUVEN3-100*m_pVluMin/(100+m_Markup))*100/m_PVLUVEN3,0)}
//skel VARIAVEL zbRefresh={||eval(b0PrCst), eval(b0PrMin), eval(b0PrSug), eval(b0Taxas), eVal(b0Markup), eVal(b0MkupPtEq), eVal(b0MkupPraticado), eVal(b0MkupLiq), RefreshGetlist()}
//skel VARIAVEL zBlPrTab={||m_PVLUtab:=if(m_PVLUVEN3*m_pitens>m_PVLUtab*(1-m_PdscCompr/100),m_PVLUVEN3*m_pitens,m_PVLUtab), eval(zbRefresh)}
//skel VARIAVEL b1DscCpa={||wPdscCpa:=m_PVLUVEN3*m_PdscCompr/100, eval(zbRefresh)}
//skel VARIAVEL b1FreteCpa={||wPfreteCpa:=(m_PVLUVEN3+wPipient)*m_PfreteCpa/100, eval(zbRefresh)}
//skel VARIAVEL b1IcmSubCpa = {||m_PicmSubCpa:=if('F'$m_pcategoria,m_PicmSubCpa,0), wPicmSubCpa:=m_PVLUVEN3*m_PicmSubCpa/100, eval(zbRefresh)}
//skel VARIAVEL b1IcmGarant = {||m_pIcmGarant:=if(!'F'$m_pcategoria.and.!'N'$m_pCategoria.and.!'I'$m_pCategoria,m_pIcmGarant,0), wpIcmGarant:=m_PVLUVEN3*m_pIcmGarant/100, eval(zbRefresh)}
//skel VARIAVEL b1IpiEnt    = {||wPipient:=m_PVLUVEN3*m_Pipient/100, eval(zbRefresh)}
//skel VARIAVEL b1CstEmbCpa = {||wPCstEmbCpa:=m_PVLUVEN3*m_PCstEmbCpa/100, eval(zbRefresh)}
//skel VARIAVEL b1EncFinCpa = {||wPEncFinCpa:=(m_PVLUVEN3-wPdscCpa+wPipient)*m_PEncFinCpa/100, eval(zbRefresh)}
//skel VARIAVEL zMsgIcmOk1 = "O Credito de Icms so e permitido para produtos Tributados"
//skel VARIAVEL zMsgIcmOk2 = "O Credito de Icms nao eh permitido para sua modalidade configurada para Simples Nacional"
//skel VARIAVEL zbMsg = {||Alert(if(snfRegime='1',zMsgIcmOk1,zMsgIcmOk2),,'B/W'),0}
//skel VARIAVEL zbIcmCp={||m_PicmCpa:=if(m_PicmCpa>0.and.(snfRegime='1'.or.StrWith(m_pcategoria,'F,I,N,S')),eval(zbMsg),m_PicmCpa),wPicmCpa:=(m_PVLUVEN3+wPfreteCpa-wPdscCpa)*m_PicmCpa/100,eval(zbRefresh)}

//skel VARIAVEL zb_PeanOk = {|npDic6|Z_recn:=Recno(),DbSetOrder(3),zOk:=!DbSeek(npDic6).or.(Z_recn=Recno()).or.(Alert('Esse Codigo de Barras JA ESTA CADASTRADO como '+Alltrim(se_prod->pdesc)),.f.),DbSetOrder(1),DbGoto(Z_recn),zOk}
//skel VARIAVEL zb_PrefOk = {|cpRef|Z_recn:=Recno(),DbSetOrder(4),zOk:=!DbSeek(cpRef).or.(Z_recn=Recno()).or.(Alert('Essa Referencia JA ESTA CADASTRADA como '+Alltrim(se_prod->pdesc)),.f.),DbSetOrder(1),DbGoto(Z_recn),zOk}

//skel VARIAVEL m_pObs = if(x_operacao=1,"", se_prod->(IF(FIELDPOS("pobs")>0,pObs,"")) )

//skel comando antes wlCommitByStruct=.t.
//skel COMANDO ANTES M_PITENS = if(m_pitens=0, 1, m_pitens)

SET(5,1960)
CiSetKey( "K_F2","(ExecutaXML('se_prod_pteq.tel'),RefreshGetlist())",,,"F2:Composicao de Preco do Produto")
CiSetKey( "K_F3","ExecutaXML('se_prod_descontos.tel')",,,"F3:Define Descontos e Promocoes do Produto")
CiSetKey( "K_F4","DbSeek_Add_Se_Pnfe( m_pCod, .f., .t.)",,,"F4:Cadastra CSTs do Produto")
CiSetKey( "K_F5","(BrwComposicoes(, Pcod),RefreshGetlist())",,,"F5:Cadastra Composicao do Produto")
CiSetKey( "K_F8","ExecutaXML('se_prod_pobs.tel')",,,"F8:Observacoes de uso do Produto")



om_pTipoItem:aitems := Efd_TipoItem(,,.t.)
om_pTipoItem:Requery() 
om_pTipoItem:lText := (ValType(m_pTipoItem)="C")
om_pTipoItem:SetValue( m_pTipoItem ) 
om_pTipoItem:Refresh() 

IF sys_segmento<>'farma'
   oBtnLotes:Hide()
ENDIF
IF .not. se_prod->(FIELDPOS('pObs'))>0
   oBtnPobs:Hide()
ENDIF

IF s_vb_numde=0
   oPitens:ParsePict( "99999", m_pitens)
ELSE
   oPitens:ParsePict( "99999."+Replicate("9",s_vb_numde), m_pitens)
   opVluVen3:ParsePict( "@E 999,999."+Replicate("9",s_vb_numde), m_pVluVen3)
   opVluVenda:ParsePict( "@E 999,999."+Replicate("9",s_vb_numde), m_pVluVenda)
ENDIF]]>
  </method>
  <part class="line">
    <style>
      <property name="Geometry">{5,643,1011,2}</property>
      <property name="Name">[oLine1]</property>
    </style>
  </part>
  <part class="status">
    <style>
      <property name="Geometry">{0,652,1029,30}</property>
      <property name="Name">[oDlgStatusBar]</property>
      <property name="aParts">{608,152,0}</property>
    </style>
  </part>
  <part class="group">
    <style>
      <property name="Geometry">{4,2,1014,635}</property>
      <property name="Name">[oGroup1]</property>
      <property name="TabIndex">1</property>
    </style>
    <part class="bitmap">
      <style>
        <property name="Geometry">{517,264,261,210}</property>
        <property name="Name">[oJpgFotoProduto]</property>
        <property name="Bitmap">[icon\sem_imagem.jpg]</property>
        <property name="Stretch">[1 - Isometric]</property>
        <property name="ToolTip">[Digitaliza Foto do Cliente]</property>
      </style>
      <method name="onClick">
        <![CDATA[Ged_Digitaliza('db','PROD',m_pcod,,,oJpgFotoProduto) ]]>
      </method>
      <method name="onInit">
        <![CDATA[Ged_ShowJpg('db','PROD',m_pcod,,,oJpgFotoProduto) ]]>
      </method>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{222,18,97,30}</property>
        <property name="Name">[oPCOD]</property>
        <property name="varName">[m_PCOD]</property>
        <property name="font">
          <font name="Arial" width="0" height="-24" weight="700"/>
        </property>
        <property name="cPicture">[999999]</property>
        <property name="nMaxLength">6</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">1</property>
      </style>
      <method name="onGetFocus">
        <![CDATA[.f.]]>
      </method>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{44,23,171,25}</property>
        <property name="Name">[oSayPCOD]</property>
        <property name="Caption">[Codigo:]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">2</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{222,51,211,30}</property>
        <property name="Name">[opdic6]</property>
        <property name="varName">[m_pdic6]</property>
        <property name="font">
          <font name="Arial" width="0" height="-21" weight="700"/>
        </property>
        <property name="cPicture">[9999999999999]</property>
        <property name="nMaxLength">13</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">2</property>
      </style>
      <method name="onLostFocus">
        <![CDATA[m_pdic6=0.or.eval(zb_PeanOk,m_pdic6)]]>
      </method>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{36,56,179,25}</property>
        <property name="Name">[oSaypdic6]</property>
        <property name="Caption">[Codigo de Barras:]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">3</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{473,23,124,25}</property>
        <property name="Name">[oLabel3]</property>
        <property name="Caption">[Finalidade:]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">3</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{222,85,211,30}</property>
        <property name="Name">[oPREFFAB]</property>
        <property name="varName">[m_PREFFAB]</property>
        <property name="font">
          <font name="Arial" width="0" height="-24" weight="700"/>
        </property>
        <property name="cPicture">[@s15]</property>
        <property name="nMaxLength">15</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">3</property>
      </style>
      <method name="onLostFocus">
        <![CDATA[EMPTY(m_preffab).OR.xGetEnv("PERMITE_REFERENCIAS_DUPLICADAS")<>"N".or.eval(zb_PrefOk,m_pRefFab)]]>
      </method>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{14,90,201,25}</property>
        <property name="Name">[oSayPREFFAB]</property>
        <property name="Caption">[Referencia de Fabrica:]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">4</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{222,118,676,30}</property>
        <property name="Name">[oPDESC]</property>
        <property name="varName">[m_PDESC]</property>
        <property name="font">
          <font name="Arial" width="0" height="-24" weight="700"/>
        </property>
        <property name="cPicture">[@s50]</property>
        <property name="nMaxLength">50</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">4</property>
      </style>
      <method name="onLostFocus">
        <![CDATA[alltrim(m_pdesc)<>""]]>
      </method>
    </part>
    <part class="combobox">
      <style>
        <property name="Geometry">{604,18,221,30}</property>
        <property name="Name">[om_pTipoItem]</property>
        <property name="varName">[m_pTipoItem]</property>
        <property name="font">
          <font name="Arial" width="0" height="-21" weight="700"/>
        </property>
        <property name="TabIndex">5</property>
      </style>
      <method name="onGetFocus">
        <![CDATA[MyShowListBox()]]>
      </method>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{72,123,143,25}</property>
        <property name="Name">[oSayPDESC]</property>
        <property name="Caption">[Descricao:]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">5</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{37,160,178,23}</property>
        <property name="Name">[oSayPDIVISAO]</property>
        <property name="Caption">[Divisao do Estoque:]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">6</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{604,51,112,30}</property>
        <property name="Name">[opCodClaFis]</property>
        <property name="varName">[m_pCodClaFis]</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="700"/>
        </property>
        <property name="Justify">[Right]</property>
        <property name="cPicture">[99999999]</property>
        <property name="nMaxLength">8</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">6</property>
      </style>
      <method name="onLostFocus">
        <![CDATA[CHK_LASTKEY(5).OR.PSQ_BROW('CI_NCM','PCINCM','STRZERO(M_PCODCLAFIS,8)','N','S',3,0,'','','VAL(NCM)',,opCodClaFis,).AND.(Cest_Funcep_CatFisc(@m_pCodClaFis, @m_pCEST,, @m_pCategoria).and.RefreshGetlist(),.t.)]]>
      </method>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{51,190,164,23}</property>
        <property name="Name">[oSayPgPreco]</property>
        <property name="Caption">[Grupo de Precos:]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">7</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{604,85,112,30}</property>
        <property name="Name">[opCEST]</property>
        <property name="varName">[m_pCEST]</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="700"/>
        </property>
        <property name="Justify">[Right]</property>
        <property name="cPicture">[9999999]</property>
        <property name="nMaxLength">8</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">7</property>
      </style>
      <method name="onLostFocus">
        <![CDATA[CHK_LASTKEY(5).OR.EMPTY(m_pCEST).or.PSQ_BROW('CI_CEST','PCICEST','M_PCEST','N','S',3,0,'','',,,opCEST,)]]>
      </method>
    </part>
    <part class="buttonex">
      <style>
        <property name="Geometry">{485,264,24,17}</property>
        <property name="Name">[oButtonex1]</property>
        <property name="Caption">[S]</property>
        <property name="ToolTip">[Re-scanear foto]</property>
        <property name="TabIndex">7</property>
      </style>
      <method name="onClick">
        <![CDATA[Ged_ShowJpg('db','ZOOMPROD',m_pcod,,,oJpgFotoProduto) 
]]>
      </method>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{222,158,64,25}</property>
        <property name="Name">[oPDIVISAO]</property>
        <property name="varName">[m_PDIVISAO]</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="700"/>
        </property>
        <property name="nMaxLength">4</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">8</property>
      </style>
      <method name="onLostFocus">
        <![CDATA[LASTKEY()=5 .OR. PSQ_BROW('SE_SUBD','PSESUBD','M_PDIVISAO','N','S',10,35,'SDDESC','@S25','',,oPDIVISAO,osoSayPDIVISAO)]]>
      </method>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{90,221,125,23}</property>
        <property name="Name">[oSayPPRINCFORN]</property>
        <property name="Caption">[Fornecedor:]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">8</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{222,188,24,25}</property>
        <property name="Name">[oPgPreco]</property>
        <property name="varName">[m_PgPreco]</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="700"/>
        </property>
        <property name="nMaxLength">2</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">9</property>
      </style>
      <method name="onLostFocus">
        <![CDATA[PSQ_BROW('SE_GPRE','PSEGPRE','M_PGPRECO','N','S',11,35,'MARKUP','999.99%','',,oPgPreco,osoSayPgPreco)]]>
      </method>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{333,256,59,25}</property>
        <property name="Name">[oPUNIDADE]</property>
        <property name="varName">[m_PUNIDADE]</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="700"/>
        </property>
        <property name="nMaxLength">3</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">9</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{42,258,288,23}</property>
        <property name="Name">[oSayPUNIDADE]</property>
        <property name="Caption">[Unidade de Consumo ou Venda:]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">9</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{42,287,288,23}</property>
        <property name="Name">[oLabel4]</property>
        <property name="Caption">[Unidade de Venda por Caixa:]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">9</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{34,410,296,23}</property>
        <property name="Name">[oLabel5]</property>
        <property name="Caption">[Quant.Max. p/Venda no Atacado:]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">9</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{222,219,73,25}</property>
        <property name="Name">[oPPRINCFORN]</property>
        <property name="varName">[m_PPRINCFORN]</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="700"/>
        </property>
        <property name="nMaxLength">4</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">10</property>
      </style>
      <method name="onLostFocus">
        <![CDATA[LASTKEY()=5 .OR. PSQ_BROW('SCCPFOR','PSCCPFOR','M_PPRINCFORN','N','N',12,35,'CP_FANTASI','@S25','',,oPPRINCFORN,osoSayPPRINCFORN)]]>
      </method>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{333,287,59,25}</property>
        <property name="Name">[oPUNIDemb]</property>
        <property name="varName">[m_PUNIDemb]</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="700"/>
        </property>
        <property name="nMaxLength">3</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">11</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{42,378,288,23}</property>
        <property name="Name">[oSayPCATEGORIA]</property>
        <property name="Caption">[Categoria Fiscal:]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">11</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{28,350,302,23}</property>
        <property name="Name">[oSayPitens]</property>
        <property name="Caption">[Unids de Venda em cada Unid Compra:]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-16" weight="700"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">12</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{520,58,73,23}</property>
        <property name="Name">[oSaypCodClaFis]</property>
        <property name="Caption">[NCM:]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">13</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{520,90,73,23}</property>
        <property name="Name">[oLabel6]</property>
        <property name="Caption">[CEST:]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">13</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{42,440,288,23}</property>
        <property name="Name">[oSayPDESCONTO]</property>
        <property name="Caption">[Desconto Maximo na Venda:]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">14</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{42,470,288,23}</property>
        <property name="Name">[oSayPEANPESO]</property>
        <property name="Caption">[Vende por Etiqueta de Balanca?]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">15</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{42,500,288,23}</property>
        <property name="Name">[oSayPvndquant]</property>
        <property name="Caption">[Vende Calculando Quantidade?]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">16</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{41,594,288,23}</property>
        <property name="Name">[oLabel7]</property>
        <property name="Caption">[Pede Largura x Altura na Venda ?]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">16</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{580,514,222,25}</property>
        <property name="Name">[oSayPVLUvenda]</property>
        <property name="Caption">[Preco de Venda Unit.:]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-21" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">17</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{42,528,288,25}</property>
        <property name="Name">[oLabel1]</property>
        <property name="Caption">[Tamanho/Largura Unid Compra:]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">17</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{42,561,288,25}</property>
        <property name="Name">[oLabel2]</property>
        <property name="Caption">[Altura da Unid de Compra:]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">17</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{544,557,259,25}</property>
        <property name="Name">[oSayPVLUemb]</property>
        <property name="Caption">[Preco de Venda (Caixa):]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-21" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">18</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{544,598,259,25}</property>
        <property name="Name">[oSayPVLUven3]</property>
        <property name="Caption">[Preco de Fabrica:]</property>
        <property name="Justify">[Right]</property>
        <property name="BackColor">16777215</property>
        <property name="font">
          <font name="Arial" width="0" height="-21" weight="400"/>
        </property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">19</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{321,163,332,20}</property>
        <property name="Name">[osoSayPDIVISAO]</property>
        <property name="Caption">[...]</property>
        <property name="font">
          <font name="Arial" width="0" height="-13" weight="400"/>
        </property>
        <property name="Border">.T.</property>
        <property name="TabIndex">20</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{321,193,332,20}</property>
        <property name="Name">[osoSayPgPreco]</property>
        <property name="Caption">[...]</property>
        <property name="font">
          <font name="Arial" width="0" height="-13" weight="400"/>
        </property>
        <property name="Border">.T.</property>
        <property name="TabIndex">21</property>
      </style>
    </part>
    <part class="label">
      <style>
        <property name="Geometry">{321,224,332,20}</property>
        <property name="Name">[osoSayPPRINCFORN]</property>
        <property name="Caption">[...]</property>
        <property name="font">
          <font name="Arial" width="0" height="-13" weight="400"/>
        </property>
        <property name="Border">.T.</property>
        <property name="TabIndex">22</property>
      </style>
    </part>
    <part class="ownerbutton">
      <style>
        <property name="Geometry">{299,167,16,16}</property>
        <property name="Name">[oboPDIVISAO]</property>
        <property name="BtnBitmap">[smPreview]</property>
        <property name="lResource">.T.</property>
        <property name="TabIndex">23</property>
      </style>
      <method name="onClick">
        <![CDATA[PSQ_BROW('SE_SUBD','PSESUBD','M_PDIVISAO','N','S',10,35,'SDDESC','@S25','','EXIBA',oPDIVISAO,osoSayPDIVISAO)]]>
      </method>
    </part>
    <part class="ownerbutton">
      <style>
        <property name="Geometry">{299,197,16,16}</property>
        <property name="Name">[oboPgPreco]</property>
        <property name="BtnBitmap">[smPreview]</property>
        <property name="lResource">.T.</property>
        <property name="TabIndex">24</property>
      </style>
      <method name="onClick">
        <![CDATA[PSQ_BROW('SE_GPRE','PSEGPRE','M_PGPRECO','N','S',11,35,'MARKUP','999.99%','','EXIBA',oPgPreco,osoSayPgPreco)]]>
      </method>
    </part>
    <part class="ownerbutton">
      <style>
        <property name="Geometry">{299,228,16,16}</property>
        <property name="Name">[oboPPRINCFORN]</property>
        <property name="BtnBitmap">[smPreview]</property>
        <property name="lResource">.T.</property>
        <property name="TabIndex">25</property>
      </style>
      <method name="onClick">
        <![CDATA[PSQ_BROW('SCCPFOR','PSCCPFOR','M_PPRINCFORN','N','N',12,35,'CP_FANTASI','@S25','','EXIBA',oPPRINCFORN,osoSayPPRINCFORN)]]>
      </method>
    </part>
    <part class="ownerbutton">
      <style>
        <property name="Geometry">{722,60,16,16}</property>
        <property name="Name">[oboPcodClaFis]</property>
        <property name="Caption">[oBoCb]</property>
        <property name="BtnBitmap">[smPreview]</property>
        <property name="lResource">.T.</property>
        <property name="TabIndex">25</property>
      </style>
      <method name="onClick">
        <![CDATA[PSQ_BROW('CI_NCM','PCINCM','STRZERO(M_PCODCLAFIS,8)','N','S',3,0,'','','VAL(NCM)','EXIBA',opCodClaFis,)]]>
      </method>
    </part>
    <part class="ownerbutton">
      <style>
        <property name="Geometry">{722,92,16,16}</property>
        <property name="Name">[oboPCEST]</property>
        <property name="Caption">[oBoCb]</property>
        <property name="BtnBitmap">[smPreview]</property>
        <property name="lResource">.T.</property>
        <property name="TabIndex">25</property>
      </style>
      <method name="onClick">
        <![CDATA[PSQ_BROW('CI_CEST','PCICEST','M_PCEST','N','S',3,0,'','',,'EXIBA',opCEST,)]]>
      </method>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{333,348,109,25}</property>
        <property name="Name">[oPitens]</property>
        <property name="varName">[m_Pitens]</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="700"/>
        </property>
        <property name="Justify">[Right]</property>
        <property name="cPicture">[999999.999]</property>
        <property name="nMaxLength">10</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">40</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{333,376,36,25}</property>
        <property name="Name">[oPCATEGORIA]</property>
        <property name="varName">[m_PCATEGORIA]</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="700"/>
        </property>
        <property name="nMaxLength">2</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">41</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{333,408,104,25}</property>
        <property name="Name">[oPquantatac]</property>
        <property name="varName">[m_Pquantatac]</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="700"/>
        </property>
        <property name="cPicture">[999999]</property>
        <property name="nMaxLength">6</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">43</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{333,438,85,25}</property>
        <property name="Name">[oPDESCONTO]</property>
        <property name="varName">[m_PDESCONTO]</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="700"/>
        </property>
        <property name="Justify">[Right]</property>
        <property name="cPicture">[@e 99.99]</property>
        <property name="nMaxLength">5</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">44</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{333,468,21,25}</property>
        <property name="Name">[oPEANPESO]</property>
        <property name="varName">[m_PEANPESO]</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="700"/>
        </property>
        <property name="nMaxLength">1</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">45</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{333,498,21,25}</property>
        <property name="Name">[oPvndquant]</property>
        <property name="varName">[m_Pvndquant]</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="700"/>
        </property>
        <property name="nMaxLength">1</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">46</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{333,528,152,25}</property>
        <property name="Name">[opLargura]</property>
        <property name="varName">[m_pLargura]</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="700"/>
        </property>
        <property name="cPicture">[9999999.999]</property>
        <property name="nMaxLength">10</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">47</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{334,561,152,25}</property>
        <property name="Name">[opAltura]</property>
        <property name="varName">[m_pAltura]</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="700"/>
        </property>
        <property name="cPicture">[9999999.999]</property>
        <property name="nMaxLength">10</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">48</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{335,595,28,25}</property>
        <property name="Name">[opLargAltu]</property>
        <property name="varName">[m_pLargAltu]</property>
        <property name="font">
          <font name="Arial" width="0" height="-19" weight="700"/>
        </property>
        <property name="cPicture">[X]</property>
        <property name="nMaxLength">10</property>
        <property name="ToolTip">
[Indique se o sistema deve pedir dimensao e quantidade de pecas na hora da venda]        </property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">48</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{809,497,185,44}</property>
        <property name="Name">[oPVLUvenda]</property>
        <property name="varName">[m_PVLUvenda]</property>
        <property name="font">
          <font name="Arial Black" width="0" height="-27" weight="900"/>
        </property>
        <property name="Justify">[Right]</property>
        <property name="cPicture">[@e 999,999.99]</property>
        <property name="nMaxLength">10</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">50</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{809,547,185,35}</property>
        <property name="Name">[oPVLUemb]</property>
        <property name="varName">[m_PVLUemb]</property>
        <property name="font">
          <font name="Arial" width="0" height="-27" weight="700"/>
        </property>
        <property name="Justify">[Right]</property>
        <property name="cPicture">[@e 999,999.99]</property>
        <property name="nMaxLength">10</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">51</property>
      </style>
    </part>
    <part class="editbox">
      <style>
        <property name="Geometry">{809,588,185,35}</property>
        <property name="Name">[oPVLUven3]</property>
        <property name="varName">[m_PVLUven3]</property>
        <property name="font">
          <font name="Arial" width="0" height="-27" weight="700"/>
        </property>
        <property name="Justify">[Right]</property>
        <property name="cPicture">[@e 999,999.99]</property>
        <property name="nMaxLength">10</property>
        <property name="3DLook">.T.</property>
        <property name="TabIndex">52</property>
      </style>
    </part>
    <part class="button">
      <style>
        <property name="Geometry">{939,86,70,28}</property>
        <property name="Name">[oOwnerbutton1]</property>
        <property name="Id">[IDOK]</property>
        <property name="Caption">[&amp;OK]</property>
        <property name="TabIndex">1000</property>
      </style>
    </part>
    <part class="button">
      <style>
        <property name="Geometry">{939,118,70,28}</property>
        <property name="Name">[oOwnerbutton2]</property>
        <property name="Id">[IDCANCEL]</property>
        <property name="Caption">[&amp;Cancela]</property>
        <property name="TabIndex">1001</property>
      </style>
    </part>
    <part class="buttonex">
      <style>
        <property name="Geometry">{826,161,182,34}</property>
        <property name="Name">[oBtnPrecificacao]</property>
        <property name="Caption">[F2 - Precificacao]</property>
        <property name="TextColor">4194304</property>
        <property name="font">
          <font name="Arial" width="0" height="-13" weight="400"/>
        </property>
        <property name="WordWrap">.T.</property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">1002</property>
      </style>
      <method name="onClick">
        <![CDATA[ExecutaXML("se_prod_pteq.tel")
RefreshGetlist()]]>
      </method>
    </part>
    <part class="buttonex">
      <style>
        <property name="Geometry">{826,199,182,32}</property>
        <property name="Name">[oBtnDescontos]</property>
        <property name="Caption">[F3 - Descontos Permitidos]</property>
        <property name="TextColor">4194304</property>
        <property name="font">
          <font name="Arial" width="0" height="-13" weight="400"/>
        </property>
        <property name="WordWrap">.T.</property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">1003</property>
      </style>
      <method name="onClick">
        <![CDATA[ExecutaXML("se_prod_descontos.tel")
RefreshGetlist()
]]>
      </method>
    </part>
    <part class="buttonex">
      <style>
        <property name="Geometry">{826,237,182,32}</property>
        <property name="Name">[oBtnSPED]</property>
        <property name="Caption">[F4 - CST/Taxas NFE SPED]</property>
        <property name="TextColor">4194304</property>
        <property name="font">
          <font name="Arial" width="0" height="-13" weight="400"/>
        </property>
        <property name="WordWrap">.T.</property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">1003</property>
      </style>
      <method name="onClick">
        <![CDATA[//DbSeek_Add_Se_Pnfe( m_pCod, .f., .t.)
QuickDialog_Prod_Cst_Edit(m_pcod)]]>
      </method>
    </part>
    <part class="buttonex">
      <style>
        <property name="Geometry">{826,275,182,32}</property>
        <property name="Name">[oBtnComposicao]</property>
        <property name="Caption">[F5 - Composicao do Produto]</property>
        <property name="TextColor">4194304</property>
        <property name="font">
          <font name="Arial" width="0" height="-13" weight="400"/>
        </property>
        <property name="WordWrap">.T.</property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">1003</property>
      </style>
      <method name="onClick">
        <![CDATA[BrwComposicoes(, m_Pcod)
RefreshGetlist()]]>
      </method>
    </part>
    <part class="buttonex">
      <style>
        <property name="Geometry">{826,313,182,32}</property>
        <property name="Name">[oBtnTamanhos]</property>
        <property name="Caption">[F6 - Tamanhos e Cores]</property>
        <property name="TextColor">4194304</property>
        <property name="font">
          <font name="Arial" width="0" height="-13" weight="400"/>
        </property>
        <property name="WordWrap">.T.</property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">1003</property>
      </style>
      <method name="onClick">
        <![CDATA[IF x_operacao=1
   ALERT("Voce deve cadastrar o produto antes de manusear os tamanhos e cores")    
ELSE
ALERT('1')
   Abra('0',R_SIGA,'SE_GREAT','SE_GREAT','SE_GREAT','Str(pcod,6)+Ptam+Pcor')
ALERT('2')
   if(se_prod->peatual<=0,Mensagem('O estoque total do produto esta zerado...',1),Brow_Db('SE_GREAT',.t.))
ALERT('3')
   Se_Great->(DbCloseArea())
ALERT('4')
   DbSelectArea('se_prod')
   // ALERT("zbAction: "+hb_valtoexp(zbAction))
   // ALERT("z_BlkItens: "+hb_valtoexp(z_BlkItens))
   // eval(zbAction,z_BlkItens)
ENDIF]]>
      </method>
    </part>
    <part class="buttonex">
      <style>
        <property name="Geometry">{826,352,182,32}</property>
        <property name="Name">[oBtnLotes]</property>
        <property name="Caption">[F7 - Lotes e Vencimentos]</property>
        <property name="TextColor">4194304</property>
        <property name="font">
          <font name="Arial" width="0" height="-13" weight="400"/>
        </property>
        <property name="WordWrap">.T.</property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">1003</property>
      </style>
      <method name="onClick">
        <![CDATA[IF x_operacao=1
   ALERT("Voce deve cadastrar o produto antes de manusear os tamanhos e cores")    
ELSE
   EVAL(z_BlkItens)
ENDIF]]>
      </method>
    </part>
    <part class="buttonex">
      <style>
        <property name="Geometry">{826,391,182,32}</property>
        <property name="Name">[oBtnObs]</property>
        <property name="Caption">[F8 - Observacoes de Uso]</property>
        <property name="TextColor">4194304</property>
        <property name="font">
          <font name="Arial" width="0" height="-13" weight="400"/>
        </property>
        <property name="WordWrap">.T.</property>
        <property name="Transparent">.T.</property>
        <property name="TabIndex">1003</property>
      </style>
      <method name="onClick">
        <![CDATA[ExecutaXML("se_prod_pobs.tel")]]>
      </method>
    </part>
  </part>
</part>
