Histórico da Página
...
nOpcAuto | Operação 3 - Inclusão |
aFunc | Array com a informação do funcionário a ser cadastrado o Pré-Abono aFunc[1] Matrícula |
aPreAbo | Array com as informações do Pré-Abono aPreAbo[x,1] Data Inicial |
04. EXEMPLO
...
Bloco de código | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
#INCLUDE "PROTHEUS.CH" |
...
#INCLUDE "TBICONN.CH" |
...
User Function ExPna350() |
...
Local aFunc := {} |
...
Local aPreAbo := {} Local aLogs := {} |
...
Local nOpcAuto := |
...
0 Local nI := 0 Local cMsg := "" Private lMsErroAuto := .F. Private lMsHelpAuto := .T. Private lAutoErrNoFile := .T. PREPARE ENVIRONMENT EMPRESA "T1" FILIAL "D MG 01 " MODULO "PON" ConOut("Inicio: " + Time()) |
...
ConOut(PadC("Rotina |
...
Automática Pré-Abonos", 80)) |
...
aAdd(aFunc, {"RF0_FILIAL", "D MG 01 ", Nil}) // |
...
Filial aAdd(aFunc, {"RF0_MAT" , " |
...
800029" , Nil}) // |
...
Matrícula aAdd(aPreAbo, {}) |
...
aAdd(aPreAbo[1], {"RF0_DTPREI", |
...
CToD(" |
...
01/07/2021"), Nil}) // Data Inicial |
...
aAdd(aPreAbo[1], {"RF0_DTPREF", |
...
CToD(" |
...
01/07/2021"), Nil}) // Data Final |
...
aAdd(aPreAbo[1], {"RF0_HORINI", |
...
08.00, Nil}) // Hora Inicial |
...
aAdd(aPreAbo[1], {"RF0_HORFIM", |
...
17.30, Nil}) // Hora Final |
...
aAdd(aPreAbo[1], {"RF0_CODABO", |
...
"009", Nil}) // Codigo Pre-Abono |
...
aAdd(aPreAbo[1], {"RF0_HORTAB", "N", Nil}) // Conforme Tabela |
...
Padrao // Define que será uma inclusão nOpcAuto := 3 //Chamada do ExecAuto MSExecAuto({|x, y, z| PONA350(x, y, z)}, aFunc, aPreAbo, nOpcAuto |
...
) If !lMsErroAuto ConOut(PadC(" |
...
Cadastro efetuado com sucesso", 80)) |
...
Else
cMsg := "Erro no cadastro!" + CRLF
aLogs := GetAutoGRLog()
For nI := 1 To Len(aLogs)
cMsg += aLogs[nI] + CRLF
Next
ConOut(cMsg)
EndIf
ConOut("Fim : " + Time())
RESET ENVIRONMENT
Return
|
03. ASSUNTOS RELACIONADOS
...
HTML |
---|
<!-- esconder o menu --> <style> div.theme-default .ia-splitter #main { margin-left: 0px; } .ia-fixed-sidebar, .ia-splitter-left { display: none; } #main { padding-left: 10px; padding-right: 10px; overflow-x: hidden; } .aui-header-primary .aui-nav, .aui-page-panel { margin-left: 0px !important; } .aui-header-primary .aui-nav { margin-left: 0px !important; } </style> |
Visão Geral
Import HTML Content
Conteúdo das Ferramentas
Tarefas