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

(-)a/Koha/Recall.pm (-1 / +8 lines)
Lines 363-369 sub set_waiting { Link Here
363
        },
363
        },
364
    );
364
    );
365
365
366
    C4::Message->enqueue($letter, $self->patron->unblessed, 'email');
366
    my $messaging_preferences = C4::Members::Messaging::GetMessagingPreferences({ borrowernumber => $self->borrowernumber, message_name => 'Recall_Waiting' });
367
    while ( my ( $transport, $letter_code ) = each %{ $messaging_preferences->{transports} } ) {        if ( $transport eq 'email' ){
368
            C4::Message->enqueue($letter, $self->patron->unblessed, 'email');
369
        }
370
        if ( $transport eq 'sms' ){
371
            C4::Message->enqueue($letter, $self->patron->unblessed, 'sms');
372
        }
373
    }
367
374
368
    return $self;
375
    return $self;
369
}
376
}
(-)a/Koha/Recalls.pm (-1 / +10 lines)
Lines 117-123 sub add_recall { Link Here
117
            },
117
            },
118
        );
118
        );
119
119
120
        C4::Message->enqueue( $letter, $checkout->patron->unblessed, 'email' );
120
        my $messaging_preferences = C4::Members::Messaging::GetMessagingPreferences({ borrowernumber => $checkout->borrowernumber, message_name => 'Recall_Requested' });
121
122
        while ( my ( $transport, $letter_code ) = each %{ $messaging_preferences->{transports} } ) {
123
            if ( $transport eq 'email' ){
124
                C4::Message->enqueue($letter, $checkout->patron->unblessed, 'email');
125
            }
126
            if ( $transport eq 'sms' ){
127
                C4::Message->enqueue($letter, $checkout->patron->unblessed, 'sms');
128
            }
129
        }
121
130
122
        $item = Koha::Items->find( $itemnumber );
131
        $item = Koha::Items->find( $itemnumber );
123
        # add to statistics table
132
        # add to statistics table
(-)a/installer/data/mysql/atomicupdate/bug_23781-recalls_message_attributes.perl (+6 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
    NewVersion( $DBversion, 23781, "Adding message attributes for recalls: Recall_Waiting, Recall_Requested" );
6
}
(-)a/installer/data/mysql/atomicupdate/bug_23781-recalls_message_transports.perl (+6 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
    NewVersion( $DBversion, 23781, "Adding message transports for recalls notices" );
6
}
(-)a/installer/data/mysql/atomicupdate/bug_23781-recalls_sms_notices.perl (+22 lines)
Line 0 Link Here
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{
4
        INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
5
        ('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item','Date: <<today>>
6
7
<<borrowers.firstname>> <<borrowers.surname>>,
8
9
A 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.
10
11
Thank you!','sms'),
12
        ('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','Date: <<today>>
13
14
<<borrowers.firstname>> <<borrowers.surname>>,
15
16
A 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>>.
17
18
Thank you!','sms')
19
    });
20
21
    NewVersion( $DBversion, 19532, "Add recalls SMS notices: RETURN_RECALLED_ITEM, PICKUP_RECALLED_ITEM" );
22
}
(-)a/installer/data/mysql/de-DE/mandatory/sample_notices.sql (-1 / +15 lines)
Lines 233-239 ITEM RECALLED Link Here
233
Barcode: <<items.barcode>>
233
Barcode: <<items.barcode>>
234
Callnumber: <<items.itemcallnumber>>
234
Callnumber: <<items.itemcallnumber>>
235
Waiting since: <<recalls.waitingdate>>
235
Waiting since: <<recalls.waitingdate>>
236
Notes: <<recalls.recallnotes>>', 'print');
236
Notes: <<recalls.recallnotes>>', 'print')
237
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item','Date: <<today>>
238
239
<<borrowers.firstname>> <<borrowers.surname>>,
240
241
A 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.
242
243
Thank you!','sms'),
244
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','Date: <<today>>
245
246
<<borrowers.firstname>> <<borrowers.surname>>,
247
248
A 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>>.
249
250
Thank you!','sms');
237
251
238
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES
252
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES
239
('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'),
253
('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'),
(-)a/installer/data/mysql/en/mandatory/sample_notices.yml (+34 lines)
Lines 1266-1268 tables: Link Here
1266
            - "Callnumber: <<items.itemcallnumber>>"
1266
            - "Callnumber: <<items.itemcallnumber>>"
1267
            - "Waiting since: <<recalls.waitingdate>>"
1267
            - "Waiting since: <<recalls.waitingdate>>"
