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

PRCHRCS.m

Go to the documentation of this file.
PRCHRCS ;SF/TKW-PRINT REPORTS SHOWING PPM WHAT LOG CODE SHEETS NEED TO BE GENERATED ;9/12/96
V ;;5.1;IFCAP;;Oct 20, 2000
 ;Per VHA Directive 10-93-142, this routine should not be modified.
 ;
EN S PRCHSAVQ=PRCHQ,PRCHQ=PRCHQ_"^PRCHRCS",PRCHQ("DEST")="S" D ^PRCHQUE
 W !!!,$C(7),"After checking the report, you will need to purge the NONEXPENDABLE",!,"entries from the list.  Since the codesheets for NONEXPENDABLE goods have",!
 W "not yet been programmed, the stations must use either FALCON, or the",!,"KEYPUNCH A CODESHEET option to create these entries, rather than this",!,"option.  Therefore, they no longer need to be on the list.",!
 S %A="Delete NONEXPENDABLE entries from list",%B="Answer YES if you do not want to see these entries on the next report",%=1 D YN^PRCFYN I %'=1 G Q2
 S PRCH=$S(PRCHSAVQ["EN1":"AE",PRCHSAVQ["EN2":"AF",1:"") I PRCH="" G Q2
 F PRCHPO=0:0 S PRCHPO=$O(^PRC(442,PRCH,"N",PRCHPO)) Q:'PRCHPO  I $D(^PRC(442,PRCHPO,0)),+^(0)=PRC("SITE"),$D(^(1)),$P(^(1),U,18)="N" W $P(^(0),U,1),! D DEL
 ;
Q2 K PRCH,PRCHSAVQ,PRCHQ Q
 ;
EN1 ;PRINT REPORT OF ACQUISITIONS CODE SHEETS TO BE DONE
 S PRCHRPT=1,PRCH="AE" G RD
 ;
EN2 ;PRINT REPORT OF RECV.REPORT CODE SHEETS TO BE DONE
 S PRCHRPT=2,PRCH="AF"
 ;
RD K ^TMP($J) S Y=DT D DD^%DT S PRCHDT=Y,PRCHPAGE=0 D HD
 F PRCHPO=0:0 S PRCHPO=$O(^PRC(442,PRCH,"N",PRCHPO)) Q:'PRCHPO  D
 .I $D(^PRC(442,PRCHPO,0)) S X=$P(^(0),U,1)
 .Q:$P($G(^PRC(442,PRCHPO,0)),"^",2)=25
 .I +$G(X)=PRC("SITE") S ^TMP($J,$P(X,"-",2))=PRCHPO I $D(^PRC(442,PRCHPO,1)),$P(^(1),U,18)="N" S $P(^TMP($J,$P(X,"-",2)),U,2)="**"
 S PRCHPONO=""
 F J=0:0 S PRCHPONO=$O(^TMP($J,PRCHPONO)) Q:PRCHPONO=""  S PRCHPO=$P(^(PRCHPONO),U,1),PRCHNON=$P(^(PRCHPONO),U,2) D P1 I PRCHRPT=2 F PRCHFPT=0:0 S PRCHFPT=$O(^PRC(442,"AF","N",PRCHPO,PRCHFPT)) Q:'PRCHFPT  D P2
 G Q
 ;
P1 D:PRCHDY>60 HD
 W !,?1,PRCHNON,?4,PRCHPONO D PODATA W ?15,Y,?30,PRCHMOP,?62,PRCHSFC,!,?7,PRCHVND S PRCHDY=PRCHDY+2 I PRCHRPT=1 W ! S PRCHDY=PRCHDY+1
 Q
 ;
PODATA S X=^PRC(442,PRCHPO,0)
 S PRCHMOP=$P($G(^PRCD(442.5,+$P(X,U,2),0)),U,1)
 S Y=$P(^DD(442,.03,0),U,3),PRCHSFC=$P(X,U,19) I PRCHSFC F I=1:1 S X=$P(Y,";",I) Q:X=""  I $P(X,":",1)=PRCHSFC S PRCHSFC=$P(X,":",2) Q
 S Y=$G(^PRC(442,PRCHPO,1)),PRCHVND=$P($G(^PRC(440,+Y,0)),U,1),Y=+$P(Y,U,15) D DD^%DT
 Q
 ;
P2 Q:'$D(^PRC(442,PRCHPO,11,PRCHFPT,0))  S Y=+^(0) D DD^%DT S PRCHRDT=Y D:PRCHDY>60 HD W ?45,$J(PRCHFPT,6),?57,PRCHRDT,! S PRCHDY=PRCHDY+1
 Q
 ;
HD S PRCHPAGE=PRCHPAGE+1 W @IOF,$S(PRCHRPT=1:"ACQUISITIONS",1:"RECEIVING REPORTS")_" NEEDING LOG CODE SHEETS--STATION: ",PRC("SITE"),?67,PRCHDT,?88,"PAGE ",PRCHPAGE,!
 W ?1,"(NOTE: ** INDICATES NONEXPENDABLE ORDERS)",!
 W ?4,"P.O.NO.",?15,"P.O.DATE",?30,"METHOD OF PROCESSING",?62,"SPECIAL FUND CONTROL POINT",!,?7,"VENDOR"
 I PRCHRPT=2 W ?45,"PARTIAL",?57,"DATE RECEIVED"
 W ! F J=0:1:(IOM-2) W "-"
 W ! S PRCHDY=5
 Q
 ;
Q W $C(13),! K X,Y,I,J,PRCH,PRCHDT,PRCHDY,PRCHFPT,PRCHMOP,PRCHNON,PRCHPAGE,PRCHPO,PRCHPONO,PRCHRDT,PRCHRPT,PRCHSFC,PRCHVND
 I $D(ZTSK) D KILL^%ZTLOAD
 Q
 ;
DEL ;DELETE NON-EXPENDABLE ORDERS FROM LIST OF ORDERS NEEDING CODE-SHEETS PROCESSED.
 I PRCH="AE" S DIE="^PRC(442,",DA=PRCHPO,DR="103.5///@" D ^DIE K DIE,DA,DR Q
 F PRCHFPT=0:0 S PRCHFPT=$O(^PRC(442,"AF","N",PRCHPO,PRCHFPT)) Q:'PRCHFPT  S DIE="^PRC(442,"_PRCHPO_",11,",DA(1)=PRCHPO,DA=PRCHFPT,DR="19.2///@" D ^DIE K DIE,DA,DR
 Q