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 (+88 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;
(-)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 (+1 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);
(-)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 (-1 / +10 lines)
Lines 559-564 Link Here
559
                    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
559
                    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
560
                    <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
560
                    <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
561
                    <input type="hidden" name="recall_id" value="[% recall.recall_id %]" />
561
                    <input type="hidden" name="recall_id" value="[% recall.recall_id %]" />
562
                    <input type="hidden" name="diffBranch" value="[% recall.branchcode %]" />
563
                    <input type="hidden" name="print_recall_slip" value="0" />
562
                </div>
564
                </div>
563
565
564
                <div class="modal-footer">
566
                <div class="modal-footer">
Lines 566-571 Link Here
566
                        <i class="fa fa-check"></i> Confirm recall [% IF transfer_recall %]and transfer[% END %]
568
                        <i class="fa fa-check"></i> Confirm recall [% IF transfer_recall %]and transfer[% END %]
567
                    </button>
569
                    </button>
568
570
571
                    <input type="hidden" name="print_slip" value="0" />
572
                    <button type="submit" class="btn btn-default print" onclick="this.form.print_recall_slip.value = 1; this.form.submit();">
573
                        <i class="fa fa-print"></i> Print and confirm
574
                    </button>
575
569
                    <button data-dismiss="modal" aria-hidden="true" type="submit" class="btn btn-danger deny" onclick="$('#barcode').focus(); return false;">
576
                    <button data-dismiss="modal" aria-hidden="true" type="submit" class="btn btn-danger deny" onclick="$('#barcode').focus(); return false;">
570
                        <i class="fa fa-times"></i> Ignore
577
                        <i class="fa fa-times"></i> Ignore
571
                    </button>
578
                    </button>
Lines 838-843 Link Here
838
                e.preventDefault();
845
                e.preventDefault();
839
                Dopop('hold-transfer-slip.pl?borrowernumber=[% patron.borrowernumber | html %]&amp;biblionumber=[% biblionumber | html %]');
846
                Dopop('hold-transfer-slip.pl?borrowernumber=[% patron.borrowernumber | html %]&amp;biblionumber=[% biblionumber | html %]');
840
            });
847
            });
848
            [% IF print_recall_slip %]
849
                Dopop('recall-pickup-slip.pl?borrowernumber=[% borrowernumber %]&amp;biblionumber=[% biblionumber %]&amp;recall_id=[% recall_id %]')    ;
850
            [% END %]
841
851
842
            [% IF print_slip %]
852
            [% IF print_slip %]
843
                Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber | html %]&amp;biblionumber=[% biblionumber | html %]&amp;itemnumber=[% itemnumber | html %]');
853
                Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber | html %]&amp;biblionumber=[% biblionumber | html %]&amp;itemnumber=[% itemnumber | html %]');
844
- 

Return to bug 19532