adding ILL circulation modifier
authorChris Sharp <csharp@georgialibraries.org>
Thu, 9 Jan 2020 16:47:33 +0000 (11:47 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Mon, 16 Mar 2020 21:15:49 +0000 (17:15 -0400)
Open-ILS/src/sql/Pg/version-upgrade/pines-post-3.4-upgrade.sql

index 709dd4c..7c12d38 100644 (file)
@@ -13,5 +13,68 @@ insert into container.biblio_record_entry_bucket (owner, name, btype, pub, ownin
 -- link the carousels to their buckets
 update container.carousel cc set bucket = (select id from container.biblio_record_entry_bucket b where b.owning_lib = cc.owner and b.btype = 'carousel');
 
+-- Add ILL circulation modifier
+
+-- 14 day, no renewal, no holds, OPAC invisible
+
+-- Fine: .20/day
+
+-- we don't have a 14 day, no renewal duration rule
+insert into config.rule_circ_duration (
+       name, 
+       extended, 
+       normal, 
+       shrt, 
+       max_renewals
+       ) values (
+       '14_days_0_renew', 
+       '14 days', 
+       '14 days', 
+       '14 days', 
+       0
+);
+-- create the circ modifier
+insert into config.circ_modifier (
+       code, 
+       name, 
+       description, 
+       sip2_media_type
+       ) values (
+       'ill-item', 
+       'ILL item', 
+       'ILL item', 
+       '001'
+);
+-- create the circulation rule
+insert into config.circ_matrix_matchpoint (
+       org_unit, 
+       grp, 
+       circ_modifier, 
+       ref_flag, 
+       circulate, 
+       duration_rule, 
+       recurring_fine_rule,
+       max_fine_rule
+       ) values (
+       1,
+       1,      
+       'ill-item',
+       false,
+       true,
+       (select id from config.rule_circ_duration where name = '14_days_0_renew'),
+       (select id from config.rule_recurring_fine where name = '20_cent_per_day'),
+       (select id from config.rule_max_fine where name = 'overdue_min')
+);
+
+-- create a hold rule
+insert into config.hold_matrix_matchpoint (
+       requestor_grp,
+       holdable
+       ) values (
+       1,
+       false
+);
+
+
 commit;