View | Details | Raw Unified | Return to bug 23781
Collapse All | Expand All

(-)a/circ/returns.pl (+37 lines)
Lines 186-191 if ( $query->param('reserve_id') ) { Link Here
186
    }
186
    }
187
}
187
}
188
188
189
if ( $query->param('recall_id') ){
190
    my $recall = Koha::Recalls->find(scalar $query->param('recall_id'));
191
    my $recall_borrower = $recall->patron;
192
    my $item = Koha::Items->find($recall->itemnumber);
193
    my $biblio = Koha::Biblios->find($item->biblionumber);
194
195
    my $issuing_rule = Koha::IssuingRules->get_effective_issuing_rule({ categorycode => $recall_borrower->categorycode, itemtype => $item->itype, branchcode => $item->holdingbranch });
196
    my $shelf_time = $issuing_rule->recall_shelf_time || C4::Context->preference('RecallsMaxPickUpDelay');
197
    my $expirationdate = dt_from_string()->add( $issuing_rule->lengthunit => $shelf_time );
198
199
    $recall->update({ status => 'W', waitingdate => dt_from_string(), expirationdate => $expirationdate });
200
    # send notice to user who requested recall to pick up item
201
202
    my $letter = C4::Letters::GetPreparedLetter (
203
            module => 'circulation',
204
            letter_code => 'PICKUP_RECALLED_ITEM',
205
            branchcode => $recall->branchcode,
206
            tables => {
207
                'biblio', $biblio->biblionumber,
208
                'borrowers', $recall_borrower->borrowernumber,
209
                'items', $item->itemnumber,
210
                'recalls', $recall->recall_id,
211
            },
212
    );
213
214
    my $messaging_preferences = C4::Members::Messaging::GetMessagingPreferences({ borrowernumber => $recall_borrower->borrowernumber, message_name => 'Recall_Waiting' });
215
216
    while ( my ( $transport, $letter_code ) = each %{ $messaging_preferences->{transports} } ) {
217
        if ( $transport eq 'email' ){
218
            C4::Message->enqueue($letter, $recall_borrower->unblessed, 'email');
219
        }
220
        if ( $transport eq 'sms' ){
221
            C4::Message->enqueue($letter, $recall_borrower->unblessed, 'sms');
222
        }
223
    }
224
}
225
189
my $borrower;
226
my $borrower;
190
my $returned = 0;
227
my $returned = 0;
191
my $messages;
228
my $messages;
(-)a/installer/data/mysql/atomicupdate/bug23781-recalls-message-attributes.perl (+7 lines)
Line 0 Link Here
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{INSERT IGNORE INTO message_attributes (message_attribute_id, message_name, takes_days) VALUES (7, 'Recall_Waiting', 0), (8, 'Recall_Requested', 0) });
4
5
    SetVersion( $DBversion );
6
    print "Upgrade to $DBversion done (Bug 23781 - Adding message attributes for recalls)\n";
7
}
(-)a/installer/data/mysql/atomicupdate/bug23781-recalls-message-transports.perl (+7 lines)
Line 0 Link Here
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code, branchcode) VALUES (7, "email", 0, "circulation", "PICKUP_RECALLED_ITEM", null), (7, "sms", 0, "circulation", "PICKUP_RECALLED_ITEM", null), (8, "email", 0, "circulation", "RETURN_RECALLED_ITEM", null), (8, "sms", 0, "circulation", "RETURN_RECALLED_ITEM", null) });
4
5
    SetVersion( $DBversion );
6
    print "Upgrade to $DBversion done (Bug 23781 - Adding message transports for recalls)\n";
7
}
(-)a/installer/data/mysql/atomicupdate/bug23781-recalls-sms-notices.perl (+7 lines)
Line 0 Link Here
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
3
    $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',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall has been placed on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>). The due date has been updated, and is now <<issues.date_due>>. Please return the item before the due date.\n\nThank you!",'sms'), ('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall that you requested on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.branchcode>>. Please pick up your item by <<recalls.expirationdate>>.\n\nThank you!",'sms') });
4
5
    SetVersion( $DBversion );
6
    print "Upgrade to $DBversion done (Bug 23781 - Adding sms notices for recalls)\n";
