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

ACRFPA.m

Go to the documentation of this file.
  1. ACRFPA ;IHS/OIRM/DSD/THL,AEF - PURCHASE OFFICE MANAGEMENT; [ 11/01/2001 9:44 AM ]
  1. ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
  1. ;;ROUTINE FOR CREATION AND MANAGEMENT OF PURCHASING OFFICES AND
  1. ;;EDITING PURCHASING AGENT DATA
  1. PA ;EP;TO ADD PURCHASING AGENT
  1. F D PA1 Q:$D(ACRQUIT)!$D(ACROUT)
  1. K ACRQUIT
  1. Q
  1. PA1 W @IOF
  1. W !?30,"ADD PURCHASING AGENT"
  1. W !?30,"===================="
  1. S DIC="^ACRPA("
  1. S DIC("A")="Select PURCHASING AGENT: "
  1. S DIC(0)="AELMQZ"
  1. W !
  1. D DIC^ACRFDIC
  1. I U[$E(X)!(+Y<1) S ACRQUIT="" Q
  1. S DA=+Y
  1. S DIE="^ACRPA("
  1. S DR="[ACR PURCHASING AGENT]"
  1. D DDS^ACRFDIC
  1. Q:'$D(ACRSCREN)
  1. K ACRSCREN
  1. D DIE^ACRFDIC
  1. Q
  1. PO ;EP;TO ADD PURCHASING OFFICE
  1. F D PO1 Q:$D(ACRQUIT)!$D(ACROUT)
  1. K ACRQUIT
  1. Q
  1. PO1 D OFFICE
  1. Q:$D(ACRQUIT)
  1. S DA=ACRDA
  1. S DIE="^ACRPO("
  1. S DR="[ACR PURCHASING OFFICE]"
  1. D DDS^ACRFDIC
  1. S DA=ACRDA
  1. S DIE="^ACRPO("
  1. S DR="[ACR PO PRINTER CONTROL]"
  1. D DDS^ACRFDIC
  1. Q:'$D(ACRSCREN)
  1. K ACRSCREN
  1. I $P(Y,U,3)'=1 D Q:$D(ACROUT)
  1. .S D0=+Y
  1. .W @IOF
  1. .D ^ACRPPUR
  1. .W !
  1. .S DIR(0)="YO"
  1. .S DIR("A")="Edit this data"
  1. .S DIR("B")="NO"
  1. .D DIR^ACRFDIC
  1. I $G(Y)=1 D
  1. .S DA=ACRDA
  1. .S DIE="^ACRPO("
  1. .S DR="[ACR PURCHASING OFFICE]"
  1. .D DDS^ACRFDIC
  1. .I $D(ACRSCREN) K ACRSCREN D DIE^ACRFDIC
  1. .S DA=ACRDA
  1. .S DIE="^ACRPO("
  1. .S DR="[ACR PO PRINTER CONTROL]"
  1. .D DDS^ACRFDIC
  1. .I $D(ACRSCREN) K ACRSCREN D DIE^ACRFDIC
  1. S X=$G(^AUTTLOC(+^ACRPO(ACRDA,0),0))
  1. W !!?5,"MAILING ADDRESS-STREET.: ",$P(X,U,12)
  1. W !?5,"MAILING ADDRESS-CITY...: ",$P(X,U,13)
  1. W !?5,"MAILING ADDRESS-STATE..: ",$P($G(^DIC(5,+$P(X,U,14),0)),U)
  1. W !?5,"MAILING ADDRESS-ZIPCODE: ",$P(X,U,15)
  1. W !?5,"MAILING ADDRESS-PHONE..: ",$P(X,U,11)
  1. W !
  1. S DIR(0)="YO"
  1. S DIR("A")="Edit LOCATION address"
  1. S DIR("B")="NO"
  1. D DIR^ACRFDIC
  1. Q:$G(Y)'=1
  1. S DA=+^ACRPO(ACRDA,0)
  1. S DIE="^AUTTLOC("
  1. S DR=".14MAILING ADDRESS-STREET.;.15MAILING ADDRESS-CITY...;.16MAILING ADDRESS-STATE..;.17MAILING ADDRESS-ZIPCODE;.13MAILING ADDRESS-PHONE.."
  1. W !
  1. D DIE^ACRFDIC
  1. Q
  1. OFFICE ;EP;TO SELECT PURCHASING OFFICE
  1. W @IOF
  1. W !?26,"PURCHASING OFFICE"
  1. W !?26,"====================="
  1. S DIC="^ACRPO("
  1. S DIC(0)="AELMQZ"
  1. S DIC("A")="Select PURCHASING OFFICE: "
  1. W !
  1. D DIC^ACRFDIC
  1. I U[$E(X)!(+Y<1)!'$D(^ACRPO(+Y,0)) S ACRQUIT="" Q
  1. S ACRDA=+Y
  1. Q