Vamos continuar a fazer o codigo da tabela de custo,
no mesmo nivel
Let's continue to do the cost table code,
On the same level
Vamos a seguir haciendo el código de la tabla de coste,
En el mismo nivel
_nivel is int=0
_grupo is boolean=True
_centro_custo is string=""
IF TableSelect(TABLE_CUSTOS) = -1 THEN
_nivel=1
_centro_custo="01"
ELSE
_nivel=TABLE_CUSTOS.COL_NIVEL
_centro_custo=TABLE_CUSTOS.COL_CENTRO_CUSTO
LOOP
_centro_custo=StringIncrement(_centro_custo,FromEnd)
HReadSeekFirst(CUSTOS,chave_idempresa_centrocusto,[gn_retorna_id_empresa_codigo,_centro_custo])
IF HFound(CUSTOS) THEN
ELSE
BREAK
END
END
END
HReset(CUSTOS)
Open(WIN_Form_CUSTOS,_nivel,_grupo,_centro_custo)
TableDisplay(TABLE_CUSTOS,taCurrentFirst)
_nivel is int=0
_grupo is boolean=True
_centro_custo is string=""
IF TableSelect(TABLE_CUSTOS) = -1 THEN
_nivel=1
_centro_custo="01"
ELSE
_nivel=TABLE_CUSTOS.COL_NIVEL
_centro_custo=TABLE_CUSTOS.COL_CENTRO_CUSTO
LOOP
_centro_custo=StringIncrement(_centro_custo,FromEnd)
HReadSeekFirst(CUSTOS,chave_idempresa_centrocusto,[gn_retorna_id_empresa_codigo,_centro_custo])
IF HFound(CUSTOS) THEN
ELSE
BREAK
END
END
END
HReset(CUSTOS)
Open(WIN_Form_CUSTOS,_nivel,_grupo,_centro_custo)
TableDisplay(TABLE_CUSTOS,taCurrentFirst)
http://windevdesenvolvimento.blogspot.com.br/2017/06/aula-1175-windev-curso-erpamarildo-032.html