3 # Copyright 2011-2013 Biblibre SARL
5 # This file is part of Koha.
7 # Koha is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3 of the License, or
10 # (at your option) any later version.
12 # Koha is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with Koha; if not, see <http://www.gnu.org/licenses>.
22 subscription-history.pl
26 Modify subscription history
41 my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user
( {
42 template_name
=> 'serials/subscription-history.tt',
46 flagsrequired
=> { 'serials' => 'edit_subscription' },
50 my $subscriptionid = $input->param('subscriptionid');
51 my $op = $input->param('op');
53 if(!defined $subscriptionid || $subscriptionid eq '') {
54 print $input->redirect('/cgi-bin/koha/serials/serials-home.pl');
58 if($op && $op eq 'mod') {
59 my $histstartdate = $input->param('histstartdate');
60 my $histenddate = $input->param('histenddate');
61 my $receivedlist = $input->param('receivedlist');
62 my $missinglist = $input->param('missinglist');
63 my $opacnote = $input->param('opacnote');
64 my $librariannote = $input->param('librariannote');
66 $histstartdate = output_pref
( { str
=> $histstartdate, dateonly
=> 1, dateformat
=> 'iso' } );
67 $histenddate = output_pref
( { str
=> $histenddate, dateonly
=> 1, dateformat
=> 'iso' } );
69 ModSubscriptionHistory
( $subscriptionid, $histstartdate, $histenddate, $receivedlist, $missinglist, $opacnote, $librariannote );
71 print $input->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid");
74 my $history = GetSubscriptionHistoryFromSubscriptionId
($subscriptionid);
75 my $biblio = GetBiblio
($history->{'biblionumber'});
78 subscriptionid
=> $subscriptionid,
79 title
=> $biblio->{'title'},
80 histstartdate
=> $history->{'histstartdate'},
81 histenddate
=> $history->{'histenddate'},
82 receivedlist
=> $history->{'recievedlist'},
83 missinglist
=> $history->{'missinglist'},
84 opacnote
=> $history->{'opacnote'},
85 librariannote
=> $history->{'librariannote'},
88 output_html_with_http_headers
$input, $cookie, $template->output;