#INCLUDE 'protheus.ch'
#INCLUDE 'parmtype.ch'
#INCLUDE "FWMVCDEF.CH"
#INCLUDE "PONCALEN.CH" User Function At330HRRT() Local cCodTGY := PARAMIXB[1] Local cCodAtend := PARAMIXB[2] Local cDtIni := PARAMIXB[3] Local cDtFim := PARAMIXB[4] Local cDtRef := PARAMIXB[5] Local cTurno := PARAMIXB[6] Local cSeq := PARAMIXB[7] Local aExcec := PARAMIXB[8] Local aCalend Local aCalend :=PARAMIXB PARAMIXB[9] Local cEntra1 := "07:00" Local cSaida1 := "12:00" Local cEntra2 := "13:00" Local cSaida2 := "16:00" Local aHoras := {} Local nI := 1
For nI := 1 To 2
If nI == 1 Aadd(aHoras, {cEntra1,; cSaida1}) If TecConvHr(cEntra1) > TecConvHr(cSaida1) aCalend[CALEND_POS_DATA_APO] := aCalend[CALEND_POS_DATA_APO] - 1 //Data de Referencia aCalend[CALEND_POS_DATA] := aCalend[CALEND_POS_DATA] - 1 //Data EndIf ElseIf nI == 2 Aadd(aHoras, {cEntra2,; cSaida2}) EndIf
Next nI
Return {aHoras, aCalend}
|