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

(-)a/C4/Letters.pm (+1 lines)
Lines 40-45 use Koha::Notice::Messages; Link Here
40
use Koha::DateUtils qw( format_sqldatetime dt_from_string );
40
use Koha::DateUtils qw( format_sqldatetime dt_from_string );
41
use Koha::Patrons;
41
use Koha::Patrons;
42
use Koha::Subscriptions;
42
use Koha::Subscriptions;
43
use Data::Dumper;
43
44
44
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
45
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
45
46
(-)a/circ/recall-pickup-slip.pl (+89 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
4
# Copyright 2018 Catalyst IT
5
#
6
# This file is part of Koha.
7
#
8
# Koha is free software; you can redistribute it and/or modify it
9
# under the terms of the GNU General Public License as published by
10
# the Free Software Foundation; either version 3 of the License, or
11
# (at your option) any later version.
12
#
13
# Koha is distributed in the hope that it will be useful, but
14
# WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
# GNU General Public License for more details.
17
#
18
# You should have received a copy of the GNU General Public License
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
21
use Modern::Perl;
22
use C4::Context;
23
use C4::Output;
24
use CGI qw ( -utf8 );
25
use C4::Auth qw/:DEFAULT get_session/;
26
use Koha::Recall;
27
use Koha::Recalls;
28
use C4::Letters;
29
use C4::Message;
30
use Data::Dumper;
31
use Koha::Patrons;
32
use Koha::Items;
33
use Koha::Biblios;
34
use Koha::Libraries;
35
use vars qw($debug);
36
37
BEGIN {
38
    $debug = $ENV{DEBUG} || 0;
39
}
40
41
my $input = new CGI;
42
my $sessionID = $input->cookie("CGISESSID");
43
my $session = get_session($sessionID);
44
45
my $borrowernumber = $input->param('borrowernumber');
46
my $biblionumber = $input->param('biblionumber');
47
my $itemnumber = $input->param('itemnumber');
48
my $recallid = $input->param('recall_id');
49
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
50
    {
51
        template_name   => "circ/recall-pickup-slip.tt",
52
        query           => $input,
53
        type            => "intranet",
54
        authnotrequired => 0,
55
        flagsrequired   => { circulate => "circulate_remaining_permissions" },
56
        debug           => $debug,
57
    }
58
);
59
60
my $recall = Koha::Recalls->find($recallid);
61
my $patron = Koha::Patrons->find($borrowernumber);
62
my $item = Koha::Items->find($recall->itemnumber);
63
my $biblio = Koha::Biblios->find($item->biblionumber);
64
my $library = Koha::Libraries->find($recall->branchcode);
65
66
#Print slip to inform library staff of details of recall requester, so the item can be put aside for requester
67
my ($slip, $is_html);
68
my $letter = C4::Letters::GetPreparedLetter (
69
    module => 'circulation',
70
    letter_code => 'RECALL_REQUESTER_DET',
71
    tables => {
72
         'branches' => $library->branchcode,
73
         'borrowers' => $patron->borrowernumber,
74
         'biblio'   => $biblio->biblionumber,
75
         'items'   => $item->itemnumber,
76
         'recalls'  => $recall->recall_id
77
    }
78
);
79
80
if ($letter) {
81
    $slip = $letter->{content};
82
    $is_html = $letter->{is_html};
83
}
84
85
$template->param( slip => $slip ) if ($slip);
86
$template->param( plain => !$is_html );
87
88
output_html_with_http_headers $input, $cookie, $template->output;
89
(-)a/circ/returns.pl (+10 lines)
Lines 89-94 if ( $query->param('print_slip') ) { Link Here
89
    );
89
    );
