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

ACRF3542.m

Go to the documentation of this file.
ACRF3542 ;IHS/OIRM/DSD/THL,AEF - GSA FORM 3542; [ 09/22/2005   4:15 PM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;**14,19**;NOV 05, 2001
 ;;PRINT GSA FORM 3542
EN S ACR3542=""
 D EN1
EXIT K ACR
 Q
EN1 D DOC
 Q:$D(ACRQUIT)
 S (ACRSSDA,ACRSSTOT)=0
 F ACRI=1:1 S ACRSSDA=$O(^ACRSS("J",ACRDOCDA,ACRSSDA)) Q:'ACRSSDA  D
 .S ACRSSTOT=ACRSSTOT+$P($G(^ACRSS(ACRSSDA,"DT")),U,4)
 D HEAD,SS
 Q
SS S ACRSSDA=0
 F ACRI=1:1 S ACRSSDA=$O(^ACRSS("J",ACRDOCDA,ACRSSDA)) Q:'ACRSSDA  D S1 Q:$D(ACRQUIT)!$D(ACROUT)
 W !?48,"|7. ESTIMATED TOTAL|",$J($FN(ACRSSTOT,"P",2),12)
 D L
 W !,"8. REMARKS:"
 W !
 D L
 D PAUSE^ACRFWARN
 I $E(IOST,1,2)="P-",IOSL-20<$Y W @IOF D HEAD
 S ACRREFX=103
 D ^ACRFPAPV
 D ^ACRFPSS
 D DISP
 Q
S1 D SETSS^ACRFSSA
 S ACRNSN=$P(ACRSSNMS,U,2)
 S ACRSSDC1=$P(ACRSSDSC,U)
 S:ACRNSN="" ACRNSN=ACRSSDC1
 S:ACRNSN'?4N1"-"2UN1"-"3N1"-"4N.E ACRNSN="9999-99-999-9999"
 S ACRNSN=$TR(ACRNSN,"-","")
 S ACRNSN=$E(ACRNSN,7,14)
 S ACRSN=$P(ACRSS0,U,14)
 F ACRJ=1:1:4-($L(ACRRQD)-1) S ACRRQD="0"_ACRRQD
 F ACRJ=1:1:3-($L(ACRSN)-1) S ACRSN="0"_ACRSN
 D L4
 I IOSL-5<$Y,$O(^ACRSS("J",ACRDOCDA,ACRSSDA)) D  Q
 .D PAUSE^ACRFWARN
 .W @IOF
 I $E(IOST,1,2)="P-",IOSL-5<$Y,$O(^ACRSS("J",ACRDOCDA,ACRSSDA)) D
 .W @IOF
 .D HEAD
 Q
DOC D SETDOC^ACRFEA1
DOC1 ;EP;TO SET FEDSTRIP VARIABLES
 K ACRFLDA,ACRFINDA
 S ACRFS=$G(^ACRDOC(ACRDOCDA,3))
 N ACRI
 F ACRI=11:1:15 I $P(ACRFS,U,ACRI)="" S ACRQUIT="" Q
 S ACRFLDA=$P(ACRFS,U,13)
 S ACRRTID=$P(ACRFS,U,11)
 S ACRFSID=$P(ACRFS,U,12)
 S ACRFINDA=$P(ACRFS,U,14)
 S ACRSIG=$P(ACRFS,U,15)
 S X=$P(ACRDOCDT,U,4)
 S ACRPRIOR=$S(X="E":"03",X="P":"08",1:15)
 S X=+$G(^ACRDOC(ACRDOCDA,"PA"))
 S ACRRA=$P($G(^ACRDOC(ACRDOCDA,"REQ2")),U,8)
 ;S X=$S(X:$P(^VA(200,X,0),U),1:"")  ;ACR*2.1*19.02 IM16848
 S X=$S(X:$$NAME2^ACRFUTL1(X),1:"")  ;ACR*2.1*19.02 IM16848
 S ACRPURA=$P($P(X,",",2)," ")_" "_$P(X,",")
 S ACRLBDA=$P(ACRDOC0,U,6)
 S ACRDPTDA=$P(^ACRLOCB(ACRLBDA,0),U,5)
 S:'ACRFLDA ACRFLDA=$P(^ACRDEPT(ACRDPTDA,0),U,2)
 S ACRFL=$G(^ACRFSCD(+ACRFLDA,0))
 S ACRFLRQ=$P(ACRFL,U,2)
 S ACRFUND=$P(ACRFL,U,3)
 S ACRPODA=$P(^AUTTPRG(ACRDPTDA,0),U,5)
 S ACRPOFON=$S(ACRPODA:$P(^ACRPO(ACRPODA,0),U,9),1:"NOT STATED")
 I 'ACRFINDA,ACRPODA S ACRFINDA=$P(^ACRPO(ACRPODA,0),U,8)
 S ACRFL=$G(^ACRFSCD(+ACRFINDA,0))
 S ACRFINRQ=$P(ACRFL,U,2)
 S ACRRDATE=$P(ACRDOCPO,U,12)
 I ACRRDATE D
 .S X=$E(DT,1,3)_"0101"
 .D H^%DTC
 .S ACRFY=%H,X=ACRRDATE
 .D H^%DTC
 .S X=%H+1-ACRFY
 .S X=$S($L(X)=1:"00"_X,$L(X)=2:"0"_X,1:X)
 .S ACRRDATE=X
 S X1=$P(ACRDOC0,U,3)+1
 S X2=$E($P(ACRDOC0,U,3),1,3)_"0101"
 D ^%DTC
 S ACRJDATE=$P(ACRDOC0,U,26)
 Q
L W $$DASH^ACRFMENU
 Q
L4 W !,ACRI
 W ?3,"|",ACRNSN
 W ?11,"|",$E(ACRSSDC1,1,28)
 W ?42,"|",ACRUI
 W ?48,"|",ACRRQD
 W ?54,"|",$J($FN(ACRUC,"P",2),12)
 W ?67,"|",$J($FN(ACRRQD*ACRUC,"P",2),12)
L3 W !,"---|-------|------------------------------|-----|-----|------------|------------"
 Q
DISP ;TO DISPLAY CUSTOMER ADDRESS
 N DXS,DIP
 W !,"10a. "
 I $G(ACRRA) D
 .;S X=$P($G(^VA(200,ACRRA,0)),U)  ;ACR*2.1*19.02 IM16848
 .S X=$$NAME2^ACRFUTL1(ACRRA)  ;ACR*2.1*19.02 IM16848
 .S X=$P($P(X,",",2)," ")_" "_$P(X,",")
 .W X
 .W ?45,"10b. PHONE: ",$P(^ACRDOC(ACRDOCDA,"REQ"),U,8)
 W !,"11 CUSTOMER ADDRESS"
 D COMADD
 W !,"12. ACTIVITY ADDRESS CODE"
 W !?5,ACRFLRQ
 W !,"13. AGENCY ACCESS CODE"
 W !?5
 W:$P($G(^ACRDOC(ACRDOCDA,18)),U,2)]"" $P(^(18),U,2)
 D PAUSE^ACRFWARN
 Q
 W @IOF
 D L
 W !
 I $E($G(IOST),1,2)="C-" W "ARMS REF: ",$P(^ACRDOC(ACRDOCDA,0),U,6),"/",ACRDOCDA
 W ?20,"CUSTOMER SUPPLY CENTER ORDER"
 W ?60,"DATE: "
 S Y=DT
 X ^DD("DD")
 W Y
 D L
 W !,"If limited quantities are used, local reproduction is authorized.  Otherwise"
 W !,"obtain supplies from the National Forms and Publications Center."
 D L
 W !,"FOR CSC USE ONLY"
 W !
 W:$P($G(^ACRDOC(ACRDOCDA,18)),U)]"" "CSC TICKET NUMBER: ",$P(^(18),U)
 D L
 W !,"DOCUMENT #: ",$P(^ACRDOC(ACRDOCDA,0),U)," (",$P(^(0),U,2),")"
 F I=42,48,54,67 W ?I,"|" ;ACR*2.1*14.01 IM12272
 W !?4,"DHHS #: ",$$EXPDN^ACRFUTL(ACRDOCDA) ;ACR*2.1*14.01 IM12272
 W ?42,"| UNIT"
 W ?48,"| 4."
 W ?54,"|  5."
 W ?67,"|6. EXTENDED"
 W !,"------------------------------------------|  OF"
 W ?48,"| QUAN"
 W ?54,"|  UNIT"
 W ?67,"|    PRICE"
 W !,"1. ITEM #"
 W ?11,"|  2. ITEM DESCRIPTION"
 W ?42,"|ISSUE"
 W ?48,"| TITY"
 W ?54,"|  PRICE "
 W ?67,"|   ESTIMATED"
 D L
 Q
COMADD ;EP;TO PRINT CUSTOMER ADDRESS AND SHIP TO ADDRESS
 N ACRST
 S ACRST=+$G(^ACRDOC(ACRDOCDA,"POST"))
 I ACRST=ACRDPTDA D  Q
 .S D0=ACRDPTDA
 .D ^ACRPDA
 W !?3,"ORDERED BY: ",$P(^AUTTPRG(ACRDPTDA,0),U)
 W !?3,"SHIP TO...:"
 S D0=ACRST
 D ^ACRPDA
 Q