source: WorldVistAEHR/trunk/r/VOLUNTARY_TIMEKEEPING-ABSV/ABSVDPNT.m@ 1211

Last change on this file since 1211 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 5.1 KB
Line 
1ABSVDPNT ;CTB/ALTOONA DONATION PRINT ;5/15/02 4:34 PM
2V ;;4.0;VOLUNTARY TIMEKEEPING;**25,26,29,30**;JULY 6, 1994
3 N DIC,Y,DA,DIE,DR,CTBX,DIR,ABSVI
4 S ABSVXA="Do you wish to print a thank you letter",ABSVXB="",%=1 D ^ABSVYN Q:'%
5 I '$D(ABSV("SITE")) D ^ABSVSITE Q:'%
6 S DIC=503340,DIC(0)="AEMZ",DIC("S")="I $P(^(0),""-"")=ABSV(""SITE"")" D ^DIC
7 Q:Y<0 S DA=+Y
8X S DIR(0)="N^1:10:0",DIR("A")="Number of Copies" D ^DIR
9 Q:$D(DUOUT)
10 S PLTRN=X
11 S DIE=DIC,DR="[ABSV DON PRINT LETTER]" D ^DIE
12 S PLTRN=$S($G(PLTRN):PLTRN,1:1)
13 S ZTRTN="PRINT^ABSVDPNT",ZTDESC="PRINT THANK YOU LETTER",ZTSAVE("DA")="",ZTSAVE("PLTRN")=""
14 D ^ABSVQ
15 QUIT
16SEARCH ;SEARCH DONATIONS FILE USING FILEMAN SEARCH OPTION
17 D ^ABSVSITE
18 Q:'%
19 S DIC="^ABS(503340,",DIC("S")="I $P(^(0),U,15)=ABSV(""INST"")"
20 D EN^DIS
21 QUIT
22GETDATE N Y
23 S Y=$O(^ABS(503340,"D",0)) Q:'Y
24 D DD^%DT
25 S ABSVDATE=Y
26 S Y=$O(^ABS(503340,"D",9999999),-1) Q:'Y
27 D DD^%DT
28 S $P(ABSVDATE,"^",2)=Y
29 QUIT
30TYPE ;PRINT DONATION STATISTICS FOR TYPE OF DONATION
31 N DIC,Y,BY,FR,TO,L,FLDS,X,CTBX,ABSVXX,BDATE,EDATE
32 D ^ABSVSITE Q:'%
33 D GETDATE
34 D DRNG^ABSVU Q:'%
35 S X=FR D CNVD^ABSVQ S BDATE=Y
36 S X=TO D CNVD^ABSVQ S EDATE=Y
37 S DIC=503340,(BY,FLDS)="[ABSV DON TYPE STATS]"
38 S FR=ABSV("SITE")_","_FR,TO=ABSV("SITE")_","_TO
39 S L=0,DHD="DONATIONS STATISTICS FOR "_BDATE_" THRU "_EDATE_" FOR "_ABSV("SITENAME")
40 D EN1^DIP
41 QUIT
42DATE ;PRINT DONATION STATISTICS FOR RANGE OF DATES
43 N DIC,Y,BY,FR,FR,TO,TO,L,FLDS,X,CTBX,ABSVXX,BDATE,EDATE
44 D ^ABSVSITE Q:'%
45 D GETDATE
46 D DRNG^ABSVU Q:'%
47 S X=FR D CNVD^ABSVQ S BDATE=Y
48 S X=TO D CNVD^ABSVQ S EDATE=Y
49 S DIC=503340,(BY,FLDS)="[ABSV DON DATE STATS]"
50 S FR=ABSV("SITE")_","_FR,TO=ABSV("SITE")_","_TO
51 S L=0,DHD="DONATIONS STATISTICS FOR "_BDATE_" THRU "_EDATE_" FOR "_ABSV("SITENAME")
52 D EN1^DIP
53 QUIT
54INDIV ;PRINT INDIVIDUAL DONOR VALUE REPORT
55 N DIC,Y,DONOR,BY,FR,TO,L,FLDS
56 S DIC=503346.1,DIC(0)="AEMNZ" D ^DIC Q:+Y<0
57 S DONOR=+Y
58 S DIC=503340
59 S BY="[ABSV DON INDIVIDUAL]",FR=DONOR_",?,",TO=DONOR_",?,"
60 S L=0,FLDS="[ABSV DON INDIVIDUAL]"
61 D EN1^DIP
62 QUIT
63INDISTAT ;PRINT INDIVIDUAL DONOR STATISTICS REPORT
64 N DIC,Y,DONOR,BY,FR,TO,L,FLDS,CTBX
65 D ^ABSVSITE Q:'%
66 S DIC=503346.1,DIC(0)="AEMNZ" D ^DIC Q:+Y<0
67 S DONOR=+Y
68 S DIC=503340
69 S (BY,FLDS)="[ABSV DON DONOR STATISTICS]",(FR,TO)=","_DONOR_","_ABSV("SITE"),L=0,DHD="INDIVIDUAL DONOR STATISTICS FOR STATION "_ABSV("SITE")
70 D EN1^DIP
71 QUIT
72FUND ;;PRINT FUND STATISTICS REPORT
73 N DIC,Y,BY,FR,TO,L,FLDS,X,CTBX,ABSVXX,BDATE,EDATE
74 D ^ABSVSITE Q:'%
75 D GETDATE
76 D DRNG^ABSVU Q:'%
77 S X=FR D CNVD^ABSVQ S BDATE=Y
78 S X=TO D CNVD^ABSVQ S EDATE=Y
79 S DIC=503340,(BY,FLDS)="[ABSV DON FUND STATS]",FR=ABSV("SITE")_","_FR,TO=ABSV("SITE")_","_TO
80 S L=0,DHD="DONATIONS STATISTICS FOR "_BDATE_" THRU "_EDATE_" FOR "_ABSV("SITENAME")_" ("_ABSV("SITE")_")"
81 D EN1^DIP
82 QUIT
83ORG ;PRINT SINGLE ORGANIZATION VALUE REPORT
84 D ^ABSVSITE Q:'%
85 N DIC,Y,ORG,BY,FR,TO,L,FLDS,ABSVDATE,BDATE,EDATE
86 S DIC("A")="Select VOLUNTEER ORGANIZATION CODE: "
87 S DIC=503334,DIC(0)="AEMNZ" D ^DIC Q:+Y<0
88 ;S ORG=$P(Y(0),"^",2)
89 S ORG=+Y
90 D GETDATE
91 D DRNG^ABSVU Q:'%
92 S X=FR D CNVD^ABSVQ S BDATE=Y
93 S X=TO D CNVD^ABSVQ S EDATE=Y
94 S DIC=503340,(BY,FLDS)="[ABSV DON IND ORG]"
95 S L=0,FR=ABSV("SITE")_","_ORG_",,,"_FR,TO=ABSV("SITE")_","_ORG_",,,"_TO
96 D EN1^DIP
97 QUIT
98ORGSTAT ;PRINT ORGANIZATIONAL STATISTICS REPORT
99 D ^ABSVSITE Q:'%
100 N DIC,Y,ORG,BY,FR,TO,L,FLDS
101 S DIC("A")="Select VOLUNTEER ORGANIZATION: "
102 S DIC=503334,DIC(0)="AEMNZ" D ^DIC Q:+Y<0
103 S ORG=+Y
104 D GETDATE
105 D DRNG^ABSVU Q:'%
106 S X=FR D CNVD^ABSVQ S BDATE=Y
107 S X=TO D CNVD^ABSVQ S EDATE=Y
108 S DIC=503340,(BY,FLDS)="[ABSV DON ORG STATS]"
109 S L=0,FR=ABSV("SITE")_","_ORG_",,,"_FR,TO=ABSV("SITE")_","_ORG_",,,"_TO
110 S DHD="ORGANIZATIONAL STATISTCS - BY POST - STATION "_ABSV("SITE")
111 D EN1^DIP
112 QUIT
113MOVE ;MOVE PRINTABLE DATA TO 'LETTER' FIELDS
114 ;
115PRINT ;PRINT 1 LETTER
116 F ABSVI=1:1:PLTRN S IOP=ABIOP D PRINT1(DA)
117 QUIT
118PRINT1(D0) N DONDA,FMT,DIWF,BY,FR,TO,DIWL,DIWR,DA
119 S DIWL=12,DIWR=90
120 S DONDA=D0,FMT=$P($G(^ABS(503340,D0,2)),"^",4)
121 I +FMT=0 S FMT=1
122 S DIWF="^ABS(503341,"_FMT_",1,",DIWF(1)=503340
123 S BY="NUMBER",(FR,TO)=DONDA
124 D EN2^DIWF
125 QUIT
126TEMP ;PRINT TEMPORARY RECEIPT
127 ;D ^ABSVLETT
128 Q
129EXPORT ;Export Donation Record(s) to Host File
130 N DIC,Y,BY,FR,TO,L,FLDS,X,CTBX,ABSVXX,BDATE,EDATE
131 D ^ABSVSITE Q:'%
132 D DRNG^ABSVU Q:'%
133 S X=FR D CNVD^ABSVQ S BDATE=Y
134 S X=TO D CNVD^ABSVQ S EDATE=Y
135 S DIC=503340,BY="[ABSV DON EXPORT]",FR=ABSV("SITE")_","_FR,TO=ABSV("SITE")_","_TO,FLDS=""
136 S L=0,DHD="@@"
137 S DIOBEG="W ""TRACKING NUMBER^STATION^ORGANIZATION^DONOR^ADDRESS 1^ADDRESS 2^CITY^STATE^ZIP^DATE RECEIVED^POST TYPE^POST #^ITEMS^TYPE^VALUE^FUND^RECPT #^DATE OF RECPT^PURPOSE"""
138 S DHIT="W !,$$EX^ABSVDPNT(D0)"
139 D EN1^DIP
140 QUIT
141EX(DA) N DIC,DR,I,X,N,TNUM,STANUM,ORG,DONOR,DADD1,DADD2,DCITY,DSTATE,DZIP,DREC,PTYPE,POST,ITEMS,TYPE,VALUE,FUND,RECPT,DTRECPT,PURPOSE
142 S DIC=503340,DR=".01;.7;1.6;1.7;1.71;1.72;20;21.5;22;2;3.5;4;4.5;5;6;7;14;14.5;16"
143 S X="TNUM;STANUM;ORG;DONOR;DADD1;DADD2;DCITY;DSTATE;DZIP;DREC;PTYPE;POST;ITEMS;TYPE;VALUE;FUND;RECPT;DTRECPT;PURPOSE"
144 D EXT^ABSVU2(DIC,.DA,.DR,.X,"") K DIC,DR,X
145 Q TNUM_U_STANUM_U_ORG_U_DONOR_U_DADD1_U_DADD2_U_DCITY_U_DSTATE_U_DZIP_U_DREC_U_PTYPE_U_POST_U_ITEMS_U_TYPE_U_VALUE_U_FUND_U_RECPT_U_DTRECPT_U_PURPOSE
Note: See TracBrowser for help on using the repository browser.