Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 113 lines (94 sloc) 3.355 kb
d0374d00 » rangi
2000-12-19 Initial revision
1 #!/usr/bin/perl
f711507f » acli
2003-02-09 Make sure it handles non-latin1 charsets (It seems to display correctly
2 # NOTE: Use standard 8-space tabs for this file (indents are 4 spaces)
1e676877 » tonnesen
2002-08-14 Added copyright statement to all .pl and .pm files
3
7197a373 » arensb
2002-10-13 Added magic RCS comment.
4 # $Id$
5
f711507f » acli
2003-02-09 Make sure it handles non-latin1 charsets (It seems to display correctly
6 # Copyright 2000-2003 Katipo Communications
1e676877 » tonnesen
2002-08-14 Added copyright statement to all .pl and .pm files
7 #
8 # This file is part of Koha.
9 #
10 # Koha is free software; you can redistribute it and/or modify it under the
11 # terms of the GNU General Public License as published by the Free Software
12 # Foundation; either version 2 of the License, or (at your option) any later
13 # version.
14 #
15 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
16 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
17 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License along with
20 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
21 # Suite 330, Boston, MA 02111-1307 USA
22
cc840a7b » truth_nz
2002-05-22 Update to acqui.simple system. Hopefully this is a lot more user frie…
23 use HTML::Template;
d0374d00 » rangi
2000-12-19 Initial revision
24 use strict;
cc840a7b » truth_nz
2002-05-22 Update to acqui.simple system. Hopefully this is a lot more user frie…
25 require Exporter;
0376493c » pate
2002-04-08 refactored slashifyDate function out of inline code, created C4/Koha.pm
26 use C4::Koha;
27 use CGI;
cc840a7b » truth_nz
2002-05-22 Update to acqui.simple system. Hopefully this is a lot more user frie…
28 use C4::Search;
54ff89f0 » arensb
2002-10-16 C4::Acquisitions doesn't exist anymore. Replaced with C4::Catalogue
29 use C4::Catalogue;
d04d6cac » tonnesen
2002-10-09 switched from picktemplate() to gettemplate()
30 use C4::Output; # contains gettemplate
b89587c2 » tonnesen
2002-10-28 Merging from rel-1-2 to trunk
31 use C4::Auth;
f711507f » acli
2003-02-09 Make sure it handles non-latin1 charsets (It seems to display correctly
32 use C4::Interface::CGI::Output;
42657376 » wolfpac444
2003-03-26 Changed slashifyDate's into format_date's
33 use C4::Date;
b2906788 » tipaul
2003-03-18 bugfixes (use Acquisition.pm removed and image templating fixed)
34
cc840a7b » truth_nz
2002-05-22 Update to acqui.simple system. Hopefully this is a lot more user frie…
35 my $query=new CGI;
36
f711507f » acli
2003-02-09 Make sure it handles non-latin1 charsets (It seems to display correctly
37 # FIXME subject is not exported to the template?
25c112ab » tipaul
2002-10-14 merging arens + my modifs/bugfixes
38 my $subject=$query->param('subject');
75164d4c » acli
2003-02-09 Update to get_template_and_user
39
25c112ab » tipaul
2002-10-14 merging arens + my modifs/bugfixes
40 # if its a subject we need to use the subject.tmpl
75164d4c » acli
2003-02-09 Update to get_template_and_user
41 my ($template, $loggedinuser, $cookie) = get_template_and_user({
42 template_name => ($subject? 'catalogue/subject.tmpl':
43 'catalogue/moredetail.tmpl'),
44 query => $query,
45 type => "intranet",
46 authnotrequired => 0,
47 flagsrequired => {catalogue => 1},
48 });
b89587c2 » tonnesen
2002-10-28 Merging from rel-1-2 to trunk
49
b2906788 » tipaul
2003-03-18 bugfixes (use Acquisition.pm removed and image templating fixed)
50 # get variables
d0374d00 » rangi
2000-12-19 Initial revision
51
cc840a7b » truth_nz
2002-05-22 Update to acqui.simple system. Hopefully this is a lot more user frie…
52 my $biblionumber=$query->param('bib');
53 my $title=$query->param('title');
54 my $bi=$query->param('bi');
d0374d00 » rangi
2000-12-19 Initial revision
55
cc840a7b » truth_nz
2002-05-22 Update to acqui.simple system. Hopefully this is a lot more user frie…
56 my $data=bibitemdata($bi);
57 my $dewey = $data->{'dewey'};
f711507f » acli
2003-02-09 Make sure it handles non-latin1 charsets (It seems to display correctly
58 # FIXME Dewey is a string, not a number, & we should use a function
cc840a7b » truth_nz
2002-05-22 Update to acqui.simple system. Hopefully this is a lot more user frie…
59 $dewey =~ s/0+$//;
60 if ($dewey eq "000.") { $dewey = "";};
61 if ($dewey < 10){$dewey='00'.$dewey;}
62 if ($dewey < 100 && $dewey > 10){$dewey='0'.$dewey;}
d0374d00 » rangi
2000-12-19 Initial revision
63 if ($dewey <= 0){
cc840a7b » truth_nz
2002-05-22 Update to acqui.simple system. Hopefully this is a lot more user frie…
64 $dewey='';
d0374d00 » rangi
2000-12-19 Initial revision
65 }
cc840a7b » truth_nz
2002-05-22 Update to acqui.simple system. Hopefully this is a lot more user frie…
66 $dewey=~ s/\.$//;
67 $data->{'dewey'}=$dewey;
d0374d00 » rangi
2000-12-19 Initial revision
68
cc840a7b » truth_nz
2002-05-22 Update to acqui.simple system. Hopefully this is a lot more user frie…
69 my @results;
d0374d00 » rangi
2000-12-19 Initial revision
70
cc840a7b » truth_nz
2002-05-22 Update to acqui.simple system. Hopefully this is a lot more user frie…
71 my (@items)=itemissues($bi);
72 my $count=@items;
73 $data->{'count'}=$count;
74 my ($order,$ordernum)=getorder($bi,$biblionumber);
75
b89587c2 » tonnesen
2002-10-28 Merging from rel-1-2 to trunk
76 my $env;
77 $env->{itemcount}=1;
78
cc840a7b » truth_nz
2002-05-22 Update to acqui.simple system. Hopefully this is a lot more user frie…
79 $results[0]=$data;
80
81 foreach my $item (@items){
82 $item->{'itemlost'}=~ s/0/No/;
83 $item->{'itemlost'}=~ s/1/Yes/;
84 $item->{'withdrawn'}=~ s/0/No/;
85 $item->{'withdrawn'}=~ s/1/Yes/;
86 $item->{'replacementprice'}+=0.00;
87 my $year=substr($item->{'timestamp0'},0,4);
88 my $mon=substr($item->{'timestamp0'},4,2);
89 my $day=substr($item->{'timestamp0'},6,2);
90 $item->{'timestamp0'}="$day/$mon/$year";
42657376 » wolfpac444
2003-03-26 Changed slashifyDate's into format_date's
91 $item->{'dateaccessioned'} = format_date($item->{'dateaccessioned'});
92 $item->{'datelastseen'} = format_date($item->{'datelastseen'});
7ff8ab7c » finlayt
2002-07-31 added the ordernumber information to make the Aquisitions link work.
93 $item->{'ordernumber'} = $ordernum;
94 $item->{'booksellerinvoicenumber'} = $order->{'booksellerinvoicenumber'};
95
f711507f » acli
2003-02-09 Make sure it handles non-latin1 charsets (It seems to display correctly
96 # FIXME untranslatable strings
54ff89f0 » arensb
2002-10-16 C4::Acquisitions doesn't exist anymore. Replaced with C4::Catalogue
97 if ($item->{'date_due'} eq 'Available'){
7ff8ab7c » finlayt
2002-07-31 added the ordernumber information to make the Aquisitions link work.
98 $item->{'issue'}="<b>Available</b><br>";
cc840a7b » truth_nz
2002-05-22 Update to acqui.simple system. Hopefully this is a lot more user frie…
99 } else {
100 $item->{'issue'}="<b>Currently on issue to:</b> <a href=/cgi-bin/koha/moremember.pl?bornum=$item->{'borrower0'}>$item->{'card'}</a><br>";
101 }
d0374d00 » rangi
2000-12-19 Initial revision
102 }
103
cc840a7b » truth_nz
2002-05-22 Update to acqui.simple system. Hopefully this is a lot more user frie…
104 $template->param(BIBITEM_DATA => \@results);
105 $template->param(ITEM_DATA => \@items);
b89587c2 » tonnesen
2002-10-28 Merging from rel-1-2 to trunk
106 $template->param(loggedinuser => $loggedinuser);
d0374d00 » rangi
2000-12-19 Initial revision
107
f711507f » acli
2003-02-09 Make sure it handles non-latin1 charsets (It seems to display correctly
108 output_html_with_http_headers $query, $cookie, $template->output;
109
110
111 # Local Variables:
112 # tab-width: 8
113 # End:
Something went wrong with that request. Please try again.