[open-ils-commits] [GIT] Evergreen ILS branch mastermerge created. 00c50be5a4d698a454ae879ebd02e1e3aa499a4d
Evergreen Git
git at git.evergreen-ils.org
Thu Jun 2 10:53:03 EDT 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, mastermerge has been created
at 00c50be5a4d698a454ae879ebd02e1e3aa499a4d (commit)
- Log -----------------------------------------------------------------
commit 00c50be5a4d698a454ae879ebd02e1e3aa499a4d
Merge: 0e0026a 80c12c4
Author: Mike Rylander <mrylander at gmail.com>
Date: Thu Jun 2 10:33:35 2011 -0400
Merge branch 'master' of git.evergreen-ils.org:Evergreen into patron_no_collections2
Signed-off-by: Mike Rylander <mrylander at gmail.com>
commit 0e0026ad7a81812b1831433aedf12c6884a50c64
Author: Bill Erickson <berick at esilibrary.com>
Date: Wed Jun 1 17:01:36 2011 -0400
Collections exemption user setting
Adds a new user setting "circ.collections.exempt" which, when set to
true for a user, means the user will not be considered for collections.
It does this by ignoring the user when calculating the list of users of
interest in the "open-ils.collections.users_of_interest.retrieve" API
call.
Signed-off-by: Bill Erickson <berick at esilibrary.com>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/money.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/money.pm
index 22ab1f3..a8336ea 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/money.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/money.pm
@@ -139,11 +139,13 @@ select
from action.circulation x
left join money.collections_tracker c ON (c.usr = x.usr AND c.location = ?)
join money.billing b on (b.xact = x.id)
+ LEFT JOIN actor.usr_setting set ON (set.usr = x.usr and set.name='circ.collections.exempt' and set.value = 'true')
where x.xact_finish is null
and c.id is null
and x.circ_lib in (XX)
and b.billing_ts < current_timestamp - ? * '1 day'::interval
and not b.voided
+ and set.id IS NULL
group by 1,2
union all
@@ -156,11 +158,13 @@ select
from money.grocery x
left join money.collections_tracker c ON (c.usr = x.usr AND c.location = ?)
join money.billing b on (b.xact = x.id)
+ LEFT JOIN actor.usr_setting set ON (set.usr = x.usr and set.name='circ.collections.exempt' and set.value = 'true')
where x.xact_finish is null
and c.id is null
and x.billing_location in (XX)
and b.billing_ts < current_timestamp - ? * '1 day'::interval
and not b.voided
+ and set.id IS NULL
group by 1,2
union all
@@ -173,11 +177,13 @@ select
from booking.reservation x
left join money.collections_tracker c ON (c.usr = x.usr AND c.location = ?)
join money.billing b on (b.xact = x.id)
+ LEFT JOIN actor.usr_setting set ON (set.usr = x.usr and set.name='circ.collections.exempt' and set.value = 'true')
where x.xact_finish is null
and c.id is null
and x.pickup_lib in (XX)
and b.billing_ts < current_timestamp - ? * '1 day'::interval
and not b.voided
+ and set.id IS NULL
group by 1,2
) full_list
left join money.payment p on (full_list.id = p.xact)
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 56af82f..8f107d1 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -86,7 +86,7 @@ CREATE TRIGGER no_overlapping_deps
BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0543', :eg_version); -- dbwells
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0544', :eg_version); -- berick
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index 5a4b40b..cce7ad0 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -8693,4 +8693,11 @@ INSERT INTO config.org_unit_setting_type
'bool'
);
-
+INSERT INTO config.usr_setting_type
+( name, opac_visible, label, description, datatype) VALUES
+( 'circ.collections.exempt',
+ FALSE,
+ oils_i18n_gettext('circ.collections.exempt', 'Collections: Exempt', 'cust', 'description'),
+ oils_i18n_gettext('circ.collections.exempt', 'User is exempt from collections tracking/processing', 'cust', 'description'),
+ 'bool'
+);
diff --git a/Open-ILS/src/sql/Pg/upgrade/0544.data.patron_no_collections.sql b/Open-ILS/src/sql/Pg/upgrade/0544.data.patron_no_collections.sql
new file mode 100644
index 0000000..620c2a4
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/0544.data.patron_no_collections.sql
@@ -0,0 +1,15 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('XXX');
+
+INSERT INTO config.usr_setting_type
+( name, opac_visible, label, description, datatype) VALUES
+( 'circ.collections.exempt',
+ FALSE,
+ oils_i18n_gettext('circ.collections.exempt', 'Collections: Exempt', 'cust', 'description'),
+ oils_i18n_gettext('circ.collections.exempt', 'User is exempt from collections tracking/processing', 'cust', 'description'),
+ 'bool'
+);
+
+COMMIT;
+
diff --git a/Open-ILS/web/js/ui/default/actor/user/register.js b/Open-ILS/web/js/ui/default/actor/user/register.js
index 6915f53..9369e7e 100644
--- a/Open-ILS/web/js/ui/default/actor/user/register.js
+++ b/Open-ILS/web/js/ui/default/actor/user/register.js
@@ -523,7 +523,7 @@ function uEditFetchUserSettings(userId) {
/* fetch any user setting types we need + any that offer opt-in */
userSettingTypes = pcrud.search('cust', {
'-or' : [
- {name:['circ.holds_behind_desk']},
+ {name:['circ.holds_behind_desk', 'circ.collections.exempt']},
{name : {
'in': {
select : {atevdef : ['opt_in_setting']},
-----------------------------------------------------------------------
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list