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

PRSAPRT.m

Go to the documentation of this file.
  1. PRSAPRT ; HISC/REL,WIRMFO/JAH-Return Record to TimeKeeper ;1/31/2007
  1. ;;4.0;PAID;**7,8,21,111,132**;Sep 21, 1995;Build 13
  1. ;;Per VHA Directive 2004-038, this routine should not be modified.
  1. ;
  1. ; Comments & Modifications by JAH Washington IRMFO.
  1. ; Timecards are returned to Time Keeper 4 correction &
  1. ; re-certification, only 4 pay period being processed & they
  1. ; must be returned be4 timecards have been transmitted to
  1. ; Austin. Time cards 4 pay period just closed are to be
  1. ; transmitted to Austin by 10 am on Wednesday of first week
  1. ; of current pay period. There may be a period in begining
  1. ; of a new pay period in which an employee has been set up
  1. ; with a new pay plan & their time card has not been
  1. ; decomposed & transmitted. If this is case Austin will reject
  1. ; card due to conflicting pay plans.
  1. ;
  1. N PPERIOD,OLDPP,PAYP
  1. ;
  1. ;Ask User for pay period
  1. S DIC="^PRST(458,",DIC(0)="AEQM"
  1. S DIC("A")="Select PAY PERIOD: "
  1. W !
  1. D ^DIC K DIC
  1. ;
  1. ;Quit if invalid pay period
  1. G:Y<1 EX
  1. S PPI=+Y,PPERIOD=$P(Y,"^",2)
  1. ;
  1. NME ;ask for name of employee who's timecard is to be returned.
  1. K DIC
  1. S DIC("A")="Select EMPLOYEE: "
  1. S DIC(0)="AEQM"
  1. S DIC="^PRSPC("
  1. W !
  1. D ^DIC S DFN=+Y K DIC
  1. ;Quit if employees name not found in file 450 (PAID employee).
  1. G:DFN<1 EX
  1. ;
  1. I '$D(^PRST(458,PPI,"E",DFN,0)) W $C(7),!!,"No Record exists to return!" G EX
  1. ;
  1. ;Display message to payroll if employee has changed pay plans.
  1. ;Austin will reject a timecard if pay plan is different.
  1. S GO=1
  1. S OLDPP=$$OLDPP^PRS8UT(PPERIOD,DFN)
  1. S PAYP=$P($G(^PRSPC(DFN,0)),"^",21)
  1. I OLDPP'=0,(OLDPP'=PAYP) D
  1. . W !,"PLEASE NOTE: Employee has changed pay plans. "
  1. . W !,"Current Pay Plan: ",PAYP
  1. . W !,"Pay Plan during Pay Period ",PPERIOD," ",OLDPP
  1. . S GO=$$CONTINUE^PRSAUTL
  1. I 'GO G EX
  1. ;
  1. S STAT=$P($G(^PRST(458,PPI,"E",DFN,0)),"^",2)
  1. I "T"[STAT W $C(7),!!,"TimeKeeper still has this Employee." G EX
  1. I STAT="P" D B W !!," . . . Returned to Timekeeper." G EX
  1. W $C(7),!!,"Warning! This Employee has already been Transmitted."
  1. A R !!,"Return to Timekeeper Anyway? ",X:DTIME G:'$T!(X["^") EX S:X="" X="*" S X=$TR(X,"yesno","YESNO")
  1. I $P("YES",X,1)'="",$P("NO",X,1)'="" W $C(7)," Answer YES or NO" G A
  1. I X?1"Y".E D B W !!," . . . Returned to Timekeeper." G EX
  1. G EX
  1. ;reset status and telework indicator
  1. B S $P(^PRST(458,PPI,"E",DFN,0),"^",2)="T",$P(^(0),"^",8)="" K ^(5)
  1. D AUTOPINI^PRS8(PPI,DFN)
  1. Q
  1. EX G KILL^XUSCLEAN