Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PRS8MSC1

PRS8MSC1.m

Go to the documentation of this file.
  1. PRS8MSC1 ;HISC/DAD,WCIOFO/MGD,SAB-MISC TIME CARD ADJUST(contd) ;1/30/2007
  1. ;;4.0;PAID;**56,68,111**;Sep 21, 1995;Build 2
  1. ;;Per VHA Directive 2004-038, this routine should not be modified.
  1. ;
  1. ; This routine may automatically charge days to WP (leave without pay)
  1. ; if the employee has not performed any duty during the week. This
  1. ; routine is only called for employees on a daily tour.
  1. ; The software does not automatically charge NP (Non Pay) since the
  1. ; effective start or end day may be on a day off such that an entire
  1. ; week should not be charged to NP.
  1. ;
  1. ; This routine is called from PRS8MSC0.
  1. ;
  1. NODUTY ;
  1. ; inputs
  1. ; PY - pay period IEN
  1. ; DFN - employee IEN
  1. ;
  1. N CHGDAY,DO,DW,DY,END,EXC,START,TOD,WEEK
  1. ;
  1. ; loop thru both weeks in pay period
  1. F WEEK=1,2 D
  1. . ; init week counts and list of days that could be charged
  1. . S (DW,DW("WP"),DW("NP"),DW("HX"),DO("CP"))=0
  1. . K CHGDAY
  1. . ;
  1. . ; loop thru days in week
  1. . I WEEK=1 S START=1,END=7
  1. . I WEEK=2 S START=8,END=14
  1. . F DY=START:1:END D
  1. . . ; get tour and how day was charged
  1. . . S TOD=$P($G(^PRST(458,PY,"E",DFN,"D",DY,0)),U,2)
  1. . . S EXC=$P($G(^PRST(458,PY,"E",DFN,"D",DY,2)),U,3)
  1. . . ; update if day charged differently due to encapsulation
  1. . . I $D(^TMP($J,"PRS8",DY,2,0)) S EXC=^TMP($J,"PRS8",DY,2,0)
  1. . . ;
  1. . . ; update week counts for the day
  1. . . I TOD>1 D ; scheduled work day
  1. . . . S DW=DW+1
  1. . . . I EXC="WP" S DW("WP")=DW("WP")+1
  1. . . . I EXC="NP" S DW("NP")=DW("NP")+1
  1. . . . I EXC="HX" S DW("HX")=DW("HX")+1,CHGDAY(DY)="" ; add HX to list
  1. . . I TOD=1 D ; day off
  1. . . . I EXC="CP" S DO("CP")=DO("CP")+1
  1. . . . I EXC="" S CHGDAY(DY)="" ; add not charged day off to list
  1. . ;
  1. . ; if all work days were counted as a combination of WP, NP, and HX
  1. . ; and at least one day was counted as WP and no days off were counted
  1. . ; as CP then automatically charge appropriate remaining days to WP.
  1. . I DW("WP")+DW("NP")+DW("HX")'<DW,DW("WP")>0,DO("CP")=0 D
  1. . . D SET^PRS8EX0(DFN,PY,"WP",3,.CHGDAY)
  1. ;
  1. Q