Koha/serials/subscription-copy.pl
hdl 100e6a9808 functions that were in C4::Interface::CGI::Output are now in C4::Output.
So this implies quite a change for files.
Sorry about conflicts which will be caused.
directory Interface::CGI should now be dropped.
I noticed that many scripts (reports ones, but also some circ/stats.pl or opac-topissues) still use Date::Manip.
2007-04-24 13:54:28 +00:00

33 lines
1.2 KiB
Perl
Executable file

#!/usr/bin/perl
use strict;
use CGI;
use Date::Manip;
use C4::Koha;
use C4::Auth;
use C4::Date;
use C4::Output;
use C4::Acquisition;
use C4::Context;
use C4::Serials;
my $query = new CGI;
my $subscriptionid = $query->param('subscriptionid');
my $dbh = C4::Context->dbh;
# get old subscription
my $subs = &GetSubscription($subscriptionid);
# make newsubscription()
my $subscriptionid = old_newsubscription($subs->{'auser'},$subs->{'aqbooksellerid'},$subs->{'cost'},$subs->{'aqbudgetid'},
$subs->{'biblionumber'},$subs->{'startdate'},$subs->{'periodicity'},$subs->{'firstacquidate'},
$subs->{'dow'},$subs->{'irregularity'},$subs->{'numberpattern'},$subs->{'numberlength'},
$subs->{'weeklength'},$subs->{'monthlength'},$subs->{'add1'},$subs->{'every1'},
$subs->{'whenmorethan1'},$subs->{'setto1'},$subs->{'lastvalue1'},$subs->{'add2'},
$subs->{'every2'},$subs->{'whenmorethan2'},$subs->{'setto2'},$subs->{'lastvalue2'},$subs->{'add3'},
$subs->{'every3'},$subs->{'whenmorethan3'},$subs->{'setto3'},$subs->{'lastvalue3'},
$subs->{'numberingmethod'},$subs->{'status'},$subs->{'notes'},
);
print $query->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid");