terça-feira, 6 de junho de 2017

Aula 1172 WinDev Curso 029 Formulario Custo









Video no Youtube Se Gostou clique aqui para dar joinha





BOA noite
Na aula de hoje, vamos comecar a fazer os ajustes
do custo, para fazer automatico os nivels

Good evening
In today's class, we will begin to make adjustments
Of cost, to make automatic levels


Buenas noches
En la clase de hoy, vamos a empezar a hacer los ajustes
Del coste, para hacer automatico los nivels




help1




Lançamento Curso Iniciante ao Avancado - Windev/Mobile/Webdev 001/... Aula 1133
Criar Analise/Conexao e Tabela de Empresa - Curso 002/... Aula 1140
ErpAmarildo - Menu Principal - Curso 003/... Aula 1145
Menu Ribbon - Menu Principal - Curso 004/... Aula 1146
Botao Empresa - Menu Ribbon - Curso 005/... Aula 1147
Query Empresa - Cadastro Wdl - Curso 006/... Aula 1148
Tabela Empresa - Curso 007 - Aula 1149
Incluir - Botao Incluir Empresa Tabela Codigo - Curso 008 - Aula 1150
Icone Botao de Incluir - Brinde - Curso ErpAmarildo 9/... aula 1151
Icones Novos - Tabela - Curso ErpAmarldo 10/... Aula 1152
Codigos alteracao Tabela Empresa - Curso ErpAmarildo 11/... Aula 1153
Exclusão Codigos - Tabela Empresa - Curso ErpAmarildo 12/... Aula 1154
Procure - TableEnableFilter - Curso ErpAmarildo 13/... Aula 1155
Menu - Empresas - Chamar Wdl - Curso ErpAmarldo 14/... Aula 1156
Analise - Centro Custo - Niveis - Curso ErpAmarildo 15/... Aula 1157
Conexão Hyperfile - Curso ErpAmarildo 16/... Aula 1158
Tabela-Formulario Custos - Curso ErpAmarildo 17... Aula 1159
Menu Erp Custo - Curso ErpAmarildo 18.. Aula 1160
Tabela Seleciona Empresa - Curso Erp 19/... Aula 1162
CODIGO SELECIONA EMPRESA - CURSO ERP 20/... AULA 1163
ERP CHAMA SELECIONA EMPRESA - CURSO ERP 21/... AULA 1164
ERP AJUSTE -APARECER CODIGO E NOME EMPRESA - CURSO ERP22/... AULA 1165
ERP AJUSTE TELA - CURSO ERP23/... AULA 1166
CODIGO JANELA MDI - CURSO ERP 24/... AULA 1167
Conexao Duvida eRP 25/.. AULA 1168
EMPRESA AJUSTANDO - ERP 26/... AULA 1169
Formulario Custo Ajustando erp 27... aula 1170
Tabela Custo Ajustando erp 28 /... AULA 1171
Formulario Custos - Codigos - erp 29/... AULA 1172
x Nao Sair - Curso Erp 30/... AULA 1173



//incluir_nivel_mesmo()
_nivel is int=0
_grupo is boolean=True
_centro_custo is string=""
// vamos primeiro criar 3 variaveis, nivel, grupo e centro custos
// Let's first create 3 variables, level, group and center costs
// Primero crear 3 variables, nivel, grupo y centro de costes
IF TableSelect(TABLE_CUSTOS) = -1 THEN
    // se nao existir nada na tabela
    // If there is nothing in the table
    // Si no hay nada en la tabla
    _nivel=1
    _centro_custo="01"
    // como é a primeira vez, entao vamos deixar fixo 1 e 01
    // As it is the first time, then we will leave fixed 1 and 01
    // Como es la primera vez, entonces vamos a dejar fijos 1 y 01
ELSE
    _nivel=TABLE_CUSTOS.COL_NIVEL
    // aqui pego o nivel atual
    // Here I take the current level
    // Eu bati aqui ou nível Atual   
    TableSelectPlus(TABLE_CUSTOS,TABLE_CUSTOS..Occurrence)
    // vou posicionar a linha da tabela no ultimo registro
    // I will place the row of the table in the last record
    // En el último registro,
    _centro_custo=StringIncrement(TABLE_CUSTOS.COL_CENTRO_CUSTO,FromBeginning)
    // aqui vou pegar o centro de custo, e somar + 1
    // Here I'll get the cost center, and add + 1
    // Aquí voy a recoger el centro de coste, y sumar + 1
END
HReset(CUSTOS)
Open(WIN_Form_CUSTOS,_nivel,_grupo,_centro_custo)   
// estou abrindo janela, mandando parametros, nivel,grupo e centro de custos
// I'm opening the window, sending parameters, level, group and cost center
// Que se abre ventana, mandando parámetros, nivel, grupo y centro de costos
TableDisplay(TABLE_CUSTOS,taCurrentFirst)
// estou atualizando a tabela
// I'm updating the table
// Estoy actualizando la tabla 





//incluir_nivel_mesmo()
//SEM COMENTARIOS

_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
    TableSelectPlus(TABLE_CUSTOS,TABLE_CUSTOS..Occurrence)
    _centro_custo=StringIncrement(TABLE_CUSTOS.COL_CENTRO_CUSTO,FromBeginning)
END
HReset(CUSTOS)
Open(WIN_Form_CUSTOS,_nivel,_grupo,_centro_custo)   
TableDisplay(TABLE_CUSTOS,taCurrentFirst)





















Teste

Teste
teste