Ignore:
Timestamp:
Dec 4, 2009, 8:26:01 PM (14 years ago)
Author:
George Lilly
Message:

WorldVistAEHR overlayed on FOIAVistA

Location:
FOIAVistA/tag/r
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • FOIAVistA/tag/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCHMA.m

    r628 r636  
    11PRCHMA ;WISC/AKS-Amend to PO, req ;6/10/96  14:07
    2  ;;5.1;IFCAP;**21,79,100,113**;Oct 20, 2000;Build 4
    3  ;Per VHA Directive 2004-038, this routine should not be modified.
    4 REQ N PRCHREQ
     2 ;;5.1;IFCAP;**21,79,100**;Oct 20, 2000
     3 ;Per VHA Directive 10-93-142, this routine should not be modified.
     4REQ ;Req.
     5 N PRCHREQ
    56 S PRCHREQ=1
    6 PO N PRCF,RETURN,PRCHAM,PRCHPO,PRCHNEW,OUT,CAN,PRCHAU,PRCHER,PRCHON,A,B,ER,FL,FIS,DELIVER,PRCHAMDA,PRCHAV,PRCHL1,PRCHLN,PRCHRET,LCNT
    7  N PRCHL2,ROU,DIC,I,PRCHAMT,PRCHAREC,PRCHEDI,X,Y,PRCHN,PRCHO,SFUND,PRCHX,PRCHIMP,PRCHNRQ,PRCHP,REPO,PRCHNORE,%,%A,%B,D0,D1,J
     7PO ;PO
     8 N PRCF,RETURN,PRCHAM,PRCHPO,PRCHNEW,OUT,CAN,PRCHAU,PRCHER,PRCHON
     9 N A,B,ER,FL,FIS,DELIVER,PRCHAMDA,PRCHAV,PRCHL1,PRCHLN,PRCHRET,LCNT
     10 N PRCHL2,ROU,DIC,I,PRCHAMT,PRCHAREC,PRCHEDI,X,Y,PRCHN,PRCHO,SFUND
     11 N PRCHX,PRCHIMP,PRCHNRQ,PRCHP,REPO,PRCHNORE,%,%A,%B,D0,D1,J
    812 N PRCFL,MSG
    913LOOP D KILL^PRCHMA1 S PRCHNEW="",PRCHNORE=1,CAN=0
    10  ; See routine PRCHAMXA for information on variable PRCHNORE and undefined DIK, var PRCHPO is the basic premise of locks applied to amendments
     14 ;
     15 ; See routine PRCHAMXA for information on variable PRCHNORE and for
     16 ; incidence of undefined DIK variable errors.
     17 ; The var PRCHPO is the basic premise of locks applied to amendments.
     18 ; Anytime amend module is accessed add +lock & save po# in PRCENTRY.
     19 ;
    1120 S PRCF("X")="S" D ^PRCFSITE Q:'$D(PRC("SITE"))
    12  ; Lock simultaneous entry of users in amend. module for the same record.  Var Y is saved in PRCHPO at the end of GETPO subrtn, when we start
     21 ;
     22 ; Lock simultaneous entry of users in amend. module for the same record.
     23 ; Var Y is saved in PRCHPO at the end of GETPO subrtn, when we start
    1324 ; the process(AMENDNO) of amending the record we must have var PRCHPO.
     25 ;
    1426 S PRCFL=0
    1527 W !! D GETPO^PRCHAMU
    16  ; If no record is selected or time-out or up-arrow out then exit without unlocking a record.
     28 ; If no record is selected or time-out or up-arrow out then exit
     29 ; without unlocking a record.
    1730 I $D(DTOUT)!$D(DUOUT)!$G(OUT)=1 G EXIT1
    1831 I PRCFL=1 G LOOP
     
    3346 . I $G(PRCHAMDA)=31 D MSG^PRCHAMU Q
    3447 . I $G(PRCHAMDA)=24,$G(X)=2 D MSG1^PRCHAMU S SCE=1 Q
     48 ;
    3549 I $P(^PRC(443.6,PRCHPO,6,PRCHAM,0),U,4)=5!($P(^(0),U,4)=15) S CAN=1
    3650 I $D(DTOUT)!($D(DUOUT)) G EXIT
    3751 I $G(NOCAN)=1 G ASK
    3852 G:$P($G(^PRC(443.6,PRCHPO,6,PRCHAM,3,0)),U,4)'>1 EXIT
    39 CAN1 S BFLAG=0
    40  S:$P($G(^PRC(443.6,PRCHPO,1)),U,7)'=6 BFLAG=1
    41  I $P($G(^PRC(443.6,PRCHPO,1)),U,7)=6  D
    42  .S THISHLD=0
    43  .F  S THISHLD=$O(^PRC(443.6,PRCHPO,2,THISHLD)) Q:'THISHLD!(BFLAG=1)  D
    44  ..S:$P($G(^PRC(443.6,PRCHPO,2,THISHLD,2)),U,2)'="" BFLAG=1
    45  .Q:BFLAG=1
    46  .S THISHLD=0
    47  .F  S THISHLD=$O(^PRC(442,PRCHPO,2,THISHLD)) Q:'THISHLD!(BFLAG=1)  D
    48  ..S:$P($G(^PRC(442,PRCHPO,2,THISHLD,2)),U,2)'="" BFLAG=1
    49  W:BFLAG=0 !,"This is now a contract order.  You must add a contract to this orders item(s)",!,"before approving the amendment.",!
    50  G:BFLAG=0 EXIT
    51  D:BFLAG=1 UPDATE^PRCHAMU G:$D(Y) EXIT
     53CAN1 D UPDATE^PRCHAMU G:$D(Y) EXIT
    5254CHK I '$$VERIFY^PRCHES5(PRCHPO) W !!,?5,"This purchase order has been tampered with.",!,?5,"Please notify IFCAP APPLICATION COORDINATOR." G EXIT
    5355 I $P($G(^PRC(443.6,PRCHPO,6,PRCHAM,1)),U,4)']"" W !!,?5,"There is no Amendment Status." D
     
    6668 ...S J=0 S J=$O(^PRC(443.6,PRCHPO,2,PRCH,1,J)) I J'>0 D:LCNT>END TOP W !!,?5,"Line item ",+$P(PRCHLN,U)," is missing its description!",$C(7) S PRCHER="",LCNT=LCNT+2
    6769 ...I $P($G(^PRC(442,PRCHPO,23)),U,11)="D",$P($G(^PRC(443.6,PRCHPO,2,PRCH,2)),U,2)="" D:LCNT>END TOP W !!,?5,"Line item ",+$P(PRCHLN,U)," is missing contract number.",$C(7) S PRCHER="",LCNT=LCNT+2
    68  ...; PRC*5.1*79 - Check line items of PC orders with source code=6 to make sure that a contract number is entered
     70 ...; PRC*5.1*79 - Check line items of PC orders with source code=6 to
     71 ...; make sure that a contract number is entered
    6972 ...D PCD^PRCHMA1
    7073 ...Q
     
    7275 .I $D(PRCHER) I LCNT>END N DIR S DIR(0)="E" D ^DIR S LCNT=1
    7376 .Q
     77 ;PRC*5.1*100: check line items without an FSC or PSC
    7478 D EN106^PRCHNPO7 I $G(ERROR)=1 G EXIT
    7579 I $P($G(^PRC(443.6,PRCHPO,0)),U,13)>0 I $P($G(^PRC(443.6,PRCHPO,23)),U)="" W !!,?5,"This amendment has Est. Shipping and/or Handling charges without any",!,?5,"Est. Shipping BOC." S PRCHER=""
    7680 I $P($G(^PRC(443.6,PRCHPO,6,PRCHAM,0)),U,4)=5!($P($G(^(0)),U,4)=15) S CAN=1
    7781 I $G(CAN)'=1 D CHECK^PRCHAMDF(PRCHPO,PRCHAM,.PRCHER)
     82 ;
     83 ; Change below to allow checks for monthly limits in file #440.5 before
     84 ; completion of the amendment.
     85 ;
    7886 I $G(PRCHAUTH)=1!($P($G(^PRC(443.6,PRCHPO,0)),U,2)=25) S FILE=443.6 D  I $G(ERROR) S PRCHER="" K ERROR,FILE
    7987 .D ^PRCHSF3
     
    107115 .D REMOVE^PRCSC2(PP410),ENCODE^PRCSC2(PP410,DUZ,.MESSAGE) K MESSAGE
    108116 .I '$G(PRCPROST) W !?3,"SEND TO SUPPLY " S PRCHQ="^PRCHPAM",D0=PRCHPO,D1=PRCHAM D ^PRCHQUE
    109  .; Update file #440.5 after amendment has been approved. Consider orders created and amended in the same month and year and the user either
    110  .; cancels the order or enters other type of amendment that changes the final amount of the order. No credit is given for orders from a
     117 .;
     118 .; Update file #440.5 after amendment has been approved. Consider orders
     119 .; created and amended in the same month and year and the user either
     120 .; cancels the order or enters other type of amendment that changes the
     121 .; final amount of the order. No credit is given for orders from a
    111122 .; previous month and year. DT is the current date, system-supplied.
     123 .;
    112124 .S PRCHCD=$P($G(^PRC(442,PRCHPO,23)),U,8)
    113125 .S PRCNODE=$G(^PRC(442,PRCHPO,6,0)),PRCAMD=$P(PRCNODE,U,3)
     
    132144 S SFUND="" I $P($G(^PRC(443.6,PRCHPO,0)),U,19)=2 D SUPP^PRCFFM2M S SFUND=1
    133145 I SFUND=1 W !?3,"SEND TO SUPPLY " S PRCHQ="^PRCHPAM",D0=PRCHPO,D1=PRCHAM D ^PRCHQUE
     146 ;
    134147 D SOURCE^PRCHAMU:$G(SCE)
    135148 G EXIT
    136 ENC S ER=0
     149 ;
     150ENC ;Can
     151 S ER=0
    137152 D CAN^PRCHMA3
    138153 I $G(NOCAN)=1 W !?5,$S($D(PRCHREQ):"REQUISITION",1:"PURCHASE ORDER")_" HAS BEEN RECEIVED, CANNOT CANCEL !",$C(7) S ER=1 Q
     
    149164 S PRCHAMT=-$P(^PRC(443.6,PRCHPO,0),U,15) W !
    150165 QUIT
    151 APP S %A="   Approve Amendment number "_PRCHAM_": ",%B="",%=$S($G(PRCPROST):1,1:2) D ^PRCFYN
     166APP ;App,pr
     167 S %A="   Approve Amendment number "_PRCHAM_": ",%B="",%=$S($G(PRCPROST):1,1:2) D ^PRCFYN
    152168 Q
    153 REV N PRCH
     169REV ;Rev
     170 N PRCH
    154171 S %=1,%B="",%A="   Review Amendment " D ^PRCHSF3 W ! D ^PRCFYN
    155172 I %=1 S D0=PRCHPO,D1=PRCHAM,PRCH="^PRC(443.6," D ^PRCHDAM
    156173 Q
    157 EXIT L -^PRC(442,PRCENTRY)
     174EXIT ;Ex
     175 L -^PRC(442,PRCENTRY)
    158176EXIT1 K ERROR,FIS,REPO,DEL
    159177 QUIT:$G(PRCPROST)
    160178 I $G(OUT)'=1 G LOOP
    161179 QUIT
    162 FLAG I $G(FLAG)=1 K FLAG Q
     180 ;
     181FLAG ;
     182 I $G(FLAG)=1 K FLAG Q
    163183 Q
    164 NOSIGN S $P(^PRC(443.6,PRCHPO,6,PRCHAM,0),U,4)=PRCHAU
     184NOSIGN ;
     185 S $P(^PRC(443.6,PRCHPO,6,PRCHAM,0),U,4)=PRCHAU
    165186NOSIGN1 S DA(1)=PRCHPO,DIE="^PRC(443.6,"_DA(1)_",6,",DA=PRCHAM,DR="9///@"
    166187 D ^DIE K DIE,DA,DR
Note: See TracChangeset for help on using the changeset viewer.