ACRFPRS ;IHS/OIRM/DSD/THL,AEF - PRINT PAY ROLL SUMMARY; [ 09/23/2005 9:44 AM ]
;;2.1;ADMIN RESOURCE MGT SYSTEM;**19**;NOV 05, 2001
;;ROUTINE TO PRINT PAY ROLL SUMMARY
EN N ACRI,ACRY
S ACRXCUT="I $E($G(IOST),1,2)=""C-"" D PAUSE^ACRFWARN"
S ACRX=$P(^ACRDOC(ACRDOCDA,0),U,14)
S ACREMP=$P(^ACRDOC(ACRDOCDA,"PR"),U)
;S ACREMP=$P(^VA(200,ACREMP,0),U) ;ACR*2.1*19.02 IM16848
S ACREMP=$$NAME2^ACRFUTL1(ACREMP) ;ACR*2.1*19.02 IM16848
S ACREMP=$P(ACREMP,",",2)_" "_$P(ACREMP,",")
S ACRFY=$P(ACRX,"-",2)
D HEAD
D EN1
D TAIL
X ACRXCUT
EXIT K ACRBEN,ACRXCUT,ACRY,ACRTOT,ACRTSAL,ACRTBEN,ACRSS,ACRKW,ACRSAL,ACRX,ACREMP,ACRFY
Q
EN1 S (ACRY,ACRTOT,ACRTSAL,ACRTBEN)=0
F S ACRY=$O(^ACRSS("C",ACRDOCDA,ACRY)) Q:'ACRY D W
Q
W S ACRSS=^ACRSS(ACRY,0)
S ACRKW=$P(^ACRSS(ACRY,"NMS"),U,5)
S ACRSAL=$P(^ACRSS(ACRY,"DT"),U,4)
S ACRTSAL=ACRTSAL+ACRSAL
S ACRY=$O(^ACRSS("C",ACRDOCDA,ACRY))
S ACRBEN=$P(^ACRSS(ACRY,"DT"),U,4)
S ACRTBEN=ACRTBEN+ACRBEN
S ACRTOT=ACRTOT+ACRBEN+ACRSAL
W !?5,$P(ACRSS,U)
W ?34,"| ",$J($FN(ACRSAL,"P",2),10)
W ?49,"| ",$J($FN(ACRBEN,"P",2),10)
X ACRXCUT
D HEAD
Q
HEAD W @IOF
W !,"PAY ROLL SUMMARY FOR: ",ACREMP
W $$DASH^ACRFMENU
W !?5,"PAY PERIOD (FOR FY ",ACRFY,"): "
W ?34,"| SALARY"
W ?49,"| BENEFITS"
W $$DASH^ACRFMENU
Q
TAIL W $$DASH^ACRFMENU
W !?34,"| ",$J($FN(ACRTSAL,"P",2),10)
W ?49,"| ",$J($FN(ACRTBEN,"P",2),10)
W !?25,"TOTAL: "
W ?36,$J($FN(ACRTOT,"P",2),10)
Q
ACRFPRS ;IHS/OIRM/DSD/THL,AEF - PRINT PAY ROLL SUMMARY; [ 09/23/2005 9:44 AM ]
+1 ;;2.1;ADMIN RESOURCE MGT SYSTEM;**19**;NOV 05, 2001
+2 ;;ROUTINE TO PRINT PAY ROLL SUMMARY
EN NEW ACRI,ACRY
+1 SET ACRXCUT="I $E($G(IOST),1,2)=""C-"" D PAUSE^ACRFWARN"
+2 SET ACRX=$PIECE(^ACRDOC(ACRDOCDA,0),U,14)
+3 SET ACREMP=$PIECE(^ACRDOC(ACRDOCDA,"PR"),U)
+4 ;S ACREMP=$P(^VA(200,ACREMP,0),U) ;ACR*2.1*19.02 IM16848
+5 ;ACR*2.1*19.02 IM16848
SET ACREMP=$$NAME2^ACRFUTL1(ACREMP)
+6 SET ACREMP=$PIECE(ACREMP,",",2)_" "_$PIECE(ACREMP,",")
+7 SET ACRFY=$PIECE(ACRX,"-",2)
+8 DO HEAD
+9 DO EN1
+10 DO TAIL
+11 XECUTE ACRXCUT
EXIT KILL ACRBEN,ACRXCUT,ACRY,ACRTOT,ACRTSAL,ACRTBEN,ACRSS,ACRKW,ACRSAL,ACRX,ACREMP,ACRFY
+1 QUIT
EN1 SET (ACRY,ACRTOT,ACRTSAL,ACRTBEN)=0
+1 FOR
SET ACRY=$ORDER(^ACRSS("C",ACRDOCDA,ACRY))
IF 'ACRY
QUIT
DO W
+2 QUIT
W SET ACRSS=^ACRSS(ACRY,0)
+1 SET ACRKW=$PIECE(^ACRSS(ACRY,"NMS"),U,5)
+2 SET ACRSAL=$PIECE(^ACRSS(ACRY,"DT"),U,4)
+3 SET ACRTSAL=ACRTSAL+ACRSAL
+4 SET ACRY=$ORDER(^ACRSS("C",ACRDOCDA,ACRY))
+5 SET ACRBEN=$PIECE(^ACRSS(ACRY,"DT"),U,4)
+6 SET ACRTBEN=ACRTBEN+ACRBEN
+7 SET ACRTOT=ACRTOT+ACRBEN+ACRSAL
+8 WRITE !?5,$PIECE(ACRSS,U)
+9 WRITE ?34,"| ",$JUSTIFY($FNUMBER(ACRSAL,"P",2),10)
+10 WRITE ?49,"| ",$JUSTIFY($FNUMBER(ACRBEN,"P",2),10)
+11 XECUTE ACRXCUT
+12 DO HEAD
+13 QUIT
HEAD WRITE @IOF
+1 WRITE !,"PAY ROLL SUMMARY FOR: ",ACREMP
+2 WRITE $$DASH^ACRFMENU
+3 WRITE !?5,"PAY PERIOD (FOR FY ",ACRFY,"): "
+4 WRITE ?34,"| SALARY"
+5 WRITE ?49,"| BENEFITS"
+6 WRITE $$DASH^ACRFMENU
+7 QUIT
TAIL WRITE $$DASH^ACRFMENU
+1 WRITE !?34,"| ",$JUSTIFY($FNUMBER(ACRTSAL,"P",2),10)
+2 WRITE ?49,"| ",$JUSTIFY($FNUMBER(ACRTBEN,"P",2),10)
+3 WRITE !?25,"TOTAL: "
+4 WRITE ?36,$JUSTIFY($FNUMBER(ACRTOT,"P",2),10)
+5 QUIT