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

ABPABCL.m

Go to the documentation of this file.
ABPABCL ;CLOSE PAYMENT BATCH [ 05/06/91  11:47 AM ]
 ;;1.4;AO PVT-INS TRACKING;*0*;IHS-OKC/KJR;JULY 25, 1991
A0 D CURRENT^%ZIS,^%AUCLS W !!
 K ABPA("HD") S ABPA("HD",1)=ABPATLE
 S ABPA("HD",2)="CLOSE Payment Batch(es)" D ^ABPAHD
BATDT K DIC S DIC("A")="Select PAYMENT BATCH DATE: "
 S DIC="^ABPAPBAT(",DIC(0)="AEQZ" W !! D ^DIC I +Y<0 G END
OPEN I $P(^ABPAPBAT(+Y,0),U,5)="C" D  G BATDT
 .W *7,!!?15,"<<< BATCH ALREADY CLOSED - CANNOT ACCESS >>>"
LOCK L ^ABPAPBAT(+Y,0):3 I '$T D  G BATDT
 .W *7,!!?15,"<<< BATCH IN USE - CANNOT ACCESS >>>"
 S ABPABDFN=+Y K ABPA("HD") S ABPA("HD",1)=ABPATLE
 S ABPA("HD",2)="CLOSE Payment Batch(es)" D ^ABPAHD
 S D0=ABPABDFN W !! K DXS D ^ABPABAT K DXS
 W ! S DX=0,DY=19 X XY W ! S $P(ABPALINE,"=",78)="" W ABPALINE
YN K DIC,DIE,DA,DR,X,Y,%,ABPALINE
 W !,"IS THIS THE CORRECT BATCH" S %=1 D YN^DICN
 I +%<1 D  G YN
 .W *7,!?4,"ENTER 'YES' OR 'NO'"
NO I +%>1 D  G A0
 .L ^ABPAPBAT(ABPABDFN,0) K DIC,DIE,DA,DR,X,Y,D0,%,ABPABDFN
YES W !!,"Closing batch date *** ",+$E(ABPABDFN,4,5)_"/"_+$E(ABPABDFN,6,7)
 W "/"_+$E(ABPABDFN,2,3)," ***" H 2
 K DIC,DIE,DA,DR,X,Y S DIE="^ABPAPBAT(",DA=ABPABDFN
 S DR="5///C;8///"_DT_";9///"_DUZ D ^DIE
 L ^ABPAPBAT(ABPABDFN,0) D  G A0
 .K DIC,DIE,DA,DR,X,Y,%,ABPABDFN
END K DIC,DIE,DA,DR,X,Y,%,ABPABDFN