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

ACRFSS6.m

Go to the documentation of this file.
ACRFSS6 ;IHS/OIRM/DSD/THL,AEF - EDIT PAY ROLL PERIOD; [ 09/23/2005   9:44 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;**19**;NOV 05, 2001
 ;;ROUTINE TO EDIT PAY ROLL PERIOD INFORMATION
EN S ACREMP=$P(^ACRDOC(ACRDOCDA,"PR"),U)
 S ACREMPPP=$S($P(^ACRAU(ACREMP,1),U,3)'="CO":26,1:12)
 N ACRY
 S ACRSSDA=$O(^ACRSS("C",ACRDOCDA,0))
 I 'ACRSSDA D
 .S ACRJ=1
 .W !!,"NO PAYROLL ENTRIES ON FILE FOR THIS EMPLOYEE"
 .D ADD
 .D ADD^ACRFSS61
 F  D EN1 Q:$D(ACRQUIT)!$D(ACROUT)
EXIT S ACRSSTOT=ACRYTD
 S ACRSS6=""
 K ACRPR,ACRPRDA,ACRDA,ACRY,ACRII,ACRI,ACRX,ACRQUIT,ACRYTD,ACREMP,ACREMPPP,ACRPRAMT,ACRPR
 Q
EN1 D DISPLAY
 I $D(ACRREV) D  Q
 .S ACRQUIT=""
 .D PAUSE^ACRFWARN
 .S ACRQUIT=""
 S DIR(0)="SO^1:Edit Pay Period"_$S((ACRJ/2)<(ACREMPPP+1):";2:Add Pay Period",1:"")_";3:Delete Pay Period"
 S DIR("A")="Which Option ===> "
 D DIR^ACRFDIC
 I X=1 D  Q
 .D EDIT^ACRFSS61
 .K ACRQUIT
 I X=2,(ACRJ/2)<(ACREMPPP+1) D  Q
 .D ADD^ACRFSS61
 .K ACRQUIT
 I X=3 D
 .S ACRDEL=""
 .D EDIT^ACRFSS61
 .K ACRDEL,ACRQUIT
 Q
DISPLAY I $E(IOST,1,2)="C-" D
 .W @IOF
 .W !?10,@ACRON,"PAY ROLL SUMMARY",@ACROF," FOR ",@ACRON
 .;W $P(^VA(200,$P(^ACRDOC(ACRDOCDA,"PR"),U),0),U),@ACROF  ;ACR*2.1*19.02 IM16848
 .W $$NAME2^ACRFUTL1($P(^ACRDOC(ACRDOCDA,"PR"),U)),@ACROF  ;ACR*2.1*19.02 IM16848
 W !!,"PER"
 W ?16,"SALARY"
 W ?25,"| PER"
 W ?43,"SALARY"
 W ?52,"| PER"
 W ?70,"SALARY"
 W !,"IOD"
 W ?5,"AMOUNT"
 W ?14,"YR-TO-DATE"
 W ?25,"| IOD"
 W ?32,"AMOUNT"
 W ?41,"YR-TO-DATE"
 W ?52,"| IOD"
 W ?59,"AMOUNT"
 W ?68,"YR-TO-DATE"
 W !,"--- --------- ----------"
 W ?25,"| --- --------- ----------"
 W ?52,"| --- --------- ----------"
 S (ACRYTD,ACRPRDA)=0
 F ACRJ=1:1 S ACRPRDA=$O(^ACRSS("C",ACRDOCDA,ACRPRDA)) Q:'ACRPRDA  D DP1
 F ACRI=1:2:(ACRJ-2) I ACRI#2=1 S ACRII=$S(ACRI>1:(ACRI+1)/2,1:1) D W
 Q
W S ACRX=$S(ACRII#3=1:"!",ACRII#3=2:"?25,""| """,1:"?52,""| """)
 W @ACRX,ACRII
 S ACRXX=$P(ACRPR(ACRI),U,2)+$P(ACRPR(ACRI+1),U,2)
 S ACRX=$S(ACRII#3=1:"?4",ACRII#3=2:"?31",1:"?58")
 W @ACRX,$J($FN(ACRXX,"P",2),9)
 S ACRX=$S(ACRII#3=1:"?15",ACRII#3=2:"?41",1:"?68")
 W @ACRX,$J($FN($P(ACRPR(ACRI+1),U,3),"P",2),10)
 Q
DP1 S ACRPRAMT=$P(^ACRSS(ACRPRDA,"DT"),U,4)
 S ACRYTD=ACRYTD+ACRPRAMT
 S ACRPR(ACRJ)=ACRPRDA_"^"_ACRPRAMT_"^"_ACRYTD
 Q
EMP S DIR(0)="Y"
 S DIR("A")="Edit Employee Data"
 S DIR("B")="NO"
 D DIR^ACRFDIC
 Q:Y'=1
 N DR
 S DIE="^ACRSS("
 S DR="S DIE(""NO^"")=""NO"";.05T;.04T;K DIE(""NO^"");13AMT FOR PAY PERIOD..: "
 W !
 D DIE^ACRFDIC
 Q
ADD ;S ACRDOC=$E($P(^VA(200,ACREMP,0),U),1,8)_"-"_ACRFDNFY  ;ACR*2.1*19.02 IM16848
 S ACRDOC=$E($$NAME2^ACRFUTL1(ACREMP),1,8)_"-"_ACRFDNFY  ;ACR*2.1*19.02 IM16848
 S DA=ACRDOCDA
 S DIE="^ACRDOC("
 S DR=".14////"_ACRDOC
 D DIE^ACRFDIC
 Q