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

PRSAPEX.m

Go to the documentation of this file.
  1. PRSAPEX ; HISC/REL-Pay Period Exceptions ; 3-27-1998
  1. ;;4.0;PAID;**37,43**;Sep 21, 1995
  1. K DIC S DIC="^PRST(458,",DIC(0)="AEQM",DIC("A")="Select PAY PERIOD: " W ! D ^DIC K DIC G:Y<1 EX S PPI=+Y
  1. T0 R !!,"Select T&L Unit (or ALL): ",X:DTIME G:'$T!("^"[X) EX S X=$TR(X,"al","AL") I X="ALL" S TLE="" G L1
  1. K DIC S DIC="^PRST(455.5,",DIC(0)="EMQ" D ^DIC G EX:$D(DTOUT),T0:Y<1
  1. S TLE=$P(Y,"^",2)
  1. L1 W ! K IOP,%ZIS S %ZIS("A")="Select Device: ",%ZIS="MQ" D ^%ZIS K %ZIS,IOP G:POP EX
  1. I $D(IO("Q")) S PRSAPGM="Q1^PRSAPEX",PRSALST="PPI^TLE" D QUE^PRSAUTL G EX
  1. U IO D Q1 D ^%ZISC K %ZIS,IOP G EX
  1. Q1 ; Process Exception List
  1. S PPE=$P($G(^PRST(458,PPI,0)),"^",1),PDT=$G(^PRST(458,PPI,2)),QT=0
  1. S DTE=$P(PDT,"^",1)_" to "_$P(PDT,"^",14),PG=0,HDR=0 D HDR
  1. I TLE'="" S ATL="ATL"_TLE,TL=TLE D Q10 D:'QT H1 Q
  1. S ATL="ATL00"
  1. F S ATL=$O(^PRSPC(ATL)) Q:ATL'?1"ATL".E S TLE=$E(ATL,4,6) D Q10 Q:QT
  1. D:'QT H1 Q
  1. Q10 S NN=""
  1. F S NN=$O(^PRSPC(ATL,NN)) Q:NN="" D Q:QT
  1. . S HDR=0
  1. . F DFN=0:0 S DFN=$O(^PRSPC(ATL,NN,DFN)) Q:DFN<1 D Q:QT
  1. .. Q:'$D(^PRST(458,PPI,"E",DFN,"D",0))
  1. .. F DAY=1:1:14 D FND Q:QT
  1. ..;
  1. ..; If timecard status is other than Timekeeper & a TT8b is on file
  1. ..; then compare calculated OT in TT8B to approved OT in request file.
  1. ..; Display & file OT warning if existing warning is not cleared.
  1. ..;
  1. .. N TT8B,STATUS,WEEK,OT8B,OTAPP
  1. .. S TT8B=$G(^PRST(458,PPI,"E",DFN,5)),STATUS=$P($G(^(0)),"^",2)
  1. .. Q:(STATUS="T")!(TT8B="")
  1. .. F WEEK=1:1:2 D
  1. ... I $$CHECKOT(PPI,WEEK,DFN) D
  1. .... D GETOTS^PRSAOTT(PPE,DFN,TT8B,WEEK,.OT8B,.OTAPP)
  1. .... I OTAPP<OT8B D
  1. ..... D OTDISP(DFN,OT8B,OTAPP,WEEK)
  1. ..... D FILEOTW^PRSAOTTF(PPI,DFN,WEEK,OT8B,OTAPP)
  1. Q
  1. ;
  1. CHECKOT(P,W,E) ;DETERMINE WHETHER TO DO THE OT CHECK
  1. ;
  1. ;input: P--pay period ien, W--week 1 or 2 of pp, E--emp 450 ien
  1. ;return: true or false as described below.
  1. S CHECK=1
  1. ;
  1. ;If no warning on file do OT warnings check (return true).
  1. ;
  1. ;If warning on file for this pay per, week, employee (P,W,E)
  1. ;and status of warning is cleared then don't recheck or display
  1. ;any warning (return false). A status of cleared indicates
  1. ;payroll has cleared the warning to remove it from display.
  1. ;
  1. S WRNIEN=$$WRNEXIST^PRSAOTTF(P,E,W)
  1. Q:'WRNIEN CHECK
  1. ;
  1. Q:$P($G(^PRST(458.6,WRNIEN,0)),"^",5)'="C" CHECK
  1. Q 0
  1. ;
  1. FND D ^PRSATPE Q:'$D(ER)
  1. I 'HDR D:$Y>(IOSL-5) HDR Q:QT W !!,$P(^PRSPC(DFN,0),"^",1)," (",TLE,")" S HDR=1
  1. F K=0:0 S K=$O(ER(K)) Q:K<1 D:$Y>(IOSL-3) HDR Q:QT W !?5,$P(PDT,"^",DAY)," " W:$P(ER(K),"^",2)'="" $P(ER(K),"^",2) W ?28,$P(ER(K),"^",1)
  1. Q
  1. OTDISP(DFN,OT8B,OTAPP,WEEK) ;
  1. I 'HDR D:$Y>(IOSL-5) HDR Q:QT W !!,$P(^PRSPC(DFN,0),"^",1)," (",TLE,")" S HDR=1
  1. D:$Y>(IOSL-3) HDR Q:QT D DISPLAY^PRSAOTT(DFN,OT8B,OTAPP,WEEK)
  1. Q
  1. HDR ; Display Header
  1. D H1 Q:QT W:'($E(IOST,1,2)'="C-"&'PG) @IOF
  1. S PG=PG+1 W !?26,"VA TIME & ATTENDANCE SYSTEM",?72,"Page ",PG
  1. W !!?(81-$L(DTE)\2),DTE W:HDR !!,$P(^PRSPC(DFN,0),"^",1)," (",TLE,")" Q
  1. H1 I PG,$E(IOST,1,2)="C-" R !!,"Press RETURN to Continue.",X:DTIME S:'$T!(X["^") QT=1
  1. Q
  1. EX G KILL^XUSCLEAN
  1. Q