- ACRFRRP2 ;IHS/OIRM/DSD/AEF - DISPLAY RECEIVING REPORT REMARKS [ 11/01/2001 9:44 AM ]
- ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
- ;
- ;
- ;This routine displays the receiving report remarks when
- ;printing receiving reports.
- ;
- REM(ACRDOCDA,ACRRRDA) ;EP
- ;----- DISPLAY RECEIVING REPORT REMARKS
- ;
- ;If the Receiving Report Remarks field #170 in the FMS Document
- ;file contains data, then this data will be displayed. This is
- ;the old remarks field. If the Receiving Report Remarks field
- ;in the FMS Receiving Report file contains data, then this data
- ;will be displayed. This is the new remarks field. Both fields
- ;are evaluated in case old receiving reports that were created
- ;before the new field was placed in the FMS Receiving Reports
- ;file need to be printed. Called by print template [ACR
- ;RECEIVING REPORT]
- ;
- ; INPUT:
- ; ACRDOCDA = DOCUMENT NUMBER IEN FROM FMS DOCUMENT FILE
- ; ACRRRDA = RECEIVING REPORT IEN FROM FMS RECEIVING REPORT
- ; FILE
- ;
- I '$D(^ACRRR(+ACRRRDA,13)) D Q
- . I $D(^ACRDOC(+ACRDOCDA,17)) D DOC(+ACRDOCDA)
- I $D(^ACRRR(+ACRRRDA,13)) D RR(+ACRRRDA)
- Q
- DOC(D0) ;----- PRINT REMARKS FROM FMS DOCUMENT FILE
- ;
- N D1,DIWL,DIWR,X
- S D1=0
- F S D1=$O(^ACRDOC(D0,17,D1)) Q:'D1 D
- . S X=^ACRDOC(D0,17,D1,0)
- . S DIWL=10
- . S DIWR=75
- . D ^DIWP
- D ^DIWW
- Q
- RR(D0) ;----- PRINT REMARKS FROM FMS RECEIVING REPORT FILE
- ;
- N D1,DIWL,DIWR,X
- S D1=0
- F S D1=$O(^ACRRR(D0,13,D1)) Q:'D1 D
- . S X=^ACRRR(D0,13,D1,0)
- . S DIWL=10
- . S DIWR=75
- . D ^DIWP
- D ^DIWW
- Q
- ACRFRRP2 ;IHS/OIRM/DSD/AEF - DISPLAY RECEIVING REPORT REMARKS [ 11/01/2001 9:44 AM ]
- +1 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
- +2 ;
- +3 ;
- +4 ;This routine displays the receiving report remarks when
- +5 ;printing receiving reports.
- +6 ;
- REM(ACRDOCDA,ACRRRDA) ;EP
- +1 ;----- DISPLAY RECEIVING REPORT REMARKS
- +2 ;
- +3 ;If the Receiving Report Remarks field #170 in the FMS Document
- +4 ;file contains data, then this data will be displayed. This is
- +5 ;the old remarks field. If the Receiving Report Remarks field
- +6 ;in the FMS Receiving Report file contains data, then this data
- +7 ;will be displayed. This is the new remarks field. Both fields
- +8 ;are evaluated in case old receiving reports that were created
- +9 ;before the new field was placed in the FMS Receiving Reports
- +10 ;file need to be printed. Called by print template [ACR
- +11 ;RECEIVING REPORT]
- +12 ;
- +13 ; INPUT:
- +14 ; ACRDOCDA = DOCUMENT NUMBER IEN FROM FMS DOCUMENT FILE
- +15 ; ACRRRDA = RECEIVING REPORT IEN FROM FMS RECEIVING REPORT
- +16 ; FILE
- +17 ;
- +18 IF '$DATA(^ACRRR(+ACRRRDA,13))
- Begin DoDot:1
- +19 IF $DATA(^ACRDOC(+ACRDOCDA,17))
- DO DOC(+ACRDOCDA)
- End DoDot:1
- QUIT
- +20 IF $DATA(^ACRRR(+ACRRRDA,13))
- DO RR(+ACRRRDA)
- +21 QUIT
- DOC(D0) ;----- PRINT REMARKS FROM FMS DOCUMENT FILE
- +1 ;
- +2 NEW D1,DIWL,DIWR,X
- +3 SET D1=0
- +4 FOR
- SET D1=$ORDER(^ACRDOC(D0,17,D1))
- IF 'D1
- QUIT
- Begin DoDot:1
- +5 SET X=^ACRDOC(D0,17,D1,0)
- +6 SET DIWL=10
- +7 SET DIWR=75
- +8 DO ^DIWP
- End DoDot:1
- +9 DO ^DIWW
- +10 QUIT
- RR(D0) ;----- PRINT REMARKS FROM FMS RECEIVING REPORT FILE
- +1 ;
- +2 NEW D1,DIWL,DIWR,X
- +3 SET D1=0
- +4 FOR
- SET D1=$ORDER(^ACRRR(D0,13,D1))
- IF 'D1
- QUIT
- Begin DoDot:1
- +5 SET X=^ACRRR(D0,13,D1,0)
- +6 SET DIWL=10
- +7 SET DIWR=75
- +8 DO ^DIWP
- End DoDot:1
- +9 DO ^DIWW
- +10 QUIT