Line 0
Link Here
|
|
|
1 |
#!/usr/bin/perl |
2 |
|
3 |
# Copyright 2000-2002 Katipo Communications |
4 |
# Copyright 2010 BibLibre |
5 |
# |
6 |
# This file is part of Koha. |
7 |
# |
8 |
# Koha is free software; you can redistribute it and/or modify it under the |
9 |
# terms of the GNU General Public License as published by the Free Software |
10 |
# Foundation; either version 2 of the License, or (at your option) any later |
11 |
# version. |
12 |
# |
13 |
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY |
14 |
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
15 |
# A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
16 |
# |
17 |
# You should have received a copy of the GNU General Public License along |
18 |
# with Koha; if not, write to the Free Software Foundation, Inc., |
19 |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
20 |
|
21 |
|
22 |
=head1 moremember.pl |
23 |
|
24 |
script to do a borrower enquiry/bring up borrower details etc |
25 |
Displays all the details about a borrower |
26 |
written 20/12/99 by chris@katipo.co.nz |
27 |
last modified 21/1/2000 by chris@katipo.co.nz |
28 |
modified 31/1/2001 by chris@katipo.co.nz |
29 |
to not allow items on request to be renewed |
30 |
|
31 |
needs html removed and to use the C4::Output more, but its tricky |
32 |
|
33 |
=cut |
34 |
|
35 |
use strict; |
36 |
#use warnings; FIXME - Bug 2505 |
37 |
use CGI; |
38 |
use C4::Context; |
39 |
use C4::Auth qw/:DEFAULT get_session/; |
40 |
use C4::Output; |
41 |
use C4::Members; |
42 |
use C4::Koha; |
43 |
|
44 |
#use Smart::Comments; |
45 |
#use Data::Dumper; |
46 |
|
47 |
use vars qw($debug); |
48 |
|
49 |
BEGIN { |
50 |
$debug = $ENV{DEBUG} || 0; |
51 |
} |
52 |
|
53 |
my $input = new CGI; |
54 |
my $sessionID = $input->cookie("CGISESSID"); |
55 |
my $session = get_session($sessionID); |
56 |
|
57 |
$debug or $debug = $input->param('debug') || 0; |
58 |
my $print = $input->param('print'); |
59 |
my $error = $input->param('error'); |
60 |
|
61 |
# circ staff who process checkouts but can't edit |
62 |
# patrons still need to be able to print receipts |
63 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
64 |
{ |
65 |
template_name => "/sco/printslip.tmpl", |
66 |
query => $input, |
67 |
type => "opac", |
68 |
debug => 1, |
69 |
} |
70 |
); |
71 |
|
72 |
my $borrowernumber = $input->param('borrowernumber'); |
73 |
my $branch=C4::Context->userenv->{'branch'}; |
74 |
my ($slip, $is_html); |
75 |
if (my $letter = IssueSlip ($session->param('branch') || $branch, $borrowernumber, $print eq "qslip")) { |
76 |
$slip = $letter->{content}; |
77 |
$is_html = $letter->{is_html}; |
78 |
} |
79 |
|
80 |
$template->param( |
81 |
slip => $slip, |
82 |
plain => !$is_html, |
83 |
title => "Print Receipt for $borrowernumber", |
84 |
stylesheet => C4::Context->preference("SlipCSS"), |
85 |
error => $error, |
86 |
); |
87 |
|
88 |
output_html_with_http_headers $input, $cookie, $template->output; |