<?xml version="1.0" encoding="UTF-8"?>
<part class="form">
  <style>
    <property name="Geometry">{308,132,1022,598}</property>
    <property name="Name">[sf_pn.scr]</property>
    <property name="Caption">[Prenotas Disponiveis]</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="Variables">{aComboOpcoes}</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 z_Recno := 1
//skel VARIAVEL zBlkCli={|nFor| sccpfor->(DbGoto(nFor),cp_nome) }
//skel VARIAVEL zBlkPrd={|nPcod| se_prod->(dbseek(nPcod)), se_prod->pdesc }

//skel VARIAVEL zbPrtConferente := {||z_recno:=Recno(), Relat('lst_exec("CUPOM_ILHA_ENV_REC")',"nb",,"X"), eVal(zbOpenAll) }
//skel VARIAVEL zbPrtPedido := {||z_recno:=Recno(), Relat('lst_exec("CUPOM_PN_PRT")',"nb",,"X"), eVal(zbOpenAll) }
//skel VARIAVEL zbPrtPedRolo := {||z_recno:=Recno(), Relat("vb_r4(,,'PN',,"+lTrim(Str(fNumPed,11))+")","nb"), eVal(zbOpenAll) }

//skel variavel bCor = {|| if(fg_fat="E", {16777215,255,16777215,10027008},{16711680,16777215,16776960,10027008})}

//skel variavel zbOpenAll=#TEXTO_FONTE
//skel          DBCLOSEAREA()
//skel          Abra ("0NOIDX", r_siga, se_prod, "se_prod", SEIP_C,"PCOD" )
//skel          Abra ('0NOIDX', r_siga, 'sccpfor',  'sccpfor')
//skel          Abra ('0NOIDX', r_siga, 'sp_movf',  'sp_movf',  'sp_movf',  'pfNumPed')
//skel          Abra ('0NOIDX', r_siga, 'sp_pedf',  'sp_pedf',  'sp_pedf',  'pfNumPed')
//skel          DbSetFilter({||"ILHA"$pfCodOp},"ILHA"$pfCodOp)
//skel          DbGoTop()
//skel #FIM_TEXTO_FONTE
//skel variavel znil=eVal(zbOpenAll)

//skel COMANDO SAIDA sp_movf->(DbCloseArea())

oContextMenu:=Hwg_ContextMenu()
hwg_Btn(oToolbar,5,5,64,64)
hwg_TbMt(oToolbar,"80;tb_pesq(D_OB);P-Pesquisa;P-Pesquisa;xml\icon\Pesquisanfe.ico;47;47;;")
hwg_TbMt(oToolbar,"0;;;espaco;espaco;")

hwg_TbMt(oToolbar,' 73;eVal(zbPrtConferente);I-Conferente;I-Imprime o Conferente de separacao de produtos;impressora.ico;;;;;&I-Conferente;;;')
//hwg_TbMt(oToolbar,' 73;eVal(zbPrtPedido);1-Pedido;I-Imprime Copia do Pedido com Valores;impressora.ico;;;;;&1-Pedido;;;')
//hwg_TbMt(oToolbar,' 73;eVal(zbPrtPedRolo);3-Pedido;A-Imprime Pedido em impressora de rolo;impressora.ico;;;;;&3=Ped.Rolo;;;')

hwg_TbMt(oToolbar,"0;;;espaco;espaco;")
hwg_TbMt(oToolbar,"0;;;espaco;espaco;")
hwg_TbMt(oToolbar,"27;hwg_oDlgKey(oDlg,27,nBrwAtivo);Saida;Saida;xml\icon\saida.ico;;;;;")

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,' 84;tb_locate(D_oB);T-Trecho ;T-Pesquisa Trecho na coluna do cursor;sembitmap;;;Lucida Bright;-11;&T-Trecho;;6;')
hwg_TbMt(oToolbar,' 61;doget(D_ob,,.t.);=-Repete_Edicao ;= - Repete_Edicao;sembitmap;;;Lucida Bright;-11;&=-Repete_Edicao;;6;')
hwg_TbMt(oToolbar,' 65;doget(D_ob);A-Edita;A-Edita a Coluna sob o cursor;sembitmap;;;Lucida Bright;-11;A=Editar;;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()

d_ob:lEditable = .t.]]>
  </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,69,1000,333}</property>
      <property name="Name">[D_oB]</property>
      <property name="Anchor">15</property>
      <property name="GridLinesSepColor">0</property>
      <property name="TabIndex">4</property>
    </style>
    <method name="onGetFocus">
      <![CDATA[nBrwAtivo:=1]]>
    </method>
    <method name="onPosChange">
      <![CDATA[oBrwItens:Refresh()]]>
    </method>
    <method name="onInit">
      <![CDATA[hwg_TbFi(D_oB, 'Abast/Recolh;pfNumPed;N;999999;12;S;')
hwg_TbFi(D_oB, 'Emissao;pfDataEmi;D;; 8;;')

hwg_TbFi(D_oB, 'Tipo;if(fg_fat="E","Abastecimento","Recolhimento");P;@S15; 15;;')

hwg_TbFi(D_oB, 'Ilha;PFFOR;N;99999;  5;;')
hwg_TbFi(D_oB, 'Valor;PFVAL;N;9999999.99; 10;;')
hwg_TbFi(D_oB, 'Unids;fQuant;N;9999999.99; 10;;')

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_PEDF",.F.,.T.,{||.T.} }

AADD(aBrowses,{D_oB,D_oB:Alias,{||.f.},{|| .T.},})
]]>
    </method>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{647,0,227,67}</property>
      <property name="Name">[oLabel1]</property>
      <property name="Caption">[Envios / Recolhimentos]</property>
      <property name="Justify">[Right]</property>
      <property name="font">
        <font name="Arial" width="0" height="-29" weight="700"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">5</property>
    </style>
  </part>
  <part class="browse">
    <style>
      <property name="Geometry">{148,408,862,137}</property>
      <property name="Name">[oBrwItens]</property>
      <property name="Anchor">14</property>
      <property name="font">
        <font name="Arial" width="0" height="-13" weight="400"/>
      </property>
      <property name="TabIndex">6</property>
    </style>
    <method name="onInit">
      <![CDATA[DBSELECTAREA( 'sp_movf' ) 

oBrwItens:Alias := 'sp_movf'
oBrwItens:bColorSel:= RGB(3,23,133)
oBrwItens:tColorSel:= RGB(255,255,255)

hwg_TbFi(@oBrwItens, 'Prod;pCod;N;999999;6;;')
hwg_TbFi(@oBrwItens, 'Descricao;eVal(zBlkPrd,pCod);C;@S50;50;;')
hwg_TbFi(@oBrwItens, 'Qtd;unid_fech;N;999999;6;;')
hwg_TbFi(@oBrwItens, 'Custo;mValor3;N;999999.99;9;;')

oBrwItens:lFilter := .T.
oBrwItens:bFirst := {|| sp_movf->( DBSEEK( Sp_pedF->pfNumPed, .F. ) ) } 
oBrwItens:bLast  := {|| sp_movf->( DBSEEK( Sp_pedF->pfNumPed , .F., .T. ) ) }
oBrwItens:bWhile := {|| sp_movf->pfNumPed = Sp_pedF->pfNumPed }
oBrwItens:Refresh()
DbSelectArea( 'Sp_pedF' )
]]>
    </method>
  </part>
</part>