7
}
(-)a/installer/data/mysql/de-DE/mandatory/sample_notices.sql (-1 / +6 lines)
Lines 317-320 INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, Link Here
317
</table>', 'print', 'default');
317
</table>', 'print', 'default');
318
318
319
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
319
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
320
('circulation', 'SR_SLIP', '', 'Report über Bestandsrotation', 0, 'Report über Bestandsrotation', 'Report über Bestandsrotation für [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] Exemplare wurden für diese Bibliothek bearbeitet.\r\n[% ELSE %]Es wurden keine Exemplare für diese Bibliothek bearbeitet\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Titel: [% item.title %]\r\nVerfasser: [% item.author %]\r\nSignatur: [% item.callnumber %]\r\nStandort: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nAusgeliehen?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nAktuelle Bibliothek: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email');
320
('circulation', 'SR_SLIP', '', 'Report über Bestandsrotation', 0, 'Report über Bestandsrotation', 'Report über Bestandsrotation für [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] Exemplare wurden für diese Bibliothek bearbeitet.\r\n[% ELSE %]Es wurden keine Exemplare für diese Bibliothek bearbeitet\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Titel: [% item.title %]\r\nVerfasser: [% item.author %]\r\nSignatur: [% item.callnumber %]\r\nStandort: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nAusgeliehen?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nAktuelle Bibliothek: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'),
321
('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.title>> - <<biblio.author>> (<<biblio.biblionumber>>).','email'),
322
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item','<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall has been placed on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>). The due date has been updated, and is now <<issues.date_due>>. Please return the item before the due date.\n\nThank you!','email'),
323
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall that you requested on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.branchcode>>. Please pick up your item by <<recalls.expirationdate>>.\n\nThank you!','email'),
324
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item','<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall has been placed on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>). The due date has been updated, and is now <<issues.date_due>>. Please return the item before the due date.\n\nThank you!','sms'),
325
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall that you requested on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.branchcode>>. Please pick up your item by <<recalls.expirationdate>>.\n\nThank you!','sms');
(-)a/installer/data/mysql/en/mandatory/sample_notices.sql (-1 / +6 lines)
Lines 315-318 INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, Link Here
315
</table>', 'print', 'default');
315
</table>', 'print', 'default');
316
316
317
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
317
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
318
('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email');
318
('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'),
319
('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.title>> - <<biblio.author>> (<<biblio.biblionumber>>).','email'),
320
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall has been placed on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>). The due date has been updated, and is now <<issues.date_due>>. Please return the item before the due date.\n\nThank you!",'email'),
321
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall that you requested on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.branchcode>>. Please pick up your item by <<recalls.expirationdate>>.\n\nThank you!",'email'),
322
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall has been placed on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>). The due date has been updated, and is now <<issues.date_due>>. Please return the item before the due date.\n\nThank you!",'sms'),
323
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall that you requested on the following item: <biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.branchcode>>. Please pick up your item by <<recalls.expirationdate>>.\n\nThank you!",'sms');
(-)a/installer/data/mysql/en/mandatory/sample_notices_message_attributes.sql (+10 lines)
Line 0 Link Here
1
insert into `message_attributes`
2
(`message_attribute_id`, message_name, `takes_days`)
3
values
4
(1, 'Item_Due', 0),
5
(2, 'Advance_Notice', 1),
6
(4, 'Hold_Filled', 0),
7
(5, 'Item_Check_in', 0),
8
(6, 'Item_Checkout', 0),
9
(7, 'Recall_Waiting', 0),
10
(8, 'Recall_Requested', 0);
(-)a/installer/data/mysql/en/mandatory/sample_notices_message_transports.sql (+24 lines)
Line 0 Link Here
1
insert into `message_transports`
2
(`message_attribute_id`, `message_transport_type`, `is_digest`, `letter_module`, `letter_code`)
3
values
4
(1, 'email', 0, 'circulation', 'DUE'),
5
(1, 'email', 1, 'circulation', 'DUEDGST'),
6
(1, 'sms',   0, 'circulation', 'DUE'),
7
(1, 'sms',   1, 'circulation', 'DUEDGST'),
8
(2, 'email', 0, 'circulation', 'PREDUE'),
9
(2, 'email', 1, 'circulation', 'PREDUEDGST'),
10
(2, 'sms',   0, 'circulation', 'PREDUE'),
11
(2, 'sms',   1, 'circulation', 'PREDUEDGST'),
12
(2, 'phone', 0, 'circulation', 'PREDUE'),
13
(2, 'phone', 1, 'circulation', 'PREDUEDGST'),
14
(4, 'email', 0, 'reserves',    'HOLD'),
15
(4, 'sms',   0, 'reserves',    'HOLD'),
16
(4, 'phone', 0, 'reserves',    'HOLD'),
17
(5, 'email', 0, 'circulation', 'CHECKIN'),
18
(5, 'sms',   0, 'circulation', 'CHECKIN'),
19
(6, 'email', 0, 'circulation', 'CHECKOUT'),
20
(6, 'sms',   0, 'circulation', 'CHECKOUT'),
21
(7, "email", 0, "circulation", "PICKUP_RECALLED_ITEM"),
22
(7, "sms",   0, "circulation", "PICKUP_RECALLED_ITEM"),
23
(8, "email", 0, "circulation", "RETURN_RECALLED_ITEM"),
24
(8, "sms",   0, "circulation", "RETURN_RECALLED_ITEM");
(-)a/installer/data/mysql/es-ES/mandatory/sample_notices.sql (-1 / +6 lines)
Lines 310-313 INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, Link Here
310
</table>', 'print', 'default');
310
</table>', 'print', 'default');
311
311
312
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
312
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
313
('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email');
313
('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'),
314
('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.title>> - <<biblio.author>> (<<biblio.biblionumber>>).','email'),
315
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall has been placed on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>). The due date has been updated, and is now <<issues.date_due>>. Please return the item before the due date.\n\nThank you!",'email'),
316
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall that you requested on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.branchcode>>. Please pick up your item by <<recalls.expirationdate>>.\n\nThank you!",'email'),
317
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall has been placed on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>). The due date has been updated, and is now <<issues.date_due>>. Please return the item before the due date.\n\nThank you!",'sms'),
318
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall that you requested on the following item: <biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.branchcode>>. Please pick up your item by <<recalls.expirationdate>>.\n\nThank you!",'sms');
(-)a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql (+17 lines)
Lines 75-80 INSERT INTO letter ( module, code, branchcode, name, is_html, title, content, me Link Here
75
', 'print' );
75
', 'print' );
76
76
77
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
77
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
78
('circulation', 'AR_CANCELED', '', 'Article request - canceled', 0, 'Article request canceled', 'Dear <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>),\r\n\r\nYour request for an article from <<biblio.title>> (<<items.barcode>>) has been canceled for the following reason:\r\n\r\n<<article_requests.notes>>\r\n\r\nArticle requested:\r\nTitle: <<article_requests.title>>\r\nAuthor: <<article_requests.author>>\r\nVolume: <<article_requests.volume>>\r\nIssue: <<article_requests.issue>>\r\nDate: <<article_requests.date>>\r\nPages: <<article_requests.pages>>\r\nChapters: <<article_requests.chapters>>\r\nNotes: <<article_requests.patron_notes>>\r\n\r\nYour library', 'email'),
79
('circulation', 'AR_COMPLETED', '', 'Article request - completed', 0, 'Article request completed', 'Dear <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>),\r\n\r\nWe have completed your request for an article from <<biblio.title>> (<<items.barcode>>).\r\n\r\nArticle requested:\r\nTitle: <<article_requests.title>>\r\nAuthor: <<article_requests.author>>\r\nVolume: <<article_requests.volume>>\r\nIssue: <<article_requests.issue>>\r\nDate: <<article_requests.date>>\r\nPages: <<article_requests.pages>>\r\nChapters: <<article_requests.chapters>>\r\nNotes: <<article_requests.patron_notes>>\r\n\r\nYou may pick your article up at <<branches.branchname>>.\r\n\r\nThank you!', 'email'),
80
('circulation', 'AR_PENDING', '', 'Article request - pending', 0, 'Article request received', 'Dear <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>)\r\n\r\nWe have received your request for an article from <<biblio.title>> (<<items.barcode>>).\r\n\r\nArticle requested:\r\nTitle: <<article_requests.title>>\r\nAuthor: <<article_requests.author>>\r\nVolume: <<article_requests.volume>>\r\nIssue: <<article_requests.issue>>\r\nDate: <<article_requests.date>>\r\nPages: <<article_requests.pages>>\r\nChapters: <<article_requests.chapters>>\r\nNotes: <<article_requests.patron_notes>>\r\n\r\n\r\nThank you!', 'email'),
81
('circulation', 'AR_SLIP', '', 'Article request - print slip', 0, 'Article request', 'Article request:\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>),\r\n\r\nTitle: <<biblio.title>>\r\nBarcode: <<items.barcode>>\r\n\r\nArticle requested:\r\nTitle: <<article_requests.title>>\r\nAuthor: <<article_requests.author>>\r\nVolume: <<article_requests.volume>>\r\nIssue: <<article_requests.issue>>\r\nDate: <<article_requests.date>>\r\nPages: <<article_requests.pages>>\r\nChapters: <<article_requests.chapters>>\r\nNotes: <<article_requests.patron_notes>>\r\n', 'print'),
82
('circulation', 'AR_PROCESSING', '', 'Article request - processing', 0, 'Article request processing', 'Dear <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>),\r\n\r\nWe are now processing your request for an article from <<biblio.title>> (<<items.barcode>>).\r\n\r\nArticle requested:\r\nTitle: <<article_requests.title>>\r\nAuthor: <<article_requests.author>>\r\nVolume: <<article_requests.volume>>\r\nIssue: <<article_requests.issue>>\r\nDate: <<article_requests.date>>\r\nPages: <<article_requests.pages>>\r\nChapters: <<article_requests.chapters>>\r\nNotes: <<article_requests.patron_notes>>\r\n\r\nThank you!', 'email'),
83
('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.title>> - <<biblio.author>> (<<biblio.biblionumber>>).','email'),
84
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall has been placed on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>). The due date has been updated, and is now <<issues.date_due>>. Please return the item before the due date.\n\nThank you!",'email'),
85
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall that you requested on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.branchcode>>. Please pick up your item by <<recalls.expirationdate>>.\n\nThank you!",'email'),
86
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall has been placed on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>). The due date has been updated, and is now <<issues.date_due>>. Please return the item before the due date.\n\nThank you!",'sms'),
87
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall that you requested on the following item: <biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.branchcode>>. Please pick up your item by <<recalls.expirationdate>>.\n\nThank you!",'sms');
88
89
INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type)
90
VALUES ('members','PASSWORD_RESET','','Récupération de mot de passe en ligne',1,'Récupération de mot de passe','<html>\r\n<p>Ce courriel vous a été envoyé suite à une demande de récupération de mot de passe pour le compte de <strong><<user>></strong>.\r\n</p>\r\n<p>\r\nVous pouvez créer un nouveau mot de passe en cliquant le lien suivant :\r\n<br/><a href=\"<<passwordreseturl>>\"><<passwordreseturl>></a>\r\n</p>\r\n<p>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..</p>\r\n<p>Merci.</p>\r\n</html>\r\n','email'),
91
('members','MEMBERSHIP_EXPIRY','','Expiration du compte',0,'Expitation prochaine de votre abonnement à la bibliothèque','Bonjour <<borrowers.title>> <<borrowers.firstname>> <<borrowers.surname>>,.\r\n\r\nVotre carte de bibliothèque expirera prochainement, le :\r\n\r\n<<borrowers.dateexpiry>>\r\n\r\nMerci,\r\n\r\nVotre bibliothèque\r\n\r\n<<branches.branchname>>','email');
92
93
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
94
>>>>>>> 38d1138... WR313212: Recalls messaging preferences and SMS notices
78
('circulation', 'AR_CANCELED', '', 'Demande d\'article - annulation', 0, 'Demande d\'article annulée', 'Bonjour <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>),\r\n\r\nVotre demande d\'article de <<biblio.title>> (<<items.barcode>>) a été annulée pour la raison suivante :\r\n\r\n<<article_requests.notes>>\r\n\r\nArticle demandé :\r\nTitre : <<article_requests.title>>\r\nAuteur : <<article_requests.author>>\r\nVolume : <<article_requests.volume>>\r\nNuméro : <<article_requests.issue>>\r\nDate : <<article_requests.date>>\r\nPages : <<article_requests.pages>>\r\nChapitres : <<article_requests.chapters>>\r\nNotes : <<article_requests.patron_notes>>\r\n\r\nVotre bibliothèque.', 'email'),
95
('circulation', 'AR_CANCELED', '', 'Demande d\'article - annulation', 0, 'Demande d\'article annulée', 'Bonjour <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>),\r\n\r\nVotre demande d\'article de <<biblio.title>> (<<items.barcode>>) a été annulée pour la raison suivante :\r\n\r\n<<article_requests.notes>>\r\n\r\nArticle demandé :\r\nTitre : <<article_requests.title>>\r\nAuteur : <<article_requests.author>>\r\nVolume : <<article_requests.volume>>\r\nNuméro : <<article_requests.issue>>\r\nDate : <<article_requests.date>>\r\nPages : <<article_requests.pages>>\r\nChapitres : <<article_requests.chapters>>\r\nNotes : <<article_requests.patron_notes>>\r\n\r\nVotre bibliothèque.', 'email'),
79
('circulation', 'AR_COMPLETED', '', 'Demande d\'article - disponible', 0, 'L\'article demandé est disponible', 'Bonjour <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>),\r\n\r\nL\'article de <<biblio.title>> (<<items.barcode>>) que vous avez demandé est maintenant disponible.\r\n\r\nArticle demandé :\r\nTitre : <<article_requests.title>>\r\nAuteur : <<article_requests.author>>\r\nVolume : <<article_requests.volume>>\r\nNuméro : <<article_requests.issue>>\r\nDate : <<article_requests.date>>\r\nPages : <<article_requests.pages>>\r\nChapitres : <<article_requests.chapters>>\r\nNotes : <<article_requests.patron_notes>>\r\n\r\nVous pouvez venir chercher votre article à <<branches.branchname>>.\r\n\r\nMerci.', 'email'),
96
('circulation', 'AR_COMPLETED', '', 'Demande d\'article - disponible', 0, 'L\'article demandé est disponible', 'Bonjour <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>),\r\n\r\nL\'article de <<biblio.title>> (<<items.barcode>>) que vous avez demandé est maintenant disponible.\r\n\r\nArticle demandé :\r\nTitre : <<article_requests.title>>\r\nAuteur : <<article_requests.author>>\r\nVolume : <<article_requests.volume>>\r\nNuméro : <<article_requests.issue>>\r\nDate : <<article_requests.date>>\r\nPages : <<article_requests.pages>>\r\nChapitres : <<article_requests.chapters>>\r\nNotes : <<article_requests.patron_notes>>\r\n\r\nVous pouvez venir chercher votre article à <<branches.branchname>>.\r\n\r\nMerci.', 'email'),
80
('circulation', 'AR_PENDING', '', 'Demande d\'article - en attente', 0, 'Demande d\'article reçue', 'Bonjour <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>)\r\n\r\nNous avons bien reçu votre demande d\'article de <<biblio.title>> (<<items.barcode>>).\r\n\r\nArticle demandé :\r\nTitre : <<article_requests.title>>\r\nAuteur : <<article_requests.author>>\r\nVolume : <<article_requests.volume>>\r\nNuméro : <<article_requests.issue>>\r\nDate : <<article_requests.date>>\r\nPages : <<article_requests.pages>>\r\nChapitres : <<article_requests.chapters>>\r\nNotes : <<article_requests.patron_notes>>\r\n\r\n\r\nMerci.', 'email'),
97
('circulation', 'AR_PENDING', '', 'Demande d\'article - en attente', 0, 'Demande d\'article reçue', 'Bonjour <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>)\r\n\r\nNous avons bien reçu votre demande d\'article de <<biblio.title>> (<<items.barcode>>).\r\n\r\nArticle demandé :\r\nTitre : <<article_requests.title>>\r\nAuteur : <<article_requests.author>>\r\nVolume : <<article_requests.volume>>\r\nNuméro : <<article_requests.issue>>\r\nDate : <<article_requests.date>>\r\nPages : <<article_requests.pages>>\r\nChapitres : <<article_requests.chapters>>\r\nNotes : <<article_requests.patron_notes>>\r\n\r\n\r\nMerci.', 'email'),
(-)a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql (-1 / +6 lines)
Lines 311-314 INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, Link Here
311
</table>', 'print', 'default');
311
</table>', 'print', 'default');
312
312
313
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
313
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
314
('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email');
314
('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'),
315
('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.title>> - <<biblio.author>> (<<biblio.biblionumber>>).','email'),
316
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall has been placed on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>). The due date has been updated, and is now <<issues.date_due>>. Please return the item before the due date.\n\nThank you!",'email'),
317
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall that you requested on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.branchcode>>. Please pick up your item by <<recalls.expirationdate>>.\n\nThank you!",'email'),
318
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall has been placed on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>). The due date has been updated, and is now <<issues.date_due>>. Please return the item before the due date.\n\nThank you!",'sms'),
319
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall that you requested on the following item: <biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.branchcode>>. Please pick up your item by <<recalls.expirationdate>>.\n\nThank you!",'sms');
(-)a/installer/data/mysql/it-IT/necessari/notices.sql (-1 / +6 lines)
Lines 313-316 INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, Link Here
313
</table>', 'print', 'default');
313
</table>', 'print', 'default');
314
314
315
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
315
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
316
('circulation', 'SR_SLIP', '', 'Stock Rotation Slip', 0, 'Stockrotation Report', 'Stockrotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent Library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email');
316
('circulation', 'SR_SLIP', '', 'Stock Rotation Slip', 0, 'Stockrotation Report', 'Stockrotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent Library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'),
317
('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.title>> - <<biblio.author>> (<<biblio.biblionumber>>).','email'),
318
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall has been placed on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>). The due date has been updated, and is now <<issues.date_due>>. Please return the item before the due date.\n\nThank you!",'email'),
319
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall that you requested on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.branchcode>>. Please pick up your item by <<recalls.expirationdate>>.\n\nThank you!",'email'),
320
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall has been placed on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>). The due date has been updated, and is now <<issues.date_due>>. Please return the item before the due date.\n\nThank you!",'sms'),
321
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall that you requested on the following item: <biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.branchcode>>. Please pick up your item by <<recalls.expirationdate>>.\n\nThank you!",'sms');
(-)a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql (-1 / +6 lines)
Lines 330-333 INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, Link Here
330
</table>', 'print', 'default');
330
</table>', 'print', 'default');
331
331
332
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
332
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
333
('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email');
333
('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'),
334
('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.title>> - <<biblio.author>> (<<biblio.biblionumber>>).','email'),
335
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall has been placed on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>). The due date has been updated, and is now <<issues.date_due>>. Please return the item before the due date.\n\nThank you!",'email'),
336
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall that you requested on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.branchcode>>. Please pick up your item by <<recalls.expirationdate>>.\n\nThank you!",'email'),
337
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall has been placed on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>). The due date has been updated, and is now <<issues.date_due>>. Please return the item before the due date.\n\nThank you!",'sms'),
338
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall that you requested on the following item: <biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.branchcode>>. Please pick up your item by <<recalls.expirationdate>>.\n\nThank you!",'sms');
(-)a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql (-1 / +6 lines)
Lines 308-311 INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, Link Here
308
</table>', 'print', 'default');
308
</table>', 'print', 'default');
309
309
310
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
310
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
311
('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email');
311
('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'),
312
('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.title>> - <<biblio.author>> (<<biblio.biblionumber>>).','email'),
313
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall has been placed on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>). The due date has been updated, and is now <<issues.date_due>>. Please return the item before the due date.\n\nThank you!",'email'),
314
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall that you requested on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.branchcode>>. Please pick up your item by <<recalls.expirationdate>>.\n\nThank you!",'email'),
315
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall has been placed on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>). The due date has been updated, and is now <<issues.date_due>>. Please return t    he item before the due date.\n\nThank you!",'sms'),
316
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall that you requested on the following item: <biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.branchcode>>. Please pick up your item by <<recal    ls.expirationdate>>.\n\nThank you!",'sms');
(-)a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql (-1 / +6 lines)
Lines 310-313 INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, Link Here
310
</table>', 'print', 'default');
310
</table>', 'print', 'default');
311
311
312
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
312
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
313
('circulation', 'SR_SLIP', '', 'Stock Rotation Slip', 0, 'Stockrotation Report', 'Stockrotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email');
313
('circulation', 'SR_SLIP', '', 'Stock Rotation Slip', 0, 'Stockrotation Report', 'Stockrotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'),
314
('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.title>> - <<biblio.author>> (<<biblio.biblionumber>>).','email'),
315
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall has been placed on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>). The due date has been updated, and is now <<issues.date_due>>. Please return the item before the due date.\n\nThank you!",'email'),
316
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall that you requested on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.branchcode>>. Please pick up your item by <<recalls.expirationdate>>.\n\nThank you!",'email'),
317
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall has been placed on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>). The due date has been updated, and is now <<issues.date_due>>. Please return the item before the due date.\n\nThank you!",'sms'),
318
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall that you requested on the following item: <biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.branchcode>>. Please pick up your item by <<recalls.expirationdate>>.\n\nThank you!",'sms');
(-)a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql (-1 / +6 lines)
Lines 399-402 INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, Link Here
399
</table>', 'print', 'default');
399
</table>', 'print', 'default');
400
400
401
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
401
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
402
('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email');
402
('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'),
403
('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.title>> - <<biblio.author>> (<<biblio.biblionumber>>).','email'),
404
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall has been placed on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>). The due date has been updated, and is now <<issues.date_due>>. Please return the item before the due date.\n\nThank you!",'email'),
405
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall that you requested on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.branchcode>>. Please pick up your item by <<recalls.expirationdate>>.\n\nThank you!",'email'),
406
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall has been placed on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>). The due date has been updated, and is now <<issues.date_due>>. Please return the item before the due date.\n\nThank you!",'sms'),
407
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA recall that you requested on the following item: <biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.branchcode>>. Please pick up your item by <<recalls.expirationdate>>.\n\nThank you!",'sms');
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc (+2 lines)
Lines 20-25 Link Here
20
          [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold filled
20
          [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold filled
21
          [% ELSIF ( messaging_preference.Item_Check_in ) %]Item check-in
21
          [% ELSIF ( messaging_preference.Item_Check_in ) %]Item check-in
22
          [% ELSIF ( messaging_preference.Item_Checkout ) %]Item checkout
22
          [% ELSIF ( messaging_preference.Item_Checkout ) %]Item checkout
23
          [% ELSIF ( messaging_preference.Recall_Waiting ) %]Recall awaiting pickup
24
          [% ELSIF ( messaging_preference.Recall_Requested ) %]Return recalled item
23
          [% ELSE %]Unknown [% END %]</td>
25
          [% ELSE %]Unknown [% END %]</td>
24
      [% IF ( messaging_preference.takes_days ) %]
26
      [% IF ( messaging_preference.takes_days ) %]
25
      <td>
27
      <td>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt (+2 lines)
Lines 51-56 Link Here
51
                                              [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold filled
51
                                              [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold filled
52
                                              [% ELSIF ( messaging_preference.Item_Check_in ) %]Item check-in
52
                                              [% ELSIF ( messaging_preference.Item_Check_in ) %]Item check-in
53
                                              [% ELSIF ( messaging_preference.Item_Checkout ) %]Item checkout
53
                                              [% ELSIF ( messaging_preference.Item_Checkout ) %]Item checkout
54
                                              [% ELSIF ( messaging_preference.Recall_Requested ) %]Return recalled item
55
                                              [% ELSIF ( messaging_preference.Recall_Waiting ) %]Recall awaiting pickup
54
                                              [% ELSE %]Unknown [% END %]</td>
56
                                              [% ELSE %]Unknown [% END %]</td>
55
                                        [% IF ( messaging_preference.takes_days ) %]
57
                                        [% IF ( messaging_preference.takes_days ) %]
56
                                            <td><select class="input-mini" name="[% messaging_preference.message_attribute_id | html %]-DAYS">
58
                                            <td><select class="input-mini" name="[% messaging_preference.message_attribute_id | html %]-DAYS">
(-)a/opac/opac-recall.pl (-1 / +136 lines)
Line 0 Link Here
0
- 
1
#!/usr/bin/perl
2
3
# This file is part of Koha.
4
#
5
# Copyright 2017 Aleisha Amohia <aleisha@catalyst.net.nz>
6
#
7
# Koha is free software; you can redistribute it and/or modify it
8
# under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3 of the License, or
10
# (at your option) any later version.
11
#
12
# Koha is distributed in the hope that it will be useful, but
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
22
use DateTime;
23
use C4::Auth;
24
use C4::Output;
25
use C4::Context;
26
use C4::Letters;
27
use Koha::Items;
28
use Koha::Recall;
29
use Koha::Recalls;
30
use Koha::DateUtils;
31
use Koha::IssuingRules;
32
use Koha::Patrons;
33
34
my $query = new CGI;
35
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
36
    {
37
        template_name   => "opac-recall.tt",
38
        query           => $query,
39
        type            => "opac",
40
        authnotrequired => 0,
41
    }
42
);
43
44
my $op = $query->param('op') || '';
45
46
my $itemnumber = $query->param('itemnumber');
47
my $item = Koha::Items->find($itemnumber);
48
my $biblio = Koha::Biblios->find($item->biblionumber);
49
my $patron = Koha::Patrons->find($borrowernumber);
50
my $recalled = Koha::Recalls->find({ itemnumber => $itemnumber });
51
my $error;
52
53
if ( defined $recalled && $recalled->borrowernumber == $borrowernumber && ($recalled->is_requested || $recalled->is_waiting || $recalled->is_overdue) ){
54
    # can't place a recall on an item that this borrower has already recalled
55
    # if recall is expired or cancelled, user may recall again
56
    $error = 'duplicate';
57
}
58
59
if ($op eq 'request'){
60
    if (!defined $borrowernumber){
61
    # can't place recall if not logged in
62
        $error = 'notloggedin';
63
        print $query->redirect('/cgi-bin/koha/opac-detail.pl?biblionumber='.$item->biblionumber);
64
    } elsif ( !defined $error ){
65
        # can recall
66
        my $borrower = Koha::Patrons->find($borrowernumber);
67
        my $issuing_rule = Koha::IssuingRules->get_effective_issuing_rule({ categorycode => $borrower->categorycode, itemtype => $item->itype, branchcode => $item->holdingbranch });
68
        my $recall_request = Koha::Recall->new({
69
            borrowernumber => $borrowernumber,
70
            recalldate => dt_from_string(),
71
            biblionumber => $biblio->biblionumber,
72
            branchcode => $item->holdingbranch,
73
            status => 'R',
74
            itemnumber => $itemnumber,
75
            itemtype => $item->itype,
76
        })->store;
77
        if (defined $recall_request->recall_id){ # successful recall
78
            my $recall = Koha::Recalls->find($recall_request->recall_id);
79
            # updating due date on checkout
80
            my $timestamp = dt_from_string($recall->timestamp);
81
            my $due_date;
82
            if ( $issuing_rule->recall_due_date_interval eq '' ) {
83
                $due_date = $timestamp->add( $issuing_rule->lengthunit => 0 );
84
            } else {
85
                $due_date = $timestamp->add( $issuing_rule->lengthunit => $issuing_rule->recall_due_date_interval );
86
            }
87
            my $checkout = Koha::Checkouts->find({ itemnumber => $itemnumber })->update({ date_due => $due_date });
88
            my $checkout_borrower = Koha::Patrons->find($checkout->borrowernumber->borrowernumber);
89
90
            # send notice to user with recalled item checked out
91
            my $letter = C4::Letters::GetPreparedLetter (
92
                module => 'circulation',
93
                letter_code => 'RETURN_RECALLED_ITEM',
94
                branchcode => $recall->branchcode,
95
                tables => {
96
                    'biblio', $biblio->biblionumber,
97
                    'borrowers', $checkout_borrower->borrowernumber,
98
                    'items', $itemnumber,
99
                    'issues', $itemnumber,
100
                },
101
            );
102
103
            my $messaging_preferences = C4::Members::Messaging::GetMessagingPreferences({ borrowernumber => $checkout_borrower->borrowernumber, message_name => 'Recall_Requested' });
104
105
            while ( my ( $transport, $letter_code ) = each %{ $messaging_preferences->{transports} } ) {
106
                if ( $transport eq 'email' ){
107
                    C4::Message->enqueue($letter, $checkout_borrower->unblessed, 'email');
108
                }
109
                if ( $transport eq 'sms' ){
110
                    C4::Message->enqueue($letter, $checkout_borrower->unblessed, 'sms');
111
                }
112
            }
113
114
            $template->param(
115
                success => 1,
116
                due_interval => $issuing_rule->recall_due_date_interval,
117
                due_unit => $issuing_rule->lengthunit,
118
                due_date => $checkout->date_due
119
            );
120
        } else {
121
            $error = 'failed';
122
        }
123
    }
124
} elsif ($op eq 'cancel'){
125
    my $recall_id = $query->param('recall_id');
126
    Koha::Recalls->find($recall_id)->update({ cancellationdate => dt_from_string(), status => 'C', old => 1 });
127
    print $query->redirect('/cgi-bin/koha/opac-user.pl');
128
}
129
130
$template->param(
131
    biblio => $biblio,
132
    itemnumber => $itemnumber,
133
    error => $error
134
);
135
136
output_with_http_headers $query, $cookie, $template->output, 'html';

Return to bug 23781