1268
            - "Notes: <<recalls.recallnotes>>"
1268
            - "Notes: <<recalls.recallnotes>>"
1269
1270
        - module: circulation
1271
          code: RETURN_RECALLED_ITEM
1272
          branchcode: ""
1273
          name: "Notification to return a recalled item"
1274
          is_html: 0
1275
          title: "Notification to return a recalled item"
1276
          message_transport_type: sms
1277
          lang: default
1278
          content:
1279
            - "Date: <<today>>"
1280
            - ""
1281
            - "<<borrowers.firstname>> <<borrowers.surname>>,"
1282
            - ""
1283
            - "A 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."
1284
            - ""
1285
            - "Thank you!"
1286
1287
        - module: circulation
1288
          code: PICKUP_RECALLED_ITEM
1289
          branchcode: ""
1290
          name: "Recalled item awaiting pickup"
1291
          is_html: 0
1292
          title: "Recalled item awaiting pickup"
1293
          message_transport_type: sms
1294
          lang: default
1295
          content:
1296
            - "Date: <<today>>"
1297
            - ""
1298
            - "<<borrowers.firstname>> <<borrowers.surname>>,"
1299
            - ""
1300
            - "A 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>>."
1301
            - ""
1302
            - "Thank you!"
(-)a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql (-1 / +15 lines)
Lines 112-118 ITEM RECALLED Link Here
112
Barcode: <<items.barcode>>
112
Barcode: <<items.barcode>>
113
Callnumber: <<items.itemcallnumber>>
113
Callnumber: <<items.itemcallnumber>>
114
Waiting since: <<recalls.waitingdate>>
114
Waiting since: <<recalls.waitingdate>>
115
Notes: <<recalls.recallnotes>>', 'print');
115
Notes: <<recalls.recallnotes>>', 'print'),
116
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item','Date: <<today>>
117
118
<<borrowers.firstname>> <<borrowers.surname>>,
119
120
A 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.
121
122
Thank you!','sms'),
123
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','Date: <<today>>
124
125
<<borrowers.firstname>> <<borrowers.surname>>,
126
127
A 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>>.
128
129
Thank you!','sms');
116
130
117
INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type)
131
INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type)
118
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'),
132
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'),
(-)a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql (-1 / +15 lines)
Lines 227-233 ITEM RECALLED Link Here
227
Barcode: <<items.barcode>>
227
Barcode: <<items.barcode>>
228
Callnumber: <<items.itemcallnumber>>
228
Callnumber: <<items.itemcallnumber>>
229
Waiting since: <<recalls.waitingdate>>
229
Waiting since: <<recalls.waitingdate>>
230
Notes: <<recalls.recallnotes>>', 'print');
230
Notes: <<recalls.recallnotes>>', 'print'),
231
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item','Date: <<today>>
232
233
<<borrowers.firstname>> <<borrowers.surname>>,
234
235
A 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.
236
237
Thank you!','sms'),
238
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','Date: <<today>>
239
240
<<borrowers.firstname>> <<borrowers.surname>>,
241
242
A 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>>.
243
244
Thank you!','sms');
231
245
232
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES
246
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES
233
('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'),
247
('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'),
(-)a/installer/data/mysql/it-IT/necessari/notices.sql (-1 / +15 lines)
Lines 229-235 ITEM RECALLED Link Here
229
Barcode: <<items.barcode>>
229
Barcode: <<items.barcode>>
230
Callnumber: <<items.itemcallnumber>>
230
Callnumber: <<items.itemcallnumber>>
231
Waiting since: <<recalls.waitingdate>>
231
Waiting since: <<recalls.waitingdate>>
232
Notes: <<recalls.recallnotes>>', 'print');
232
Notes: <<recalls.recallnotes>>', 'print'),
233
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item','Date: <<today>>
234
235
<<borrowers.firstname>> <<borrowers.surname>>,
236
237
A 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.
238
239
Thank you!','sms'),
240
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','Date: <<today>>
241
242
<<borrowers.firstname>> <<borrowers.surname>>,
243
244
A 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>>.
245
246
Thank you!','sms');
233
247
234
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES
248
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES
235
('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'),
249
('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'),
(-)a/installer/data/mysql/mandatory/sample_notices_message_attributes.sql (-2 / +3 lines)
Lines 5-9 values Link Here
5
(2, 'Advance_Notice', 1),
5
(2, 'Advance_Notice', 1),
6
(4, 'Hold_Filled', 0),
6
(4, 'Hold_Filled', 0),
7
(5, 'Item_Check_in', 0),
7
(5, 'Item_Check_in', 0),
8
(6, 'Item_Checkout', 0);
8
(6, 'Item_Checkout', 0),
9
9
(7, 'Recall_Waiting', 0),
10
(8, 'Recall_Requested', 0);
(-)a/installer/data/mysql/mandatory/sample_notices_message_transports.sql (-1 / +5 lines)
Lines 17-20 values Link Here
17
(5, 'email', 0, 'circulation', 'CHECKIN'),
17
(5, 'email', 0, 'circulation', 'CHECKIN'),
18
(5, 'sms',   0, 'circulation', 'CHECKIN'),
18
(5, 'sms',   0, 'circulation', 'CHECKIN'),
19
(6, 'email', 0, 'circulation', 'CHECKOUT'),
19
(6, 'email', 0, 'circulation', 'CHECKOUT'),
20
(6, 'sms',   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/nb-NO/1-Obligatorisk/sample_notices.sql (-1 / +15 lines)
Lines 246-252 ITEM RECALLED Link Here
246
Barcode: <<items.barcode>>
246
Barcode: <<items.barcode>>
247
Callnumber: <<items.itemcallnumber>>
247
Callnumber: <<items.itemcallnumber>>
248
Waiting since: <<recalls.waitingdate>>
248
Waiting since: <<recalls.waitingdate>>
249
Notes: <<recalls.recallnotes>>', 'print');
249
Notes: <<recalls.recallnotes>>', 'print'),
250
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item','Date: <<today>>
251
252
<<borrowers.firstname>> <<borrowers.surname>>,
253
254
A 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.
255
256
Thank you!','sms'),
257
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','Date: <<today>>
258
259
<<borrowers.firstname>> <<borrowers.surname>>,
260
261
A 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>>.
262
263
Thank you!','sms');
250
264
251
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES
265
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES
252
('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'),
266
('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'),
(-)a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql (-1 / +15 lines)
Lines 224-230 ITEM RECALLED Link Here
224
Barcode: <<items.barcode>>
224
Barcode: <<items.barcode>>
225
Callnumber: <<items.itemcallnumber>>
225
Callnumber: <<items.itemcallnumber>>
226
Waiting since: <<recalls.waitingdate>>
226
Waiting since: <<recalls.waitingdate>>
227
Notes: <<recalls.recallnotes>>', 'print');
227
Notes: <<recalls.recallnotes>>', 'print'),
228
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item','Date: <<today>>
229
230
<<borrowers.firstname>> <<borrowers.surname>>,
231
232
A 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.
233
234
Thank you!','sms'),
235
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','Date: <<today>>
236
237
<<borrowers.firstname>> <<borrowers.surname>>,
238
239
A 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>>.
240
241
Thank you!','sms');
228
242
229
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES
243
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES
230
('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'),
244
('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'),
(-)a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql (-1 / +15 lines)
Lines 226-232 ITEM RECALLED Link Here
226
Barcode: <<items.barcode>>
226
Barcode: <<items.barcode>>
227
Callnumber: <<items.itemcallnumber>>
227
Callnumber: <<items.itemcallnumber>>
228
Waiting since: <<recalls.waitingdate>>
228
Waiting since: <<recalls.waitingdate>>
229
Notes: <<recalls.recallnotes>>', 'print');
229
Notes: <<recalls.recallnotes>>', 'print'),
230
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item','Date: <<today>>
231
232
<<borrowers.firstname>> <<borrowers.surname>>,
233
234
A 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.
235
236
Thank you!','sms'),
237
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','Date: <<today>>
238
239
<<borrowers.firstname>> <<borrowers.surname>>,
240
241
A 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>>.
242
243
Thank you!','sms');
230
244
231
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES
245
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES
232
('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'),
246
('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'),
(-)a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql (-1 / +17 lines)
Lines 320-326 ITEM RECALLED Link Here
320
Barcode: <<items.barcode>>
320
Barcode: <<items.barcode>>
321
Callnumber: <<items.itemcallnumber>>
321
Callnumber: <<items.itemcallnumber>>
322
Waiting since: <<recalls.waitingdate>>
322
Waiting since: <<recalls.waitingdate>>
323
Notes: <<recalls.recallnotes>>', 'print')
323
Notes: <<recalls.recallnotes>>', 'print'),
324
325
('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item','Date: <<today>>
326
327
<<borrowers.firstname>> <<borrowers.surname>>,
328
329
A 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.
330
331
Thank you!','sms'),
332
333
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','Date: <<today>>
334
335
<<borrowers.firstname>> <<borrowers.surname>>,
336
337
A 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>>.
338
339
Thank you!','sms')
324
;
340
;
325
341
326
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES
342
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES
(-)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 52-57 Link Here
52
                                              [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold filled
52
                                              [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold filled
53
                                              [% ELSIF ( messaging_preference.Item_Check_in ) %]Item check-in
53
                                              [% ELSIF ( messaging_preference.Item_Check_in ) %]Item check-in
54
                                              [% ELSIF ( messaging_preference.Item_Checkout ) %]Item checkout
54
                                              [% ELSIF ( messaging_preference.Item_Checkout ) %]Item checkout
55
                                              [% ELSIF ( messaging_preference.Recall_Waiting ) %]Recall awaiting pickup
56
                                              [% ELSIF ( messaging_preference.Recall_Requested ) %]Return recalled item
55
                                              [% ELSE %]Unknown [% END %]</td>
57
                                              [% ELSE %]Unknown [% END %]</td>
56
                                        [% IF ( messaging_preference.takes_days ) %]
58
                                        [% IF ( messaging_preference.takes_days ) %]
57
                                            <td><select class="input-mini" name="[% messaging_preference.message_attribute_id | html %]-DAYS">
59
                                            <td><select class="input-mini" name="[% messaging_preference.message_attribute_id | html %]-DAYS">
(-)a/t/db_dependent/Koha/Recall.t (+6 lines)
Lines 126-131 $expected_expirationdate = dt_from_string->add({ days => 3 }); Link Here
126
$expirationdate = $recall2->calc_expirationdate;
126
$expirationdate = $recall2->calc_expirationdate;
127
is( $expirationdate, $expected_expirationdate, "Expiration date calculated based on circulation rules" );
127
is( $expirationdate, $expected_expirationdate, "Expiration date calculated based on circulation rules" );
128
128
129
C4::Members::Messaging::SetMessagingPreference({
130
    borrowernumber => $patron1->borrowernumber,
131
    message_attribute_id => 7, # Recall_Waiting
132
    message_transport_types => [ qw( email sms ) ],
133
});
134
129
$recall2->set_waiting({ expirationdate => $expirationdate });
135
$recall2->set_waiting({ expirationdate => $expirationdate });
130
is( $recall2->waiting, 1, "Recall is waiting" );
136
is( $recall2->waiting, 1, "Recall is waiting" );
131
137
(-)a/t/db_dependent/Koha/Recalls.t (-2 / +7 lines)
Lines 67-72 Koha::CirculationRules->set_rules({ Link Here
67
C4::Circulation::AddIssue( $patron3->unblessed, $item1->barcode );
67
C4::Circulation::AddIssue( $patron3->unblessed, $item1->barcode );
68
C4::Circulation::AddIssue( $patron3->unblessed, $item2->barcode );
68
C4::Circulation::AddIssue( $patron3->unblessed, $item2->barcode );
69
69
70
C4::Members::Messaging::SetMessagingPreference({
71
    borrowernumber => $patron3->borrowernumber,
72
    message_attribute_id => 8, # Recall_Requested
73
    message_transport_types => [ qw( email sms ) ],
74
});
75
70
my ( $recall, $due_interval, $due_date ) = Koha::Recalls->add_recall({
76
my ( $recall, $due_interval, $due_date ) = Koha::Recalls->add_recall({
71
    patron => undef,
77
    patron => undef,
72
    biblio => $biblio1,
78
    biblio => $biblio1,
Lines 140-146 is( dt_from_string( $recall->checkout->date_due ), $expected_due_date, "Checkout Link Here
140
is( $due_date, $expected_due_date, "Due date correctly returned" );
146
is( $due_date, $expected_due_date, "Due date correctly returned" );
141
147
142
my $messages_count = Koha::Notice::Messages->search({ borrowernumber => $patron3->borrowernumber, letter_code => 'RETURN_RECALLED_ITEM' })->count;
148
my $messages_count = Koha::Notice::Messages->search({ borrowernumber => $patron3->borrowernumber, letter_code => 'RETURN_RECALLED_ITEM' })->count;
143
is( $messages_count, 3, "RETURN_RECALLED_ITEM notice successfully sent to checkout borrower" );
149
is( $messages_count, 6, "RETURN_RECALLED_ITEM notice successfully sent to checkout borrower" );
144
150
145
my $message = Koha::Recalls->move_recall;
151
my $message = Koha::Recalls->move_recall;
146
is( $message, 'no recall_id provided', "Can't move a recall without specifying which recall" );
152
is( $message, 'no recall_id provided', "Can't move a recall without specifying which recall" );
147
- 

Return to bug 23781