From dd1ace4c026bf1923c46eaf1577e7bb47b0c4ea0 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Wed, 22 Apr 2020 00:47:13 +0000 Subject: [PATCH] Bug 19532: Database and installer stuff - recalls table - circulation rules: recalls allowed (total), recalls per record (count), on shelf recalls allowed, recall due date interval (day), recall overdue fine, recall shelf time/pickup period (day) - sysprefs: useRecalls, RecallsMaxPickUpDelay, RecallsLog - email notices: RETURN_RECALLED_ITEM, PICKUP_RECALLED_ITEM, RECALL_REQUESTER_DET - user permission: recalls, manage_recalls - Recall and CancelRecall reasons for branch transfers --- Koha/CirculationRules.pm | 18 +++++++ admin/smart-rules.pl | 18 +++++++ ...bug_19532-add_recalls_enum_branchtransfers.perl | 6 +++ .../atomicupdate/bug_19532-add_recalls_flags.perl | 7 +++ .../bug_19532-add_recalls_notices.perl | 23 ++++++++ .../bug_19532-add_recalls_sysprefs.perl | 11 ++++ .../atomicupdate/bug_19532-add_recalls_table.perl | 34 ++++++++++++ .../data/mysql/de-DE/mandatory/sample_notices.sql | 17 +++++- .../data/mysql/en/mandatory/sample_notices.yml | 62 ++++++++++++++++++++++ .../mysql/fr-CA/obligatoire/sample_notices.sql | 17 +++++- .../mysql/fr-FR/1-Obligatoire/sample_notices.sql | 17 +++++- installer/data/mysql/it-IT/necessari/notices.sql | 17 +++++- installer/data/mysql/kohastructure.sql | 34 +++++++++++- .../mysql/nb-NO/1-Obligatorisk/sample_notices.sql | 17 +++++- .../data/mysql/pl-PL/mandatory/sample_notices.sql | 17 +++++- .../data/mysql/ru-RU/mandatory/sample_notices.sql | 17 +++++- installer/data/mysql/sysprefs.sql | 3 ++ .../data/mysql/uk-UA/mandatory/sample_notices.sql | 21 +++++++- installer/data/mysql/userflags.sql | 3 +- installer/data/mysql/userpermissions.sql | 3 +- installer/onboarding.pl | 6 +++ .../intranet-tmpl/prog/en/includes/permissions.inc | 9 ++++ .../en/modules/admin/preferences/circulation.pref | 12 +++++ .../prog/en/modules/admin/preferences/logs.pref | 6 +++ .../prog/en/modules/admin/smart-rules.tt | 54 ++++++++++++++++++- 25 files changed, 437 insertions(+), 12 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_19532-add_recalls_enum_branchtransfers.perl create mode 100644 installer/data/mysql/atomicupdate/bug_19532-add_recalls_flags.perl create mode 100644 installer/data/mysql/atomicupdate/bug_19532-add_recalls_notices.perl create mode 100644 installer/data/mysql/atomicupdate/bug_19532-add_recalls_sysprefs.perl create mode 100644 installer/data/mysql/atomicupdate/bug_19532-add_recalls_table.perl diff --git a/Koha/CirculationRules.pm b/Koha/CirculationRules.pm index 5042e6f55d3..467199115f8 100644 --- a/Koha/CirculationRules.pm +++ b/Koha/CirculationRules.pm @@ -157,6 +157,24 @@ our $RULE_KINDS = { note => { # This is not really a rule. Maybe we will want to separate this later. scope => [ 'branchcode', 'categorycode', 'itemtype' ], }, + recalls_allowed => { + scope => [ 'branchcode', 'categorycode', 'itemtype' ], + }, + recalls_per_record => { + scope => [ 'branchcode', 'categorycode', 'itemtype' ], + }, + on_shelf_recalls => { + scope => [ 'branchcode', 'categorycode', 'itemtype' ], + }, + recall_due_date_interval => { + scope => [ 'branchcode', 'categorycode', 'itemtype' ], + }, + recall_overdue_fine => { + scope => [ 'branchcode', 'categorycode', 'itemtype' ], + }, + recall_shelf_time => { + scope => [ 'branchcode', 'categorycode', 'itemtype' ], + }, # Not included (deprecated?): # * accountsent # * reservecharge diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl index 6bea920dd90..21b906cd0f8 100755 --- a/admin/smart-rules.pl +++ b/admin/smart-rules.pl @@ -112,6 +112,12 @@ if ($op eq 'delete') { cap_fine_to_replacement_price => undef, article_requests => undef, note => undef, + recalls_allowed => undef, + recalls_per_record => undef, + on_shelf_recalls => undef, + recall_due_date_interval => undef, + recall_overdue_fine => undef, + recall_shelf_time => undef, } } ); @@ -288,6 +294,12 @@ elsif ($op eq 'add') { my $overduefinescap = $input->param('overduefinescap') || ''; my $cap_fine_to_replacement_price = $input->param('cap_fine_to_replacement_price') eq 'on'; my $note = $input->param('note'); + my $recalls_allowed = $input->param('recalls_allowed'); + my $recalls_per_record = $input->param('recalls_per_record'); + my $on_shelf_recalls = $input->param('on_shelf_recalls'); + my $recall_due_date_interval = $input->param('recall_due_date_interval'); + my $recall_overdue_fine = $input->param('recall_overdue_fine'); + my $recall_shelf_time = $input->param('recall_shelf_time'); $debug and warn "Adding $br, $bor, $itemtype, $fine, $maxissueqty, $maxonsiteissueqty, $cap_fine_to_replacement_price"; my $rules = { @@ -320,6 +332,12 @@ elsif ($op eq 'add') { cap_fine_to_replacement_price => $cap_fine_to_replacement_price, article_requests => $article_requests, note => $note, + recalls_allowed => $recalls_allowed, + recalls_per_record => $recalls_per_record, + on_shelf_recalls => $on_shelf_recalls, + recall_due_date_interval => $recall_due_date_interval, + recall_overdue_fine => $recall_overdue_fine, + recall_shelf_time => $recall_shelf_time, }; Koha::CirculationRules->set_rules( diff --git a/installer/data/mysql/atomicupdate/bug_19532-add_recalls_enum_branchtransfers.perl b/installer/data/mysql/atomicupdate/bug_19532-add_recalls_enum_branchtransfers.perl new file mode 100644 index 00000000000..654242817e6 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_19532-add_recalls_enum_branchtransfers.perl @@ -0,0 +1,6 @@ +$DBversion = 'XXX'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{ ALTER TABLE branchtransfers MODIFY COLUMN reason ENUM('Manual', 'StockrotationAdvance', 'StockrotationRepatriation', 'ReturnToHome', 'ReturnToHolding', 'RotatingCollection', 'Reserve', 'LostReserve', 'CancelReserve', 'Recall', 'CancelRecall') }); + + NewVersion( $DBversion, 19532, "Add Recall and CancelReserve ENUM options to branchtransfers.reason" ); +} diff --git a/installer/data/mysql/atomicupdate/bug_19532-add_recalls_flags.perl b/installer/data/mysql/atomicupdate/bug_19532-add_recalls_flags.perl new file mode 100644 index 00000000000..5ece22846ed --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_19532-add_recalls_flags.perl @@ -0,0 +1,7 @@ +$DBversion = 'XXX'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{ INSERT IGNORE INTO userflags (bit, flag, flagdesc, defaulton) VALUES (27, 'recalls', 'Recalls', 0) }); + $dbh->do(q{ INSERT IGNORE INTO permissions (module_bit, code, description) VALUES (27, 'manage_recalls', 'Manage recalls for patrons') }); + + NewVersion( $DBversion, 19532, "Add recalls user flag and manage_recalls user permission" ); +} diff --git a/installer/data/mysql/atomicupdate/bug_19532-add_recalls_notices.perl b/installer/data/mysql/atomicupdate/bug_19532-add_recalls_notices.perl new file mode 100644 index 00000000000..269717e9b4a --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_19532-add_recalls_notices.perl @@ -0,0 +1,23 @@ +$DBversion = 'XXX'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{ + INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES + ('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item','Date: <> + +<> <>, + +A recall has been placed on the following item: <> / <> (<>). The due date has been updated, and is now <>. Please return the item before the due date. + +Thank you!','email'), + ('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','Date: <> + +<> <>, + +A recall that you requested on the following item: <> / <> (<>) is now ready for you to pick up at <>. Please pick up your item by <>. + +Thank you!','email'), + ('circulation','RECALL_REQUESTER_DET','','Details of patron who recalled item',1,'Details of patron who recalled item','
Date: <>

Recall for pickup at <>

<>, <>

  • <>
  • <>
  • <>
    <>
    <><>
  • <>

ITEM RECALLED

<>

<>
  • <>
  • <>
  • <>

Notes:

<>

', 'print') + }); + + NewVersion( $DBversion, 19532, "Add recalls notices: RETURN_RECALLED_ITEM, PICKUP_RECALLED_ITEM, RECALL_REQUESTER_DET" ); +} diff --git a/installer/data/mysql/atomicupdate/bug_19532-add_recalls_sysprefs.perl b/installer/data/mysql/atomicupdate/bug_19532-add_recalls_sysprefs.perl new file mode 100644 index 00000000000..c5d48271e76 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_19532-add_recalls_sysprefs.perl @@ -0,0 +1,11 @@ +$DBversion = 'XXX'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{ + INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES + ('RecallsLog','1',NULL,'If ON, log create/cancel/expire/fulfill actions on recalls','YesNo'), + ('RecallsMaxPickUpDelay','7',NULL,'Define the maximum time a recall can be awaiting pickup','Integer'), + ('UseRecalls','0',NULL,'Enable or disable recalls','YesNo') + }); + + NewVersion( $DBversion, 19532, "Add RecallsLog, RecallsMaxPickUpDelay and UseRecalls system preferences"); +} diff --git a/installer/data/mysql/atomicupdate/bug_19532-add_recalls_table.perl b/installer/data/mysql/atomicupdate/bug_19532-add_recalls_table.perl new file mode 100644 index 00000000000..57aaabd3adb --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_19532-add_recalls_table.perl @@ -0,0 +1,34 @@ +$DBversion = 'XXX'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{ DROP TABLE IF EXISTS recalls }); + $dbh->do(q{ + CREATE TABLE recalls ( + recall_id int(11) NOT NULL auto_increment, + borrowernumber int(11) NOT NULL DEFAULT 0, + recalldate datetime DEFAULT NULL, + biblionumber int(11) NOT NULL DEFAULT 0, + branchcode varchar(10) DEFAULT NULL, + cancellationdate datetime DEFAULT NULL, + recallnotes mediumtext, + priority smallint(6) DEFAULT NULL, + status varchar(1) DEFAULT NULL, + timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + itemnumber int(11) DEFAULT NULL, + waitingdate datetime DEFAULT NULL, + expirationdate datetime DEFAULT NULL, + old TINYINT(1) DEFAULT NULL, + item_level_recall TINYINT(1) NOT NULL DEFAULT 0, + PRIMARY KEY (recall_id), + KEY borrowernumber (borrowernumber), + KEY biblionumber (biblionumber), + KEY itemnumber (itemnumber), + KEY branchcode (branchcode), + CONSTRAINT recalls_ibfk_1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT recalls_ibfk_2 FOREIGN KEY (biblionumber) REFERENCES biblio (biblionumber) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT recalls_ibfk_3 FOREIGN KEY (itemnumber) REFERENCES items (itemnumber) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT recalls_ibfk_4 FOREIGN KEY (branchcode) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + }); + + NewVersion( $DBversion, 19532, "Add recalls table" ); +} diff --git a/installer/data/mysql/de-DE/mandatory/sample_notices.sql b/installer/data/mysql/de-DE/mandatory/sample_notices.sql index 0fbf5f73d25..cb2fb6d1372 100644 --- a/installer/data/mysql/de-DE/mandatory/sample_notices.sql +++ b/installer/data/mysql/de-DE/mandatory/sample_notices.sql @@ -205,7 +205,22 @@ INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title` ('circulation', 'AR_PENDING', '', 'Artikelbestellung - Offen', 0, 'Artikelbestellung ist eingegangen', 'Liebe/r <> <> (<>)\r\n\r\nIhre Artikelbestellung aus <> (<>) ist bei uns eingegangen.\r\n\r\nBestellter Artikel:\r\nTitel: <>\r\nVerfasser: <>\r\nJahrgang/Band: <>\r\nHeft: <>\r\nJahr/Datum: <>\r\nSeiten: <>\r\nKapitel: <>\r\nHinweise: <>\r\n\r\n\r\nVielen Dank!', 'email'), ('circulation', 'AR_SLIP', '', 'Artikelbestellung - Quittung', 0, 'Artikelbestellung', 'Artikelbestellung:\r\n\r\n<> <> (<>)\r\n\r\nTitel: <>\r\nBarcode: <>\r\n\r\nBestellter Artikel:\r\nTitle: <>\r\nVerfasser: <>\r\nJahrgang/Band: <>\r\nHeft: <>\r\nJahr/Datum: <>\r\nSeiten: <>\r\nKapitel: <>\r\nHinweise: <>\r\n', 'print'), ('circulation', 'AR_PROCESSING', '', 'Artikelbestellung - In Bearbeitung', 0, 'Artikelbestellung in Bearbeitung', 'Liebe/r <> <> (<>)\r\n\r\nIhre Artikelbestellung aus <> (<>) wird zur Zeit bearbeitet.\r\n\r\nBestellter Artikel:\r\nTitel: <>\r\nVerfasser: <>\r\nBand/Jahrgang: <>\r\nHeft: <>\r\nJahr/Datum: <>\r\nSeiten: <>\r\nKapitel: <>\r\nHinweise: <>\r\n\r\nVielen Dank!', 'email'), -('circulation', 'CHECKOUT_NOTE', '', 'Ausleihnotiz zu einem Exemplar', '0', 'Ausleihnotiz', '<> <> hat eine Notiz zu folgendem Exemplar angegeben: <> - <> (<>).','email'); +('circulation', 'CHECKOUT_NOTE', '', 'Ausleihnotiz zu einem Exemplar', '0', 'Ausleihnotiz', '<> <> hat eine Notiz zu folgendem Exemplar angegeben: <> - <> (<>).','email'), +('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item','Date: <> + +<> <>, + +A recall has been placed on the following item: <> / <> (<>). The due date has been updated, and is now <>. Please return the item before the due date. + +Thank you!','email'), +('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','Date: <> + +<> <>, + +A recall that you requested on the following item: <> / <> (<>) is now ready for you to pick up at <>. Please pick up your item by <>. + +Thank you!','email'), +('circulation','RECALL_REQUESTER_DET','','Details of patron who recalled item',1,'Details of patron who recalled item','
Date: <>

Recall for pickup at <>

<>, <>

  • <>
  • <>
  • <>
    <>
    <><>
  • <>

ITEM RECALLED

<>

<>
  • <>
  • <>
  • <>

Notes:

<>

', 'print'); INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES ('circulation', 'ACCOUNT_PAYMENT', '', 'Zahlung', 0, 'Zahlungsquittung für Bibliothekskonto', '[%- USE Price -%]\r\nEine Zahlung in Höhe von [% credit.amount * -1 | $Price %] wurde auf Ihr Konto verbucht.\r\n\r\nDiese Zahlung wurde mit den folgenden Gebührenposten verrechnet:\r\n[%- FOREACH o IN offsets %]\r\nBeschreibung: [% o.debit.description %]\r\nGezahlter Betrag: [% o.amount * -1 | $Price %]\r\nOffener Betrag: [% o.debit.amountoutstanding | $Price %]\r\n[% END %]', 'email', 'default'), diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml index 7f814c377b0..038bd507f5d 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -1179,3 +1179,65 @@ tables: - "Title: <>" - "" - "Message: <>" + + - module: circulation + code: RETURN_RECALLED_ITEM + branchcode: "" + name: "Notification to return a recalled item" + is_html: 0 + title: "Notification to return a recalled item" + message_transport_type: email + lang: default + content: + - "Date: <>" + - "" + - "<> <>," + - "" + - "A recall has been placed on the following item: <> / <> (<>). The due date has been updated, and is now <>. Please return the item before the due date." + - "" + - "Thank you!" + + - module: circulation + code: PICKUP_RECALLED_ITEM + branchcode: "" + name: "Recalled item awaiting pickup" + is_html: 0 + title: "Recalled item awaiting pickup" + message_transport_type: email + lang: default + content: + - "Date: <>" + - "" + - "<> <>," + - "" + - "A recall that you requested on the following item: <> / <> (<>) is now ready for you to pick up at <>. Please pick up your item by <>." + - "" + - "Thank you!" + + - module: circulation + code: RECALL_REQUESTER_DET + branchcode: "" + name: "Details of patron who recalled item" + is_html: 1 + title: "Details of patron who recalled item" + message_transport_type: print + lang: default + content: + - "
Date: <>
" + - "

Recall for pickup at <>

<>, <>

" + - "
    " + - "
  • <>
  • " + - "
  • <>
  • " + - "
  • <>
    <>
    <><>
  • " + - "
  • <>
  • " + - "
" + - "
" + - "

ITEM RECALLED

" + - "

<>

" + - "
<>
" + - "
    " + - "
  • <>
  • " + - "
  • <>
  • " + - "
  • <>
  • " + - "
" + - "

Notes:

<>

" diff --git a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql b/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql index ba88804699f..4164efc03cc 100644 --- a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql +++ b/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql @@ -84,7 +84,22 @@ INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title` ('circulation', 'AR_PENDING', '', 'Demande d\'article - en attente', 0, 'Demande d\'article reçue', 'Bonjour <> <> (<>)\r\n\r\nNous avons bien reçu votre demande d\'article de <> (<>).\r\n\r\nArticle demandé :\r\nTitre : <>\r\nAuteur : <>\r\nVolume : <>\r\nNuméro : <>\r\nDate : <>\r\nPages : <>\r\nChapitres : <>\r\nNotes : <>\r\n\r\n\r\nMerci.', 'email'), ('circulation', 'AR_SLIP', '', 'Demande d\'article - ticket', 0, 'Demande d\'article', 'Demande d\'article :\r\n\r\n<> <> (<>),\r\n\r\nTitre : <>\r\nCode-barres : <>\r\n\r\nArticle demandé :\r\nTitre : <>\r\nAuteur : <>\r\nVolume : <>\r\nNuméro : <>\r\nDate : <>\r\nPages : <>\r\nChapitres : <>\r\nNotes : <>\r\n', 'print'), ('circulation', 'AR_PROCESSING', '', 'Demande d\'article - en traitement', 0, 'Demande d\'article en traitement', 'Bonjour <> <> (<>),\r\n\r\nNous traitons votre demande d\'article de <> (<>).\r\n\r\nArticle demandé :\r\nTitre : <>\r\nAuteur : <>\r\nVolume : <>\r\nNuméro : <>\r\nDate : <>\r\nPages : <>\r\nChapitres : <>\r\nNotes : <>\r\n\r\nMerci.', 'email'), -('circulation', 'CHECKOUT_NOTE', '', 'Notes d\'un utilisateur sur les documents en prêt', '0', 'Notes sur les documents en prêts', '<> <> a ajouté une note sur un exemplaire de <> - <> (<>).','email'); +('circulation', 'CHECKOUT_NOTE', '', 'Notes d\'un utilisateur sur les documents en prêt', '0', 'Notes sur les documents en prêts', '<> <> a ajouté une note sur un exemplaire de <> - <> (<>).','email'), +('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item','Date: <> + +<> <>, + +A recall has been placed on the following item: <> / <> (<>). The due date has been updated, and is now <>. Please return the item before the due date. + +Thank you!','email'), +('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','Date: <> + +<> <>, + +A recall that you requested on the following item: <> / <> (<>) is now ready for you to pick up at <>. Please pick up your item by <>. + +Thank you!','email'), +('circulation','RECALL_REQUESTER_DET','','Details of patron who recalled item',1,'Details of patron who recalled item','
Date: <>

Recall for pickup at <>

<>, <>

  • <>
  • <>
  • <>
    <>
    <><>
  • <>

ITEM RECALLED

<>

<>
  • <>
  • <>
  • <>

Notes:

<>

', 'print'); INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type) VALUES ('members','PASSWORD_RESET','','Récupération de mot de passe en ligne',1,'Récupération de mot de passe','\r\n

Ce courriel vous a été envoyé suite à une demande de récupération de mot de passe pour le compte de <>.\r\n

\r\n

\r\nVous pouvez créer un nouveau mot de passe en cliquant le lien suivant :\r\n
>\"><>\r\n

\r\n

Ce lien sera valide pour 2 jours après la réception de ce courriel. Si vous ne changez pas votre mot de passe d\'ici deux jours, vous devrez faire une nouvelle demande de récuération de mot de passe..

\r\n

Merci.

\r\n\r\n','email'), diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql index 6106d737f35..5e0aca7ca61 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql @@ -199,7 +199,22 @@ INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title` ('circulation', 'AR_PENDING', '', 'Article request - pending', 0, 'Article request received', 'Dear <> <> (<>)\r\n\r\nWe have received your request for an article from <> (<>).\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\nNotes: <>\r\n\r\n\r\nThank you!', 'email'), ('circulation', 'AR_SLIP', '', 'Article request - print slip', 0, 'Article request', 'Article request:\r\n\r\n<> <> (<>),\r\n\r\nTitle: <>\r\nBarcode: <>\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\nNotes: <>\r\n', 'print'), ('circulation', 'AR_PROCESSING', '', 'Article request - processing', 0, 'Article request processing', 'Dear <> <> (<>),\r\n\r\nWe are now processing your request for an article from <> (<>).\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\nNotes: <>\r\n\r\nThank you!', 'email'), -('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<> <> has added a note to the item <> - <> (<>).','email'); +('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<> <> has added a note to the item <> - <> (<>).','email'), +('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item','Date: <> + +<> <>, + +A recall has been placed on the following item: <> / <> (<>). The due date has been updated, and is now <>. Please return the item before the due date. + +Thank you!','email'), +('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','Date: <> + +<> <>, + +A recall that you requested on the following item: <> / <> (<>) is now ready for you to pick up at <>. Please pick up your item by <>. + +Thank you!','email'), +('circulation','RECALL_REQUESTER_DET','','Details of patron who recalled item',1,'Details of patron who recalled item','
Date: <>

Recall for pickup at <>

<>, <>

  • <>
  • <>
  • <>
    <>
    <><>
  • <>

ITEM RECALLED

<>

<>
  • <>
  • <>
  • <>

Notes:

<>

', 'print'); INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES ('circulation', 'ACCOUNT_PAYMENT', '', 'Account payment', 0, 'Account payment', '[%- USE Price -%]\r\nA payment of [% credit.amount * -1 | $Price %] has been applied to your account.\r\n\r\nThis payment affected the following fees:\r\n[%- FOREACH o IN offsets %]\r\nDescription: [% o.debit.description %]\r\nAmount paid: [% o.amount * -1 | $Price %]\r\nAmount remaining: [% o.debit.amountoutstanding | $Price %]\r\n[% END %]', 'email', 'default'), diff --git a/installer/data/mysql/it-IT/necessari/notices.sql b/installer/data/mysql/it-IT/necessari/notices.sql index e462da9d000..9096d17ee4c 100644 --- a/installer/data/mysql/it-IT/necessari/notices.sql +++ b/installer/data/mysql/it-IT/necessari/notices.sql @@ -201,7 +201,22 @@ INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title` ('circulation', 'AR_PENDING', '', 'Richiesta articolo - ricevuta', 0, 'Ricevuto la richiesta di un articolo', 'Salve <> <> (<>)\r\n\r\nAbbiamo ricevuto la tua richiesta di un articolo di <> (<>).\r\n\r\nL\'articolo richiesto:\r\nTitolo: <>\r\nAutore: <>\r\nVolume: <>\r\nFascicolo: <>\r\nData: <>\r\nPagine: <>\r\nChapitoli: <>\r\nNote: <>\r\n\r\nGrazie!', 'email'), ('circulation', 'AR_SLIP', '', 'Richiesta articolo - ricevuta a stampa', 0, 'Richiesta articolo', 'Richiesta articolo\r\n\r\n<> <> (<>),\r\n\r\nTitolo: <>\r\nBarcode: <>\r\n\r\nArticolo rechiesto:\r\nTitle: <>\r\nAutore: <>\r\nVolume: <>\r\nFascicolo: <>\r\nData: <>\r\nPagine: <>\r\nChapitoli: <>\r\nNote: <>\r\n', 'print'), ('circulation', 'AR_PROCESSING', '', 'Richiesta articolo - in lavorazione', 0, 'La richiesta di un articolo è in lavorazione', 'Salve <> <> (<>),\r\n\r\nStiamo ora lavorando la tua richiesta di un articolo da <> (<>).\r\n\r\nL\'articolo richiesto:\r\nTitolo: <>\r\nAutore: <>\r\nVolume: <>\r\nFascicolo: <>\r\nData: <>\r\nPagine: <>\r\nChapitoli: <>\r\nNote: <>\r\n\r\nGrazie!', 'email'), -('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<> <> has added a note to the item <> - <> (<>).','email'); +('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<> <> has added a note to the item <> - <> (<>).','email'), +('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item','Date: <> + +<> <>, + +A recall has been placed on the following item: <> / <> (<>). The due date has been updated, and is now <>. Please return the item before the due date. + +Thank you!','email'), +('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','Date: <> + +<> <>, + +A recall that you requested on the following item: <> / <> (<>) is now ready for you to pick up at <>. Please pick up your item by <>. + +Thank you!','email'), +('circulation','RECALL_REQUESTER_DET','','Details of patron who recalled item',1,'Details of patron who recalled item','
Date: <>

Recall for pickup at <>

<>, <>

  • <>
  • <>
  • <>
    <>
    <><>
  • <>

ITEM RECALLED

<>

<>
  • <>
  • <>
  • <>

Notes:

<>

', 'print'); INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES ('circulation', 'ACCOUNT_PAYMENT', '', 'Account payment', 0, 'Account payment', '[%- USE Price -%]\r\nA payment of [% credit.amount * -1 | $Price %] has been applied to your account.\r\n\r\nThis payment affected the following fees:\r\n[%- FOREACH o IN offsets %]\r\nDescription: [% o.debit.description %]\r\nAmount paid: [% o.amount * -1 | $Price %]\r\nAmount remaining: [% o.debit.amountoutstanding | $Price %]\r\n[% END %]', 'email', 'default'), diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 3f8d490fe6d..09e09bedbad 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -924,7 +924,7 @@ CREATE TABLE `branchtransfers` ( -- information for items that are in transit be `datearrived` datetime default NULL, -- the date the transfer arrived at its destination `tobranch` varchar(10) NOT NULL default '', -- the branch the transfer was going to `comments` LONGTEXT, -- any comments related to the transfer - `reason` ENUM('Manual', 'StockrotationAdvance', 'StockrotationRepatriation', 'ReturnToHome', 'ReturnToHolding', 'RotatingCollection', 'Reserve', 'LostReserve', 'CancelReserve'), -- what triggered the transfer + `reason` ENUM('Manual', 'StockrotationAdvance', 'StockrotationRepatriation', 'ReturnToHome', 'ReturnToHolding', 'RotatingCollection', 'Reserve', 'LostReserve', 'CancelReserve','Recall','CancelRecall'), -- what triggered the transfer PRIMARY KEY (`branchtransfer_id`), KEY `frombranch` (`frombranch`), KEY `tobranch` (`tobranch`), @@ -1738,6 +1738,38 @@ CREATE TABLE `patronimage` ( -- information related to patron images ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- +-- Table structure for table `recalls` +-- + +DROP TABLE IF EXISTS recalls; +CREATE TABLE recalls ( -- information related to recalls in Koha + recall_id int(11) NOT NULL auto_increment, -- primary key + borrowernumber int(11) NOT NULL DEFAULT 0, -- foreign key from the borrowers table defining which patron requested a recall + recalldate datetime DEFAULT NULL, -- the date the recall request was placed + biblionumber int(11) NOT NULL DEFAULT 0, -- foreign key from the biblio table defining which bib record this request is for + branchcode varchar(10) DEFAULT NULL, -- foreign key from the branches table defining which branch the patron wishes to pick up their recall from + cancellationdate datetime DEFAULT NULL, -- the date this recall was cancelled + recallnotes mediumtext, -- notes related to this recall + priority smallint(6) DEFAULT NULL, -- where in the queue the patron sits + status varchar(1) DEFAULT NULL, -- a one letter code defining the status of the recall. R=requested, O=overdue, W=awaiting pickup, T=in transit, E=expired, C=cancelled, F=finished/completed + timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- the date and time this recall was last updated + itemnumber int(11) DEFAULT NULL, -- foreign key from the items table defining the specific item the recall request was placed on + waitingdate datetime DEFAULT NULL, -- the date the item was marked as waiting for the patron at the library + expirationdate datetime DEFAULT NULL, -- the date the recall expires + old TINYINT(1) DEFAULT NULL, -- flag if the recall is old and no longer active, i.e. expired, cancelled or completed + item_level_recall TINYINT(1) NOT NULL DEFAULT 0, -- flag if item-level recall + PRIMARY KEY (recall_id), + KEY borrowernumber (borrowernumber), + KEY biblionumber (biblionumber), + KEY itemnumber (itemnumber), + KEY branchcode (branchcode), + CONSTRAINT recalls_ibfk_1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT recalls_ibfk_2 FOREIGN KEY (biblionumber) REFERENCES biblio (biblionumber) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT recalls_ibfk_3 FOREIGN KEY (itemnumber) REFERENCES items (itemnumber) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT recalls_ibfk_4 FOREIGN KEY (branchcode) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +-- -- Table structure for table `reserves` -- diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql index 8439fd96d8f..9cbb734f0c8 100644 --- a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql +++ b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql @@ -218,7 +218,22 @@ INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title` ('circulation', 'AR_PENDING', '', 'Article request - pending', 0, 'Article request received', 'Dear <> <> (<>)\r\n\r\nWe have received your request for an article from <> (<>).\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\nNotes: <>\r\n\r\n\r\nThank you!', 'email'), ('circulation', 'AR_SLIP', '', 'Article request - print slip', 0, 'Article request', 'Article request:\r\n\r\n<> <> (<>),\r\n\r\nTitle: <>\r\nBarcode: <>\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\nNotes: <>\r\n', 'print'), ('circulation', 'AR_PROCESSING', '', 'Article request - processing', 0, 'Article request processing', 'Dear <> <> (<>),\r\n\r\nWe are now processing your request for an article from <> (<>).\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\nNotes: <>\r\n\r\nThank you!', 'email'), -('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<> <> has added a note to the item <> - <> (<>).','email'); +('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<> <> has added a note to the item <> - <> (<>).','email'), +('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item','Date: <> + +<> <>, + +A recall has been placed on the following item: <> / <> (<>). The due date has been updated, and is now <>. Please return the item before the due date. + +Thank you!','email'), +('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','Date: <> + +<> <>, + +A recall that you requested on the following item: <> / <> (<>) is now ready for you to pick up at <>. Please pick up your item by <>. + +Thank you!','email'), +('circulation','RECALL_REQUESTER_DET','','Details of patron who recalled item',1,'Details of patron who recalled item','
Date: <>

Recall for pickup at <>

<>, <>

  • <>
  • <>
  • <>
    <>
    <><>
  • <>

ITEM RECALLED

<>

<>
  • <>
  • <>
  • <>

Notes:

<>

', 'print'); INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES ('circulation', 'ACCOUNT_PAYMENT', '', 'Account payment', 0, 'Account payment', '[%- USE Price -%]\r\nA payment of [% credit.amount * -1 | $Price %] has been applied to your account.\r\n\r\nThis payment affected the following fees:\r\n[%- FOREACH o IN offsets %]\r\nDescription: [% o.debit.description %]\r\nAmount paid: [% o.amount * -1 | $Price %]\r\nAmount remaining: [% o.debit.amountoutstanding | $Price %]\r\n[% END %]', 'email', 'default'), diff --git a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql index 6373e2e975a..3bb84a2ce7b 100644 --- a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql +++ b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql @@ -196,7 +196,22 @@ INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title` ('circulation', 'AR_PENDING', '', 'Article request - pending', 0, 'Article request received', 'Dear <> <> (<>)\r\n\r\nWe have received your request for an article from <> (<>).\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\nNotes: <>\r\n\r\n\r\nThank you!', 'email'), ('circulation', 'AR_SLIP', '', 'Article request - print slip', 0, 'Article request', 'Article request:\r\n\r\n<> <> (<>),\r\n\r\nTitle: <>\r\nBarcode: <>\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\nNotes: <>\r\n', 'print'), ('circulation', 'AR_PROCESSING', '', 'Article request - processing', 0, 'Article request processing', 'Dear <> <> (<>),\r\n\r\nWe are now processing your request for an article from <> (<>).\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\nNotes: <>\r\n\r\nThank you!', 'email'), -('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<> <> has added a note to the item <> - <> (<>).','email'); +('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<> <> has added a note to the item <> - <> (<>).','email'), +('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item','Date: <> + +<> <>, + +A recall has been placed on the following item: <> / <> (<>). The due date has been updated, and is now <>. Please return the item before the due date. + +Thank you!','email'), +('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','Date: <> + +<> <>, + +A recall that you requested on the following item: <> / <> (<>) is now ready for you to pick up at <>. Please pick up your item by <>. + +Thank you!','email'), +('circulation','RECALL_REQUESTER_DET','','Details of patron who recalled item',1,'Details of patron who recalled item','
Date: <>

Recall for pickup at <>

<>, <>

  • <>
  • <>
  • <>
    <>
    <><>
  • <>

ITEM RECALLED

<>

<>
  • <>
  • <>
  • <>

Notes:

<>

', 'print'); INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES ('circulation', 'ACCOUNT_PAYMENT', '', 'Account payment', 0, 'Account payment', '[%- USE Price -%]\r\nA payment of [% credit.amount * -1 | $Price %] has been applied to your account.\r\n\r\nThis payment affected the following fees:\r\n[%- FOREACH o IN offsets %]\r\nDescription: [% o.debit.description %]\r\nAmount paid: [% o.amount * -1 | $Price %]\r\nAmount remaining: [% o.debit.amountoutstanding | $Price %]\r\n[% END %]', 'email', 'default'), diff --git a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql index f9c4fc55d50..bdf51476a96 100644 --- a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql +++ b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql @@ -198,7 +198,22 @@ INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title` ('circulation', 'AR_PENDING', '', 'Article request - pending', 0, 'Article request received', 'Dear <> <> (<>)\r\n\r\nWe have received your request for an article from <> (<>).\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\nNotes: <>\r\n\r\n\r\nThank you!', 'email'), ('circulation', 'AR_SLIP', '', 'Article request - print slip', 0, 'Article request', 'Article request:\r\n\r\n<> <> (<>),\r\n\r\nTitle: <>\r\nBarcode: <>\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\nNotes: <>\r\n', 'print'), ('circulation', 'AR_PROCESSING', '', 'Article request - processing', 0, 'Article request processing', 'Dear <> <> (<>),\r\n\r\nWe are now processing your request for an article from <> (<>).\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\nNotes: <>\r\n\r\nThank you!', 'email'), -('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<> <> has added a note to the item <> - <> (<>).','email'); +('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<> <> has added a note to the item <> - <> (<>).','email'), +('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item','Date: <> + +<> <>, + +A recall has been placed on the following item: <> / <> (<>). The due date has been updated, and is now <>. Please return the item before the due date. + +Thank you!','email'), +('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','Date: <> + +<> <>, + +A recall that you requested on the following item: <> / <> (<>) is now ready for you to pick up at <>. Please pick up your item by <>. + +Thank you!','email'), +('circulation','RECALL_REQUESTER_DET','','Details of patron who recalled item',1,'Details of patron who recalled item','
Date: <>

Recall for pickup at <>

<>, <>

  • <>
  • <>
  • <>
    <>
    <><>
  • <>

ITEM RECALLED

<>

<>
  • <>
  • <>
  • <>

Notes:

<>

', 'print'); INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES ('circulation', 'ACCOUNT_PAYMENT', '', 'Account payment', 0, 'Account payment', '[%- USE Price -%]\r\nA payment of [% credit.amount * -1 | $Price %] has been applied to your account.\r\n\r\nThis payment affected the following fees:\r\n[%- FOREACH o IN offsets %]\r\nDescription: [% o.debit.description %]\r\nAmount paid: [% o.amount * -1 | $Price %]\r\nAmount remaining: [% o.debit.amountoutstanding | $Price %]\r\n[% END %]', 'email', 'default'), diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index ead29651f50..dba57332667 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -523,6 +523,8 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('QueryWeightFields','1',NULL,'If ON, enables field weighting','YesNo'), ('QuoteOfTheDay','0',NULL,'Enable or disable display of Quote of the Day on the OPAC home page','YesNo'), ('RandomizeHoldsQueueWeight','0',NULL,'if ON, the holds queue in circulation will be randomized, either based on all location codes, or by the location codes specified in StaticHoldsQueueWeight','YesNo'), +('RecallsLog','1',NULL,'If ON, log create/cancel/expire/fulfill actions on recalls','YesNo'), +('RecallsMaxPickUpDelay','7',NULL,'Define the maximum time a recall can be awaiting pickup','Integer'), ('RecordLocalUseOnReturn','0',NULL,'If ON, statistically record returns of unissued items as local use, instead of return','YesNo'), ('RefundLostOnReturnControl','CheckinLibrary','CheckinLibrary|ItemHomeBranch|ItemHoldingBranch','If a lost item is returned, choose which branch to pick rules for refunding.','Choice'), ('RenewAccruingItemWhenPaid','0','','If enabled, when the fines on an item accruing is paid off, attempt to renew that item. If the syspref "RenewalPeriodBase" is set to "due date", renewed items may still be overdue','YesNo'), @@ -686,6 +688,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('useDischarge','','','Allows librarians to discharge borrowers and borrowers to request a discharge','YesNo'), ('UseEmailReceipts','0','','Send email receipts for payments and write-offs','YesNo'), ('UseICU','0','1','Tell Koha if ICU indexing is in use for Zebra or not.','YesNo'), +('UseRecalls','0',NULL,'Enable or disable recalls','YesNo'), ('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'), ('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'), ('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'), diff --git a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql index 5356ad74f4d..bc7ce766c4a 100644 --- a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql +++ b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql @@ -289,7 +289,26 @@ INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, m ('circulation', 'AR_PROCESSING', '', 'запит статті - обробка', 0, 'Обробка запиту статті', '<> <> (<>)\r\n\r\n Ми зараз обробляємо Ваш запит на статтю зі „<>“ (<>).\r\n\r\n Запитувана стаття:\r\n Заголовок: <>\r\n Автор: <>\r\n Том: <>\r\n Випуск: <>\r\n Дата: <>\r\n Сторінки: <>\r\n Розділи: <>\r\n Примітки: <>\r\n\r\n Спасибі!', 'email'), -('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<> <> has added a note to the item <> - <> (<>).','email'); +('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<> <> has added a note to the item <> - <> (<>).','email'), + +('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item','Date: <> + +<> <>, + +A recall has been placed on the following item: <> / <> (<>). The due date has been updated, and is now <>. Please return the item before the due date. + +Thank you!','email'), + +('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','Date: <> + +<> <>, + +A recall that you requested on the following item: <> / <> (<>) is now ready for you to pick up at <>. Please pick up your item by <>. + +Thank you!','email'), + +('circulation','RECALL_REQUESTER_DET','','Details of patron who recalled item',1,'Details of patron who recalled item','
Date: <>

Recall for pickup at <>

<>, <>

  • <>
  • <>
  • <>
    <>
    <><>
  • <>

ITEM RECALLED

<>

<>
  • <>
  • <>
  • <>

Notes:

<>

', 'print') +; INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES ('circulation', 'ACCOUNT_PAYMENT', '', 'Account payment', 0, 'Account payment', '[%- USE Price -%]\r\nA payment of [% credit.amount * -1 | $Price %] has been applied to your account.\r\n\r\nThis payment affected the following fees:\r\n[%- FOREACH o IN offsets %]\r\nDescription: [% o.debit.description %]\r\nAmount paid: [% o.amount * -1 | $Price %]\r\nAmount remaining: [% o.debit.amountoutstanding | $Price %]\r\n[% END %]', 'email', 'default'), diff --git a/installer/data/mysql/userflags.sql b/installer/data/mysql/userflags.sql index 40ec125eeaf..1f31b200fea 100644 --- a/installer/data/mysql/userflags.sql +++ b/installer/data/mysql/userflags.sql @@ -23,5 +23,6 @@ INSERT INTO userflags (bit, flag, flagdesc, defaulton) VALUES (23,'self_check','Self check modules',0), (24, 'stockrotation', 'Manage stockrotation operations', 0), (25, 'cash_management', 'Cash management', 0), -(26, 'problem_reports', 'Manage problem reports', 0) +(26, 'problem_reports', 'Manage problem reports', 0), +(27, 'recalls', 'Recalls', 0) ; diff --git a/installer/data/mysql/userpermissions.sql b/installer/data/mysql/userpermissions.sql index a79e48c6ff4..1a20b533e72 100644 --- a/installer/data/mysql/userpermissions.sql +++ b/installer/data/mysql/userpermissions.sql @@ -126,5 +126,6 @@ INSERT INTO permissions (module_bit, code, description) VALUES (25, 'anonymous_refund', 'Perform refund actions from cash registers'), (25, 'cashup', 'Perform cash register cashup action'), (25, 'takepayment', 'Access the point of sale page and take payments'), - (26, 'manage_problem_reports', 'Manage OPAC problem reports') + (26, 'manage_problem_reports', 'Manage OPAC problem reports'), + (27, 'manage_recalls', 'Manage recalls for patrons') ; diff --git a/installer/onboarding.pl b/installer/onboarding.pl index 547df29e0da..6130ed70216 100755 --- a/installer/onboarding.pl +++ b/installer/onboarding.pl @@ -283,6 +283,12 @@ if ( $step == 5 ) { rentaldiscount => 0, reservesallowed => $reservesallowed, suspension_chargeperiod => undef, + recalls_allowed => undef, + recalls_per_record => undef, + on_shelf_recalls => undef, + recall_due_date_interval => undef, + recall_overdue_fine => undef, + recall_shelf_time => undef, } }; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc index 11795379305..e337c123534 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc @@ -75,6 +75,9 @@ [%- CASE 'problem_reports' -%] OPAC problem reports management ([% name | html %]) + [%- CASE 'recalls' -%] + Recalls + ([% name | html %]) [%- END -%] [%- END -%] @@ -728,5 +731,11 @@ Manage OPAC problem reports ([% name | html %]) + [%# recalls %] + [%- CASE 'manage_recalls' -%] + + Manage recalls for patrons + + ([% name | html %]) [%- END -%] [%- END -%] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index dbea85baabb..08431f2e65f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -1147,3 +1147,15 @@ Circulation: - pref: ClaimReturnedWarningThreshold class: integer - items. + Recalls: + - + - Mark a recall as problematic if it has been waiting to be picked up for + - pref: RecallsMaxPickUpDelay + - class: integer + - days. + - + - pref: UseRecalls + choices: + yes: Use + no: "Don't use" + - recalls. diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref index 462871c947e..837593df705 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref @@ -90,6 +90,12 @@ Logging: on: Log off: "Don't log" - " successful authentications" + - + - pref: RecallsLog + choices: + on: Log + off: "Don't log" + - any actions on recalls (create, cancel, expire, fulfill). Debugging: - diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt index 5ae3bb94e1a..d6e6cbc5b3f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt @@ -117,6 +117,14 @@ OPAC item level holds Article requests Rental discount (%) + [% IF Koha.Preference('UseRecalls') %] + Recalls allowed (total) + Recalls per record (count) + On shelf recalls allowed + Recall due date interval (day) + Recall overdue fine amount + Recall pickup period (day) + [% END %] Actions @@ -155,8 +163,14 @@ [% SET opacitemholds = all_rules.$c.$i.opacitemholds %] [% SET article_requests = all_rules.$c.$i.article_requests %] [% SET rentaldiscount = all_rules.$c.$i.rentaldiscount %] + [% SET recalls_allowed = all_rules.$c.$i.recalls_allowed %] + [% SET recalls_per_record = all_rules.$c.$i.recalls_per_record %] + [% SET on_shelf_recalls = all_rules.$c.$i.on_shelf_recalls %] + [% SET recall_due_date_interval = all_rules.$c.$i.recall_due_date_interval %] + [% SET recall_overdue_fine = all_rules.$c.$i.recall_overdue_fine %] + [% SET recall_shelf_time = all_rules.$c.$i.recall_shelf_time %] - [% SET show_rule = maxissueqty || maxonsiteissueqty || issuelength || lengthunit || hardduedate || hardduedatebefore || hardduedateexact || fine || chargeperiod || chargeperiod_charge_at || firstremind || overduefinescap || cap_fine_to_replacement_price || finedays || maxsuspensiondays || suspension_chargeperiod || renewalsallowed || renewalsallowed || norenewalbefore || auto_renew || no_auto_renewal_after || no_auto_renewal_after_hard_limit || reservesallowed || holds_per_day || holds_per_record || onshelfholds || opacitemholds || article_requests || article_requests %] + [% SET show_rule = maxissueqty || maxonsiteissueqty || issuelength || lengthunit || hardduedate || hardduedatebefore || hardduedateexact || fine || chargeperiod || chargeperiod_charge_at || firstremind || overduefinescap || cap_fine_to_replacement_price || finedays || maxsuspensiondays || suspension_chargeperiod || renewalsallowed || renewalsallowed || norenewalbefore || auto_renew || no_auto_renewal_after || no_auto_renewal_after_hard_limit || reservesallowed || holds_per_day || holds_per_record || onshelfholds || opacitemholds || article_requests || article_requests || recalls_allowed || recalls_per_record || on_shelf_recalls || recall_due_date_interval || recall_overdue_fine || recall_shelf_time %] [% IF show_rule %] [% SET row_count = row_count + 1 %] @@ -301,6 +315,22 @@ [% END %] [% rentaldiscount | html %] + [% IF Koha.Preference('UseRecalls') %] + [% recalls_allowed | html %] + [% recalls_per_record | html %] + + [% IF on_shelf_recalls == 1 %] + Yes + [% ELSIF on_shelf_recalls == 2 %] + If all unavailable + [% ELSE %] + If any unavailable + [% END %] + + [% recall_due_date_interval | html %] + [% recall_overdue_fine FILTER format("%.2f") %] + [% recall_shelf_time | html %] + [% END %] Edit Delete @@ -404,6 +434,20 @@ + [% IF Koha.Preference('UseRecalls') %] + + + + + + + + + [% END %] @@ -443,6 +487,14 @@ OPAC item level holds Article requests Rental discount (%) + [% IF Koha.Preference('UseRecalls') %] + Recalls allowed (total) + Recalls per record (count) + On shelf recalls allowed + Recall due date interval (day) + Recall overdue fine amount + Recall pickup period (day) + [% END %]   -- 2.11.0