90
}
90
}
91
91
92
if ( $query->param('print_recall_slip') ) {
93
    $template->param(
94
        print_recall_slip     => 1,
95
        borrowernumber => scalar $query->param('borrowernumber'),
96
        biblionumber   => scalar $query->param('biblionumber'),
97
        itemnumber     => scalar $query->param('itemnumber'),
98
        recall_id      => scalar $query->param('recall_id')
99
    );
100
}
101
92
#####################
102
#####################
93
#Global vars
103
#Global vars
94
my $printers = GetPrinters();
104
my $printers = GetPrinters();
(-)a/installer/data/mysql/atomicupdate/bug_19532_recall_requester_details_notice.sql (+2 lines)
Line 0 Link Here
1
insert into letter (module, code, name, is_html, title, content, message_transport_type, lang) values ('circulation', 'RECALL_REQUESTER_DET', 'Details of patron who recalled item', 0, 'Details of patorn who recalled item',  '<h5>Date: <<today>></h5><h3> Recall for pickup at <<branches.branchname>></h3><h3><<borrowers.surname>>, <<borrowers.firstname>></h3><ul><li><<borrowers.cardnumber>></li><li><<borrowers.phone>></li><li><<borrowers.address>><br /><<borrowers.address2>><br /><<borrowers.city >><<borrowers.zipcode>></li><li><<borrowers.email>></li></ul><br /><h3>ITEM RECALLED</h3><h4><<biblio.title>></h4><h5><<biblio.author>></h5><ul><li><<items.barcode>></li><li><<items.itemcallnumber>></li><li><<recalls.waitingdate>></li></ul><p>Notes:<pre><<recalls.recallnotes>></pre></p>', 'email', default);
2
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recall-pickup-slip.tt (+26 lines)
Line 0 Link Here
1
[% USE Asset %]
2
[% USE Koha %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Koha &rsaquo; Circulation &rsaquo; Recall print receipt</title>
5
[% INCLUDE 'doc-head-close.inc' %]
6
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
<link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% interface %]/[% theme %]/img/favicon.ico[% END %]" type="image/x-icon" />
8
[% Asset.css("css/print.css") %]
9
[% IF ( Koha.Preference('SlipCSS') ) %]
10
<link rel="stylesheet" type="text/css" href="[% Koha.Preference('SlipCSS') %]" />
11
[% END %]
12
13
[% INCLUDE 'slip-print.inc' #printThenClose %]
14
</head>
15
<body id="circ_printslip" class="circ">
16
<div id="receipt">
17
18
[% IF plain %]
19
<pre>
20
[% IF ( slip ) %][% slip %][% ELSE %]No slip template found[% END %]
21
</pre>
22
[% ELSE %]
23
[% IF ( slip ) %][% slip %][% ELSE %]No slip template found[% END %]
24
[% END %]
25
26
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-2 / +11 lines)
Lines 506-511 Link Here
506
                    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
506
                    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
507
                    <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
507
                    <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
508
                    <input type="hidden" name="recall_id" value="[% recall.recall_id %]" />
508
                    <input type="hidden" name="recall_id" value="[% recall.recall_id %]" />
509
                    <input type="hidden" name="diffBranch" value="[% recall.branchcode %]" />
510
                    <input type="hidden" name="print_recall_slip" value="0" />
509
                </div>
511
                </div>
510
512
511
                <div class="modal-footer">
513
                <div class="modal-footer">
Lines 513-518 Link Here
513
                        <i class="fa fa-check"></i> Confirm recall [% IF transfer_recall %]and transfer[% END %]
515
                        <i class="fa fa-check"></i> Confirm recall [% IF transfer_recall %]and transfer[% END %]
514
                    </button>
516
                    </button>
515
517
518
                    <input type="hidden" name="print_slip" value="0" />
519
                    <button type="submit" class="btn btn-default print" onclick="this.form.print_recall_slip.value = 1; this.form.submit();">
520
                        <i class="fa fa-print"></i> Print and confirm
521
                    </button>
522
516
                    <button data-dismiss="modal" aria-hidden="true" type="submit" class="btn btn-danger deny" onclick="$('#barcode').focus(); return false;">
523
                    <button data-dismiss="modal" aria-hidden="true" type="submit" class="btn btn-danger deny" onclick="$('#barcode').focus(); return false;">
517
                        <i class="fa fa-times"></i> Ignore
524
                        <i class="fa fa-times"></i> Ignore
518
                    </button>
525
                    </button>
Lines 776-785 Link Here
776
783
777
            $(".modal").on('hidden.bs.modal', function (e) { $("#barcode").focus(); });
784
            $(".modal").on('hidden.bs.modal', function (e) { $("#barcode").focus(); });
778
785
786
            [% IF print_recall_slip %]
787
                Dopop('recall-pickup-slip.pl?borrowernumber=[% borrowernumber %]&amp;biblionumber=[% biblionumber %]&amp;recall_id=[% recall_id %]');
788
            [% END %]
789
779
            [% IF print_slip %]
790
            [% IF print_slip %]
780
                Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber %]&amp;biblionumber=[% biblionumber %]&amp;itemnumber=[% itemnumber %]');
791
                Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber %]&amp;biblionumber=[% biblionumber %]&amp;itemnumber=[% itemnumber %]');
781
            [% END %]
792
            [% END %]
782
783
            var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) %]
793
            var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) %]
784
            var returns_table = KohaTable("checkedintable", {
794
            var returns_table = KohaTable("checkedintable", {
785
                    "bFilter":false,
795
                    "bFilter":false,
786
- 

Return to bug 19532