]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/perlmods/lib/OpenILS/Const.pm
LP1615805 No inputs after submit in patron search (AngularJS)
[working/Evergreen.git] / Open-ILS / src / perlmods / lib / OpenILS / Const.pm
1 package OpenILS::Const;
2 use strict; use warnings;
3 use vars qw(@EXPORT_OK %EXPORT_TAGS);
4 use Exporter;
5 use base qw/Exporter/;
6
7
8 # ---------------------------------------------------------------------
9 # Shoves defined constants into the export array
10 # so they don't have to be listed twice in the code
11 # ---------------------------------------------------------------------
12 sub econst {
13    my($name, $value) = @_;
14    my $caller = caller;
15    no strict;
16    *{$name} = sub () { $value };
17    push @{$caller.'::EXPORT_OK'}, $name;
18 }
19
20 # ---------------------------------------------------------------------
21 # CONSTANTS
22 # ---------------------------------------------------------------------
23
24
25
26 # ---------------------------------------------------------------------
27 # Copy Statuses
28 # ---------------------------------------------------------------------
29 econst OILS_COPY_STATUS_AVAILABLE     => 0;
30 econst OILS_COPY_STATUS_CHECKED_OUT   => 1;
31 econst OILS_COPY_STATUS_BINDERY       => 2;
32 econst OILS_COPY_STATUS_LOST          => 3;
33 econst OILS_COPY_STATUS_MISSING       => 4;
34 econst OILS_COPY_STATUS_IN_PROCESS    => 5;
35 econst OILS_COPY_STATUS_IN_TRANSIT    => 6;
36 econst OILS_COPY_STATUS_RESHELVING    => 7;
37 econst OILS_COPY_STATUS_ON_HOLDS_SHELF=> 8;
38 econst OILS_COPY_STATUS_ON_ORDER         => 9;
39 econst OILS_COPY_STATUS_ILL           => 10;
40 econst OILS_COPY_STATUS_CATALOGING    => 11;
41 econst OILS_COPY_STATUS_RESERVES      => 12;
42 econst OILS_COPY_STATUS_DISCARD       => 13;
43 econst OILS_COPY_STATUS_DAMAGED       => 14;
44 econst OILS_COPY_STATUS_ON_RESV_SHELF => 15;
45 econst OILS_COPY_STATUS_LONG_OVERDUE  => 16;
46 econst OILS_COPY_STATUS_LOST_AND_PAID => 17;
47 econst OILS_COPY_STATUS_CANCELED_TRANSIT => 18;
48
49 # ---------------------------------------------------------------------
50 # Circ defaults for pre-cataloged copies
51 # ---------------------------------------------------------------------
52 econst OILS_PRECAT_COPY_FINE_LEVEL    => 2;
53 econst OILS_PRECAT_COPY_LOAN_DURATION => 2;
54 econst OILS_PRECAT_CALL_NUMBER        => -1;
55 econst OILS_PRECAT_RECORD                => -1;
56
57
58 # ---------------------------------------------------------------------
59 # Circ constants
60 # ---------------------------------------------------------------------
61 econst OILS_CIRC_DURATION_SHORT       => 1;
62 econst OILS_CIRC_DURATION_NORMAL      => 2;
63 econst OILS_CIRC_DURATION_EXTENDED    => 3;
64 econst OILS_REC_FINE_LEVEL_LOW        => 1;
65 econst OILS_REC_FINE_LEVEL_NORMAL     => 2;
66 econst OILS_REC_FINE_LEVEL_HIGH       => 3;
67 econst OILS_STOP_FINES_CHECKIN        => 'CHECKIN';
68 econst OILS_STOP_FINES_RENEW          => 'RENEW';
69 econst OILS_STOP_FINES_LOST           => 'LOST';
70 econst OILS_STOP_FINES_CLAIMSRETURNED => 'CLAIMSRETURNED';
71 econst OILS_STOP_FINES_LONGOVERDUE    => 'LONGOVERDUE';
72 econst OILS_STOP_FINES_MAX_FINES      => 'MAXFINES';
73 econst OILS_STOP_FINES_CLAIMS_NEVERCHECKEDOUT => 'CLAIMSNEVERCHECKEDOUT';
74 econst OILS_UNLIMITED_CIRC_DURATION   => 'unlimited';
75
76 # ---------------------------------------------------------------------
77 # Settings
78 # ---------------------------------------------------------------------
79 econst OILS_SETTING_LOST_PROCESSING_FEE => 'circ.lost_materials_processing_fee';
80 econst OILS_SETTING_DEF_ITEM_PRICE => 'cat.default_item_price';
81 econst OILS_SETTING_MIN_ITEM_PRICE => 'circ.min_item_price';
82 econst OILS_SETTING_MAX_ITEM_PRICE => 'circ.max_item_price';
83 econst OILS_SETTING_PRIMARY_ITEM_VALUE_FIELD => 'circ.primary_item_value_field';
84 econst OILS_SETTING_SECONDARY_ITEM_VALUE_FIELD => 'circ.secondary_item_value_field';
85 econst OILS_SETTING_ORG_BOUNCED_EMAIL => 'org.bounced_emails';
86 econst OILS_SETTING_CHARGE_LOST_ON_ZERO => 'circ.charge_lost_on_zero';
87 econst OILS_SETTING_VOID_OVERDUE_ON_LOST => 'circ.void_overdue_on_lost';
88 econst OILS_SETTING_HOLD_SOFT_STALL => 'circ.hold_stalling.soft';
89 econst OILS_SETTING_HOLD_HARD_STALL => 'circ.hold_stalling.hard';
90 econst OILS_SETTING_HOLD_SOFT_BOUNDARY => 'circ.hold_boundary.soft';
91 econst OILS_SETTING_HOLD_HARD_BOUNDARY => 'circ.hold_boundary.hard';
92 econst OILS_SETTING_HOLD_EXPIRE => 'circ.hold_expire_interval';
93 econst OILS_SETTING_HOLD_ESIMATE_WAIT_INTERVAL => 'circ.holds.default_estimated_wait_interval';
94 econst OILS_SETTING_VOID_LOST_ON_CHECKIN                => 'circ.void_lost_on_checkin';
95 econst OILS_SETTING_MAX_ACCEPT_RETURN_OF_LOST           => 'circ.max_accept_return_of_lost';
96 econst OILS_SETTING_VOID_LOST_PROCESS_FEE_ON_CHECKIN    => 'circ.void_lost_proc_fee_on_checkin';
97 econst OILS_SETTING_RESTORE_OVERDUE_ON_LOST_RETURN      => 'circ.restore_overdue_on_lost_return';
98 econst OILS_SETTING_LOST_IMMEDIATELY_AVAILABLE          => 'circ.lost_immediately_available';
99 econst OILS_SETTING_BLOCK_HOLD_FOR_EXPIRED_PATRON       => 'circ.holds.expired_patron_block';
100 econst OILS_SETTING_ALLOW_RENEW_FOR_EXPIRED_PATRON      => 'circ.renew.expired_patron_allow';
101 econst OILS_SETTING_GENERATE_OVERDUE_ON_LOST_RETURN     => 'circ.lost.generate_overdue_on_checkin';
102 econst OILS_SETTING_MAX_DUPLICATE_HOLDS => 'circ.holds.max_duplicate_holds';
103 econst OILS_SETTING_VOID_ITEM_DEPOSIT_ON_CHECKIN => 'circ.void_item_deposit';
104
105
106
107
108 econst OILS_HOLD_TYPE_COPY        => 'C';
109 econst OILS_HOLD_TYPE_FORCE       => 'F';
110 econst OILS_HOLD_TYPE_RECALL      => 'R';
111 econst OILS_HOLD_TYPE_ISSUANCE    => 'I';
112 econst OILS_HOLD_TYPE_VOLUME      => 'V';
113 econst OILS_HOLD_TYPE_TITLE       => 'T';
114 econst OILS_HOLD_TYPE_METARECORD  => 'M';
115 econst OILS_HOLD_TYPE_MONOPART    => 'P';
116
117
118 econst OILS_BILLING_TYPE_OVERDUE_MATERIALS => 'Overdue materials';
119 econst OILS_BILLING_TYPE_COLLECTION_FEE => 'Long Overdue Collection Fee';
120 econst OILS_BILLING_TYPE_DEPOSIT => 'System: Deposit';
121 econst OILS_BILLING_TYPE_RENTAL => 'System: Rental';
122 econst OILS_BILLING_NOTE_SYSTEM => 'SYSTEM GENERATED';
123
124 econst OILS_ACQ_DEBIT_TYPE_PURCHASE => 'purchase';
125 econst OILS_ACQ_DEBIT_TYPE_TRANSFER => 'xfer';
126
127 # all penalties with ID < 100 are managed automatically
128 econst OILS_PENALTY_AUTO_ID => 100;
129 econst OILS_PENALTY_PATRON_EXCEEDS_FINES => 1;
130 econst OILS_PENALTY_PATRON_EXCEEDS_OVERDUE_COUNT => 2;
131 econst OILS_PENALTY_INVALID_PATRON_ADDRESS => 29;
132
133
134 econst OILS_BILLING_TYPE_NOTIFICATION_FEE => 9;
135
136
137 # ---------------------------------------------------------------------
138 # Non Evergreen-specific constants
139 # ---------------------------------------------------------------------
140 econst MARC_NAMESPACE => 'http://www.loc.gov/MARC21/slim';
141
142
143 # ---------------------------------------------------------------------
144 # finally, export all the constants
145 # ---------------------------------------------------------------------
146 %EXPORT_TAGS = ( const => [ @EXPORT_OK ] );
147