Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

nOpcAuto

Operação

3 - Inclusão
4 - Alteração
5 - Exclusão

aFunc

Array com a informação do funcionário a ser cadastrado o Pré-Abono

aFunc[1] Matrícula
aFunc[2] Data Inicial

aPreAbo

Array com as informações do Pré-Abono

aPreAbo[x,1] Data Inicial
aPreAbo[x,2] Data Final
aPreAbo[x,3] Hora Inicial
aPreAbo[x,4] Hora Final
aPreAbo[x,5] Codigo Pre-Abono
aPreAbo[x,6] Conforme Tabela Padrao
aPreAbo[x,7] Pre-Abono Utilizado

04. EXEMPLO

...

Bloco de código
languagepy
firstline1
titleExemplo de Inclusão
linenumberstrue
collapsetrue
#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>