SE_MOVRO;Movimentos do Produto;sys_tbbrow; 9;0;20;79;se_movxp;;
:SKEL
VARIAVEL Z_BLOCK={|x_prd|se_prod->(dbseek(x_prd)),Str(x_prd,6)+" "+se_prod->pdesc }
VARIAVEL #TEXTO_FONTE
   DEBUGALERT(' ALIAS: '+ALIAS())
   DbCloseArea()
   SetAliasAaMm(SubStr(Dtos(zmData),3,4))
   Abra("0NOIDX", r_siga,"SE_PROD","SE_PROD","SEIP_C","PCOD")
   Abra("0NOIDX", r_siga, SE_MOV,  "SE_MOVNF", seim_p, "FNUMPED")
   ordscope(0,zfNumPed)
   ordscope(1,zfNumPed)
   DbSetFilter( {||fNumPed=zfNumPed .and. mData=zmData}, "fNumPed=zfNumPed .and. mData=zmData" )
   DbSeek(zfNumPed)
#FIM_TEXTO_FONTE
comando saida SetAliasAaMm()
:TBFI
Apresentacao;eval(z_block,pcod);C;@s30;30;N;
Data;MfgEs+" "+Dtoc(MDATA);C;@s10;10;N;
Quant x Valor;Str(MQUANT,4)+" "+Str(Mvalor,9,2);C;@S14;14;N;
NumPed x Nf;Str(FNUMPED,6)+Str(Mfnum,6);C;@s13;13;;
Prevenda;Str(FNUMPrev,10);C;@s10;10;;
COO;FNUMCoo;C;@s6;6;;
