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

PRCFFUA.m

Go to the documentation of this file.
  1. PRCFFUA ;WISC/SJG-ROUTINE TO PROCESS OBLIGATIONS CONT ;6/13/94 14:34
  1. V ;;5.1;IFCAP;;Oct 20, 2000
  1. ;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ; Allows Fiscal to edit BOCs prior to PO amendment obligation
  1. ; only the BOCs on the amendment can be edited
  1. ;
  1. OK ; Prompt user
  1. S DIR(0)="Y"
  1. S DIR("A")="Is the above BOC information correct",DIR("B")="YES"
  1. S DIR("?")="Enter 'NO' or 'N' to edit the BOCs on amended items."
  1. S DIR("?",1)="Enter '^' to exit this option."
  1. S DIR("?",2)="Enter 'YES' or 'Y' or 'RETURN' to continue processing this amendment."
  1. W ! D ^DIR K DIR
  1. Q
  1. POAM ;
  1. D ARRAY^PRCFFUA4 I $D(ITRAY("NOITEMS")) D MSG9^PRCFFUA3 Q
  1. I FATAL=1 D MSG9^PRCFFUA3 Q
  1. N BOCEDIT,ESHEDIT
  1. D PROMPT Q:'Y!($D(DIRUT))
  1. K YY S YY=Y,YY(0)=Y(0)
  1. S (BOCEDIT,ESHEDIT)=0,FILE=$$FILE() D ROLLSET
  1. S PRCFA("BBFY")=$$BBFY^PRCFFU5(+PO) S Y=YY,Y(0)=YY(0) K YY
  1. Q:'Y!($D(DIRUT))
  1. I Y D
  1. .I $P(PCP,"^",2)=2 D MSG7^PRCFFUA3 Q
  1. .D:+$P(PCP,"^",2)<2 SAEDIT
  1. I (BOCEDIT=0)&(ESHEDIT=1) D ROLLSET,MSG1^PRCFFUA3,SF1^PRCFFUA1
  1. QUIT
  1. ROLLSET ; Sets variable needed for amendment rollup
  1. S (DA,PRCHPO)=PRCFA("PODA"),PRCHTOTQ=$P(PO(0),U,15),PRCHAM=PRCFAA
  1. Q
  1. ;
  1. SAEDIT ; BOC Edit
  1. D ESHEDIT S BOCEDIT=0
  1. W !! N MSG S MSG="...now editing the BOCs on the amendment..." D EN^DDIOL(MSG) W !
  1. I '$D(ITRAY("NOITEMS")) D ONEITEM
  1. I 'Y!($D(DIRUT)) D MSG6^PRCFFUA3 Q
  1. Q
  1. ONEITEM ; Edit BOC for one item
  1. Q:$D(ITRAY("NOITEMS"))
  1. S BOCEDIT=0
  1. S DIC("A")="Select ITEM: ",DA(1)=PRCFA("PODA"),DIC="^PRC("_FILE_","_DA(1)_",2,",DIC(0)="AEQMZ" D ^DIC K DIC("A") S YY=Y
  1. I Y>0,$D(ITRAY("CANCEL",+Y)) W ! D EN^DDIOL("The Item Number selected by you has been cancelled and cannot be changed in the amendment!") W ! G ONEITEM
  1. I Y>0,'$D(ITRAY(+Y)) W ! D EN^DDIOL("The Item Number selected by you is not on this amendment!") W ! G ONEITEM
  1. I Y<0 S:X["^" PRCFOUT="" D ROLLSET S POX="^PRC("_FILE_","_PRCFA("PODA")_",0)" S PO(0)=@POX S %=$S($D(PRCFOUT):-1,1:1) Q
  1. S DA=+Y,DIE=DIC,DR=3.5,PRCHAMDA=23 D ^DIE S Y=YY,(BOCEDIT,FISCEDIT)=1
  1. I Y>0,$D(ITRAY(+Y)) D ROLLSET,MSG1^PRCFFUA3 D:FILE=442 SF1^PRCFFUA1 D:FILE=443.6 ^PRCHSF3
  1. S DIC("A")="Select Next ITEM: ",(D0,DA)=PRCFA("PODA") G ONEITEM
  1. ;
  1. PROMPT ; Prompt for user
  1. S DIR(0)="Y",DIR("A")="Should the amendment BOC information be edited at this time",DIR("B")="NO"
  1. S DIR("?")="Enter 'NO' or 'N' or 'RETURN' if no editing is needed."
  1. S DIR("?",1)="Enter '^' to exit the option."
  1. S DIR("?",2)="Enter 'YES' or 'Y' to edit this information."
  1. W ! D ^DIR K DIR
  1. Q
  1. ESHEDIT ; Edit Shipping BOC
  1. ; 13 - Estimated Shipping and/or Handling
  1. ; 13.05 - Estimated Shipping BOC
  1. S ESHEDIT=0 Q:'$D(ITRAY("ESH"))
  1. I $G(PRCTMP(FILE,+PO,13,"I"))="" Q
  1. I FILE=442,$G(PRCTMP(442,+PO,13.05,"I"))]"" D MSG10^PRCFFUA3,ESH1
  1. I FILE=443.6,$G(PRCTMP(443.6,+PO,13.05,"I"))]"" D ESH1
  1. K PRCTMP(442,+PO,13),PRCTMP(442,+PO,13.05),PRCTMP(443,6,+PO,13),PRCTMP(443.6,+PO,13.05)
  1. Q
  1. ESH1 K MSG W !!
  1. S MSG(1)="...now editing Estimated Shipping BOC...",MSG(2)=" ",MSG(3)="The BOC for Estimated Shipping is '"_$G(PRCTMP(FILE,+PO,13.05,"E"))_"'."
  1. D EN^DDIOL(.MSG) K MSG
  1. S DIR(0)="Y",DIR("A")="Should I change the BOC for Estimated Shipping",DIR("B")="YES" W ! D ^DIR K DIR
  1. I 'Y!($D(DIRUT)) W ! D EN^DDIOL("No change made to Shipping BOC.") Q
  1. I Y D
  1. .W !
  1. .S DA=+PO,DIE=FILE,DR=13.05 D ^DIE K DIE,DR
  1. .S (ESHEDIT,FISCEDIT)=1
  1. .Q
  1. Q
  1. FILE() ; Determine file for lookup/editing
  1. I $D(PRCFA("RETRAN")),PRCFA("RETRAN")=0 S FILE=443.6
  1. I $D(PRCFA("RETRAN")),PRCFA("RETRAN")=1 S FILE=442
  1. Q FILE
  1. KILL K AESHBOC,FILE,II,ITRAY,OESHBOC,POX
  1. Q