SE_SALDO;Evolucao dos Saldos;sys_tbbrow; 5; 0;20;79;padrao;;
:SKEL
VARIAVEL z_blkprd = {|x_prd| se_prod->(dbseek(x_prd)), se_prod->pdesc }
VARIAVEL w_colsep = " "+chr(179)
VARIAVEL z_xBlk = "Z_Sele:=Select(),"
VARIAVEL z_xBlk = z_xBlk + 'Abra("0",r_siga,"SE_MOV","SE_MOV","SEIM_C","PCOD","seim_f","mfnum"),'
VARIAVEL z_xBlk = z_xBlk + "Brow_Db('SE_MOVIP',.t.),"
VARIAVEL z_xBlk = z_xBlk + 'Se_MOV->(DbCloseArea()),'
VARIAVEL z_xBlk = z_xBlk + "DbSelectArea(z_sele)"
VARIAVEL z_BlkItens = _CreateBlock( z_xBlk )
VARIAVEL z_xBlk = ""
VARIAVEL w_colsep = " "+chr(179)
COMANDO ANTES ABRA("0RO",r_siga,"se_prod","se_prod","seip_c","pcod")
COMANDO ANTES DbSelectArea("SE_SALDO")
COMANDO DEPOIS Se_Prod->( DbCloseArea() )
:TBMT
 13;doget(D_ob);Enter-Edita ;
  7;tb_del(D_ob);DEL-DELeta ;
 65;tb_update(D_OB);A-Altera ;
 22;tb_insert(D_OB);Ins-Inclui ;
 63;Eval(z_BlkItens);?-Movimentacao ;
 80;tb_pesq(D_OB);P-Pesquisa ;
 79;tb_index(D_OB);O-Ordena ;
 73;lst_alias(D_OB);I-Imprime ;
 70;tb_filter(d_ob);F-Filtra ;
 69;tb_filter(d_ob,"Exp");E-Filtra_Expressao;
 67;tb_locate(D_OB);C-Continua_Busca ;
 84;tb_locate(D_OB);T-Busca_Trecho ;
 76;tb_locate(D_OB);L-Busca_Iniciais ;
:TBFI
Cod;PCOD;N;99999;  5;;
AaMm;ANOMES;C;xxxx;  4;N;
Descricao;eval(z_blkprd,pcod);C;@s30;23;N;
SaldoInicial;PEATUAL;N;999999.99999;12;S;
PrCstInicial;if(peatual<=0,PVLU,PVLUTotIni/Peatual);N;9999.9999;9;N;
PrCST;PVLU;N;99999.9999;10;S;
PrTotalIni;PVLUTotIni;N;99999.9999;10;S;
UndEnt;Se;N;99999.99;8;N;
ValEnt;vse;N;99999.99;8;N;
CstEnt;if(se>0,vse/se,0);N;99999.99;8;N;
UndSai;Ss;N;99999.99;8;N;
ValSai;vss;N;99999.99;8;N;
CstSai;if(ss>0,vss/ss,0);N;99999.99;8;N;
Div;DIVISAO;N;99;3;N;
Subd;PDIVISAO;C;xxxx;4;N;
PrUnit;PVLU;N;999999.99999; 17;S;
PrFab;PVLUVEN3;N;999999.99999; 17;;
PrVenda;PVLUVENDA;N;999999.99999; 17;;
