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

ABPAPDV2.m

Go to the documentation of this file.
ABPAPDV2 ;DISPLAY PAYMENT TRANS. SCREEN.; [ 06/26/91  11:01 AM ]
 ;;1.4;AO PVT-INS TRACKING;*0*;IHS-OKC/KJR;JULY 25, 1991
DISP K DIC,DIE,DA,DR,ABPA("QF"),ABPADOS,ABPA("I"),ABPA("II"),ABPACDFN
 K ABPAVTYP,ABPA("QF"),ABPAPTR,ABPADATA,ABPATYPE
 S U="^",DC=1,D0=ABPATDFN K DXS W @IOF,! D ^ABPAPDB K DXS,D0 W !
 S ABPA("I")="Current Payment Transactions" W ?(40-($L(ABPA("I"))/2))
 W ABPA("I"),!!,"TRN  DATE REC'D  PAID AMOUNT  CODE   CLAIM #    "
 W "CHECK NUMBER   DATE POSTED",!,"---  ----------  -----------  "
 W "----  --------  ---------------  -----------"
A0 K ABPA("QF"),SA,ABPAPSDT,ABPARECV,ABPAPOST,ABPADATA,ABPA("CHK")
 S ABPAPAMT=0,ABPA("STDAMT")=0,ABPA("UP","N")=0,ABPA("UP","D")=0
 S ABPA("UP","S")=0,ABPARECV=$P(^ABPVAO(ABPATDFN,"P",ABPADDFN,0),"^")
 S ABPARECV=$E(ABPARECV,4,5)_"/"_$E(ABPARECV,6,7)_"/"_$E(ABPARECV,2,3)
 S ABPAPOST=$P(^ABPVAO(ABPATDFN,"P",ABPADDFN,0),"^",3)
 S ABPAPOST=$S(ABPAPOST="N":"NO",ABPAPOST="Y":"YES",1:"???")
 S ABPADATA=$P(^ABPVAO(ABPATDFN,"P",ABPADDFN,0),"^",2)
 I +ABPADATA>0 D
 .S ABPAPSDT=$E(ABPADATA,4,5)_"/"_$E(ABPADATA,6,7)_"/"
 .S ABPAPSDT=ABPAPSDT_$E(ABPADATA,2,3)
 S:$D(ABPAPSDT)=0 ABPAPSDT=""
 S ABPA("CHK")=$P(^ABPVAO(ABPATDFN,"P",ABPADDFN,0),"^",6)
LOOP S DA=0 F ABPA("I")=0:0 D  Q:$D(ABPA("QF"))=1
 .S DA=$O(^ABPVAO(ABPATDFN,"P",ABPADDFN,"A",DA))
 .I +DA=0 S ABPA("QF")="" Q
 .Q:$D(^ABPVAO(ABPATDFN,"P",ABPADDFN,"A",DA,0))'=1  S ABPADATA=^(0)
 .W !,$J(DA,3),?7,ABPARECV S ABPAPCOD=$P(ABPADATA,"^",2)
 .S ABPACDFN=$P(ABPADATA,"^",3) W ?18,$J(+ABPADATA,9,2),?32,ABPAPCOD
 .I ABPACDFN]"" I $D(^ABPVAO(ABPATDFN,1,ABPACDFN,0))=1 D
 ..W ?36,$J($P(^ABPVAO(ABPATDFN,1,ABPACDFN,0),"^",2),8)
 ..S ABPA("AP",ABPACDFN,DA)=ABPADATA
 .I ABPACDFN']""&("NDS"[ABPAPCOD) D
 ..S ABPA("UP",ABPAPCOD)=ABPA("UP",ABPAPCOD)+(+ABPADATA)
 .I ABPAPCOD="S" W ?46,$J(ABPA("CHK"),15) D
 ..S ABPA("STDAMT")=ABPA("STDAMT")+(+ABPADATA)
 .W ?65,ABPAPSDT S ABPAPAMT=ABPAPAMT+(+ABPADATA)
ENDLOOP S $P(ABPAX,"=",81)="" W !,ABPAX
 K ABPAPOST,ABPAPSDT,ABPARECV,ABPA("QF"),ABPADATA,ABPA("I")
 K ABPAMESS S ABPAMESS="End of payments received "_ABPABDT
 S ABPAMESS(2)="... Press any key to continue ... " D PAUSE^ABPAMAIN
 Q