Adding in the updated files for the routing serials

This commit is contained in:
bob_lyon 2006-11-24 00:23:22 +00:00
parent eb46aa718a
commit 8ca3564c61
15 changed files with 2510 additions and 214 deletions

File diff suppressed because it is too large Load Diff

View File

@ -12,6 +12,8 @@ use HTML::Template;
my $query = new CGI;
my $title = $query->param('title');
my $ISSN = $query->param('ISSN');
my $routing = $query->param('routing');
my $searched = $query->param('searched');
my $biblionumber = $query->param('biblionumber');
my @subscriptions = getsubscriptions($title,$ISSN,$biblionumber);
my ($template, $loggedinuser, $cookie)
@ -23,10 +25,21 @@ my ($template, $loggedinuser, $cookie)
debug => 1,
});
# to toggle between create or edit routing list options
if($routing){
for(my $i=0;$i<@subscriptions;$i++){
my $checkrouting = check_routing($subscriptions[$i]->{'subscriptionid'});
$subscriptions[$i]->{'routingedit'} = $checkrouting;
# warn "check $checkrouting";
}
}
$template->param(
subscriptions => \@subscriptions,
title => $title,
ISSN => $ISSN,
subscriptions => \@subscriptions,
title => $title,
ISSN => $ISSN,
done_searched => $searched,
routing => $routing,
intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
intranetstylesheet => C4::Context->preference("intranetstylesheet"),
IntranetNav => C4::Context->preference("IntranetNav"),

View File

@ -18,23 +18,28 @@ my $query = new CGI;
my $supplierid = $query->param('supplierid');
my %supplierlist = getSupplierListWithLateIssues;
my @select_supplier;
push @select_supplier,"";
my ($nothing,@supplierinfo)=bookseller($supplierid) if $supplierid;
foreach my $supplierid (keys %supplierlist){
my ($count, @dummy) = GetLateIssues($supplierid);
my ($count2, @dummy2) = GetMissingIssues($supplierid);
my $counting = $count+$count2;
$supplierlist{$supplierid} = $supplierlist{$supplierid}." ($counting)";
push @select_supplier, $supplierid
}
my ($count, @lateissues) = GetLateIssues($supplierid);
my ($count2, @missingissues) = GetMissingIssues($supplierid);
my $CGIsupplier=CGI::scrolling_list( -name => 'supplierid',
-values => \@select_supplier,
-default => $supplierid,
-labels => \%supplierlist,
-size => 1,
-tabindex=>'',
-multiple => 0 );
my @lateissues;
@lateissues = GetLateIssues($supplierid) if $supplierid;
my @supplierinfo;
my $nothing;
($nothing,@supplierinfo)=bookseller($supplierid) if $supplierid;
my ($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "bull/lateissues.tmpl",
@ -48,6 +53,8 @@ my ($template, $loggedinuser, $cookie)
$template->param(
CGIsupplier => $CGIsupplier,
lateissues => \@lateissues,
missingissues => \@missingissues,
supplierid => $supplierid,
phone => $supplierinfo[0]->{phone},
booksellerfax => $supplierinfo[0]->{booksellerfax},
contemail => $supplierinfo[0]->{contemail},

View File

@ -35,12 +35,26 @@ my @locations = $query->param('location');
my @itemstatus = $query->param('itemstatus');
my @homebranches = $query->param('branch');
my $hassubscriptionexpired = hassubscriptionexpired($subscriptionid);
my $abouttoexpire = abouttoexpire($subscriptionid);
my $subscription=getsubscription($subscriptionid);
my $routing = check_routing($subscriptionid); # to see if routing list exists
my $manualdate ='';
my $manualissue ='';
my $manualstatus =0;
my $manualid ='';
if ($op eq 'found'){
$manualdate = $query->param('planneddate');
$manualissue = $query->param('missingissue');
$manualstatus = 1;
my $sth = $dbh->prepare("select serialid from serial where subscriptionid = ? AND serialseq = ? AND planneddate = ?");
$sth->execute($subscriptionid,$manualissue,format_date_in_iso($manualdate));
$manualid = $sth->fetchrow;
}
if ($op eq 'modsubscriptionhistory') {
modsubscriptionhistory($subscriptionid,$histstartdate,$enddate,$recievedlist,$missinglist,$opacnote,$librariannote);
}
# change status except, if subscription has expired, for the "waited" issue.
if ($op eq 'serialchangestatus') {
my $sth = $dbh->prepare("select status from serial where serialid=?");
@ -50,7 +64,11 @@ if ($op eq 'serialchangestatus') {
my ($oldstatus) = $sth->fetchrow;
if ($serialids[$i]) {
my $planneddate = ($planneddates[$i]?format_date_in_iso($planneddates[$i]):format_date_in_iso("today"));
if(C4::Context->preference("RoutingSerials")){
old_serialchangestatus($serialids[$i],$serialseqs[$i],format_date_in_iso($planneddates[$i]),$status[$i],$notes[$i]) unless ($hassubscriptionexpired && $oldstatus == 1);
} else {
serialchangestatus($serialids[$i],$serialseqs[$i],format_date_in_iso($publisheddates[$i]),$planneddate,$status[$i],$notes[$i]) unless ($hassubscriptionexpired && $oldstatus == 1);
}
if (($status[$i]==2) && C4::Context->preference("serialsadditems")){
my %info;
$info{branch}=$homebranches[$i];
@ -58,8 +76,15 @@ if ($op eq 'serialchangestatus') {
$info{itemcallnumber}=$itemcallnumbers[$i];
$info{location}=$locations[$i];
$info{status}=$itemstatus[$i];
$info{notes}=$serialseqs[$i];
$info{notes}=$serialseqs[$i]." (".$planneddates[$i].")";
my ($status, @errors)= serialsitemize($serialids[$i],\%info);
my $sth2 = $dbh->prepare("UPDATE subscriptionhistory SET lastbranch = ? WHERE subscriptionid = ?");
$sth2->execute($homebranches[$i],$subscriptionid);
$sth2->finish;
# remove from missing list if item being checked in is on it
if ($status ==1){
removeMissingIssue($serialseqs[$i],$subscriptionid);
}
}
} else {
# add a special issue
@ -77,14 +102,23 @@ if ($op eq 'serialchangestatus') {
$info{itemcallnumber}=$itemcallnumbers[$i];
$info{location}=$locations[$i];
$info{status}=$itemstatus[$i];
$info{notes}=$serialseqs[$i];
my ($status, @errors)= serialsitemize($newserialid,\%info);
$info{notes}=$serialseqs[$i]." (".$planneddates[$i].")";
my ($status2, @errors)= serialsitemize($newserialid,\%info);
my $sth2 = $dbh->prepare("UPDATE subscriptionhistory SET lastbranch = ? WHERE subscriptionid = ?");
$sth2->execute($homebranches[$i],$subscriptionid);
$sth2->finish;
# remove from missing list if item being checked in is on it
if ($status2 ==1){
removeMissingIssue($serialseqs[$i],$subscriptionid);
}
}
}
}
}
}
my ($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "bull/statecollection.tmpl",
query => $query,
@ -95,8 +129,25 @@ my ($template, $loggedinuser, $cookie)
});
my $subs = &getsubscription($subscriptionid);
my ($totalissues,@serialslist) = getserials($subscriptionid);
my ($totalissues,@serialslist);
if(C4::Context->preference("RoutingSerials")){
($totalissues,@serialslist) = old_getserials($subscriptionid);
} else {
($totalissues,@serialslist) = getserials($subscriptionid);
}
my $count = @serialslist;
for(my $i=0;$i<$count;$i++){
$serialslist[$i]->{'callnumber'} = $subscription->{'callnumber'};
my $temp = rand(10000000);
$serialslist[$i]->{'barcode'} = "TEMP" . sprintf("%.0f",$temp);
}
my $sth=$dbh->prepare("select * from subscriptionhistory where subscriptionid = ?");
$sth->execute($subscriptionid);
my $solhistory = $sth->fetchrow_hashref;
if (C4::Context->preference("serialsadditems")){
my $bibid=MARCfind_MARCbibid_from_oldbiblionumber($dbh,$subscription->{biblionumber});
my $fwk=MARCfind_frameworkcode($dbh,$bibid);
@ -104,18 +155,25 @@ if (C4::Context->preference("serialsadditems")){
my $branches = getbranches;
my @branchloop;
foreach my $thisbranch (keys %$branches) {
my $selected = 0;
if($thisbranch eq $solhistory->{'lastbranch'}){
$selected = 1;
}
my %row =(value => $thisbranch,
branchname => $branches->{$thisbranch}->{'branchname'},
selected => $selected,
);
push @branchloop, \%row;
}
my $itemstatushash = getitemstatus($fwk);
my @itemstatusloop;
my $itemstatusloopcount=0;
foreach my $thisitemstatus (keys %$itemstatushash) {
my %row =(itemval => $thisitemstatus,
itemlib => $itemstatushash->{$thisitemstatus},
);
$itemstatusloopcount++;
push @itemstatusloop, \%row;
}
@ -127,6 +185,8 @@ if (C4::Context->preference("serialsadditems")){
);
push @itemlocationloop, \%row;
}
my $choice = 0;
if($itemstatusloopcount == 1){ $choice = 1;}
foreach my $data (@serialslist){
if (scalar(@itemstatusloop)){$data->{"itemstatusloop"}=\@itemstatusloop;}
else { $data->{"itemstatusloop"}=[];}
@ -134,6 +194,7 @@ if (C4::Context->preference("serialsadditems")){
else {$data->{"itemlocationloop"}=[];}
$data->{"branchloop"}=\@branchloop ;
}
$template->param(choice => $choice);
$template->param(serialadditems =>C4::Context->preference("serialsadditems"),
branchloop => \@branchloop,
) ;
@ -142,14 +203,12 @@ if (C4::Context->preference("serialsadditems")){
}else{
$template->param(branchloop=>[],itemstatusloop=>[],itemlocationloop=>[]) ;
}
my $sth=$dbh->prepare("select * from subscriptionhistory where subscriptionid = ?");
$sth->execute($subscriptionid);
my $solhistory = $sth->fetchrow_hashref;
$template->param(
user => $auser,
serialslist => \@serialslist,
count => $count,
biblionumber => $subscription->{biblionumber},
histstartdate => format_date($solhistory->{'histstartdate'}),
enddate => format_date($solhistory->{'enddate'}),
@ -161,8 +220,16 @@ $template->param(
bibliotitle => $subs->{bibliotitle},
biblionumber => $subs->{biblionumber},
hassubscriptionexpired =>$hassubscriptionexpired,
abouttoexpire =>$abouttoexpire,
intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
intranetstylesheet => C4::Context->preference("intranetstylesheet"),
IntranetNav => C4::Context->preference("IntranetNav"),
routing => $routing,
missingseq => $manualissue,
frommissing => $manualstatus,
missingdate => $manualdate,
missingid => $manualid,
);
output_html_with_http_headers $query, $cookie, $template->output;

View File

@ -7,23 +7,23 @@ use C4::Koha;
use C4::Auth;
use C4::Date;
use C4::Output;
use C4::Bull;
use C4::Acquisition;
use C4::Interface::CGI::Output;
use C4::Context;
use HTML::Template;
use C4::Bull;
use Date::Manip;
my $query = new CGI;
my $op = $query->param('op');
my $dbh = C4::Context->dbh;
my ($subscriptionid,$auser,$librarian,$cost,$aqbooksellerid, $aqbooksellername,$aqbudgetid, $bookfundid, $startdate, $periodicity,
$dow, $numberlength, $weeklength, $monthlength,
$firstacquidate, $dow, $irregularity, $numberpattern, $numberlength, $weeklength, $monthlength, $sublength,
$add1,$every1,$whenmorethan1,$setto1,$lastvalue1,$innerloop1,
$add2,$every2,$whenmorethan2,$setto2,$lastvalue2,$innerloop2,
$add3,$every3,$whenmorethan3,$setto3,$lastvalue3,$innerloop3,
$numberingmethod, $status, $biblionumber,
$bibliotitle, $notes);
$bibliotitle, $callnumber, $notes, $hemisphere);
my @budgets;
my ($template, $loggedinuser, $cookie)
@ -36,6 +36,29 @@ my ($template, $loggedinuser, $cookie)
});
my $weekarrayjs='';
my $count = 0;
my ($year, $month, $day) = UnixDate("today", "%Y", "%m", "%d");
my $firstday = Date_DayOfYear($month,$day,$year);
my $wkno = Date_WeekOfYear($month,$day,$year,1); # week starting monday
my $weekno = $wkno;
for(my $i=$firstday;$i<($firstday+365);$i=$i+7){
$count = $i;
if($wkno > 52){$year++; $wkno=1;}
if($count>365){$count=$i-365;}
my ($y,$m,$d) = Date_NthDayOfYear($year,$count);
my $output = "$y-$m-$d";
$weekarrayjs .= "'Wk $wkno: ".format_date($output)."',";
$wkno++;
}
chop($weekarrayjs);
# warn $weekarrayjs;
my $sub_on;
my @subscription_types = (
'issues', 'weeks', 'months'
);
my @sub_type_data;
if ($op eq 'mod') {
my $subscriptionid = $query->param('subscriptionid');
my $subs = &getsubscription($subscriptionid);
@ -47,11 +70,38 @@ if ($op eq 'mod') {
$bookfundid = $subs->{'bookfundid'};
$aqbudgetid = $subs->{'aqbudgetid'};
$startdate = $subs->{'startdate'};
$firstacquidate = $subs->{'firstacquidate'};
$periodicity = $subs->{'periodicity'};
$dow = $subs->{'dow'};
$irregularity = $subs->{'irregularity'};
$numberpattern = $subs->{'numberpattern'};
$numberlength = $subs->{'numberlength'};
$weeklength = $subs->{'weeklength'};
$monthlength = $subs->{'monthlength'};
if($monthlength > 0){
$sublength = $monthlength;
$sub_on = $subscription_types[2];
} elsif ($weeklength>0){
$sublength = $weeklength;
$sub_on = $subscription_types[1];
} else {
$sublength = $numberlength;
$sub_on = $subscription_types[0];
}
while (@subscription_types) {
my $sub_type = shift @subscription_types;
my %row = ( 'name' => $sub_type );
if ( $sub_on eq $sub_type ) {
$row{'selected'} = ' selected';
} else {
$row{'selected'} = '';
}
push( @sub_type_data, \%row );
}
$add1 = $subs->{'add1'};
$every1 = $subs->{'every1'};
$whenmorethan1 = $subs->{'whenmorethan1'};
@ -73,8 +123,10 @@ if ($op eq 'mod') {
$numberingmethod = $subs->{'numberingmethod'};
$status = $subs->{status};
$biblionumber = $subs->{'biblionumber'};
$bibliotitle = $subs->{'bibliotitle'},
$bibliotitle = $subs->{'bibliotitle'};
$callnumber = $subs->{'callnumber'};
$notes = $subs->{'notes'};
$hemisphere = $subs->{'hemisphere'};
$template->param(
$op => 1,
user => $auser,
@ -85,11 +137,13 @@ if ($op eq 'mod') {
aqbudgetid => $aqbudgetid,
bookfundid => $bookfundid,
startdate => format_date($startdate),
firstacquidate => format_date($firstacquidate),
periodicity => $periodicity,
dow => $dow,
numberlength => $numberlength,
weeklength => $weeklength,
monthlength => $monthlength,
irregularity => $irregularity,
numberpattern => $numberpattern,
sublength => $sublength,
subtype => \@sub_type_data,
add1 => $add1,
every1 => $every1,
whenmorethan1 => $whenmorethan1,
@ -112,12 +166,18 @@ if ($op eq 'mod') {
status => $status,
biblionumber => $biblionumber,
bibliotitle => $bibliotitle,
callnumber => $callnumber,
notes => $notes,
subscriptionid => $subscriptionid,
weekarrayjs => $weekarrayjs,
weekno => $weekno,
hemisphere => $hemisphere,
);
$template->param(
"periodicity$periodicity" => 1,
"dow$dow" => 1,
"numberpattern$numberpattern" => 1,
);
}
(my $temp,@budgets) = bookfunds();
@ -134,46 +194,92 @@ $template->param(budgets => \@budgets,
);
if ($op eq 'addsubscription') {
my @irregular = $query->param('irregular');
my $irregular_count = @irregular;
for(my $i =0;$i<$irregular_count;$i++){
$irregularity .=$irregular[$i]."|";
}
$irregularity =~ s/\|$//;
my $auser = $query->param('user');
my $aqbooksellerid = $query->param('aqbooksellerid');
my $cost = $query->param('cost');
my $aqbudgetid = $query->param('aqbudgetid');
my $startdate = $query->param('startdate');
my $firstacquidate = $query->param('firstacquidate');
my $periodicity = $query->param('periodicity');
my $dow = $query->param('dow');
my $numberlength = $query->param('numberlength');
my $weeklength = $query->param('weeklength');
my $monthlength = $query->param('monthlength');
# my $irregularity = $query->param('irregularity');
my $numberlength = 0;
my $weeklength = 0;
my $monthlength = 0;
my $numberpattern = $query->param('numbering_pattern');
my $sublength = $query->param('sublength');
my $subtype = $query->param('subtype');
if ($subtype eq 'months'){
$monthlength = $sublength;
} elsif ($subtype eq 'weeks'){
$weeklength = $sublength;
} else {
$numberlength = $sublength;
}
my $add1 = $query->param('add1');
my $every1 = $query->param('every1');
my $whenmorethan1 = $query->param('whenmorethan1');
my $setto1 = $query->param('setto1');
my $lastvalue1 = $query->param('lastvalue1');
my $innerloop1 = $query->param('innerloop1');
my $add2 = $query->param('add2');
my $every2 = $query->param('every2');
my $whenmorethan2 = $query->param('whenmorethan2');
my $setto2 = $query->param('setto2');
my $lastvalue2 = $query->param('lastvalue2');
my $innerloop2 = $query->param('innerloop2');
my $add3 = $query->param('add3');
my $every3 = $query->param('every3');
my $whenmorethan3 = $query->param('whenmorethan3');
my $setto3 = $query->param('setto3');
my $lastvalue3 = $query->param('lastvalue3');
my $innerloop3 = $query->param('innerloop3');
my $numberingmethod = $query->param('numberingmethod');
my $status = 1;
my $biblionumber = $query->param('biblionumber');
my $callnumber = $query->param('callnumber');
my $notes = $query->param('notes');
my $subscriptionid = newsubscription($auser,$aqbooksellerid,$cost,$aqbudgetid,$biblionumber,
$startdate,$periodicity,$dow,$numberlength,$weeklength,$monthlength,
$add1,$every1,$whenmorethan1,$setto1,$lastvalue1,$innerloop1,
$add2,$every2,$whenmorethan2,$setto2,$lastvalue2,$innerloop2,
$add3,$every3,$whenmorethan3,$setto3,$lastvalue3,$innerloop3,
$numberingmethod, $status, $notes
my $hemisphere = $query->param('hemisphere') || 1;
my $subscriptionid;
if(C4::Context->preference("RoutingSerials")){
$subscriptionid = old_newsubscription($auser,$aqbooksellerid,$cost,$aqbudgetid,$biblionumber,
$startdate,$periodicity,$firstacquidate,$dow,$irregularity,$numberpattern,$numberlength,$weeklength,$monthlength,
$add1,$every1,$whenmorethan1,$setto1,$lastvalue1,
$add2,$every2,$whenmorethan2,$setto2,$lastvalue2,
$add3,$every3,$whenmorethan3,$setto3,$lastvalue3,
$numberingmethod, $status, $callnumber, $notes, $hemisphere
);
} else {
$subscriptionid = newsubscription($auser,$aqbooksellerid,$cost,$aqbudgetid,$biblionumber,
$startdate,$periodicity,$dow,$numberlength,$weeklength,$monthlength,
$add1,$every1,$whenmorethan1,$setto1,$lastvalue1,
$add2,$every2,$whenmorethan2,$setto2,$lastvalue2,
$add3,$every3,$whenmorethan3,$setto3,$lastvalue3,
$numberingmethod, $status, $notes
);
}
print $query->redirect("/cgi-bin/koha/bull/subscription-detail.pl?subscriptionid=$subscriptionid");
} else {
while (@subscription_types) {
my $sub_type = shift @subscription_types;
my %row = ( 'name' => $sub_type );
if ( $sub_on eq $sub_type ) {
$row{'selected'} = ' selected';
} else {
$row{'selected'} = '';
}
push( @sub_type_data, \%row );
}
$template->param(subtype => \@sub_type_data,
weekarrayjs => $weekarrayjs,
weekno => $weekno,
);
output_html_with_http_headers $query, $cookie, $template->output;
}

View File

@ -10,6 +10,7 @@ use C4::Output;
use C4::Interface::CGI::Output;
use C4::Context;
use HTML::Template;
use Date::Manip;
my $query = new CGI;
my $op = $query->param('op');
@ -18,15 +19,22 @@ my $sth;
# my $id;
my ($template, $loggedinuser, $cookie, $subs);
my ($subscriptionid,$auser,$librarian,$cost,$aqbooksellerid, $aqbooksellername,$aqbudgetid, $bookfundid, $startdate, $periodicity,
$dow, $numberlength, $weeklength, $monthlength,
$firstacquidate, $dow, $irregularity, $sublength, $subtype, $numberpattern, $numberlength, $weeklength, $monthlength,
$add1,$every1,$whenmorethan1,$setto1,$lastvalue1,$innerloop1,
$add2,$every2,$whenmorethan2,$setto2,$lastvalue2,$innerloop2,
$add3,$every3,$whenmorethan3,$setto3,$lastvalue3,$innerloop3,
$numberingmethod, $status, $biblionumber, $bibliotitle, $notes);
$numberingmethod, $status, $biblionumber, $bibliotitle, $callnumber, $notes, $hemisphere);
$subscriptionid = $query->param('subscriptionid');
if ($op eq 'modsubscription') {
my @irregular = $query->param('irregular');
my $irregular_count = @irregular;
for(my $i =0;$i<$irregular_count;$i++){
$irregularity .=$irregular[$i]."|";
}
$irregularity =~ s/\|$//;
$auser = $query->param('user');
$librarian => $query->param('librarian'),
$cost = $query->param('cost');
@ -35,10 +43,24 @@ if ($op eq 'modsubscription') {
$aqbudgetid = $query->param('aqbudgetid');
$startdate = format_date_in_iso($query->param('startdate'));
$periodicity = $query->param('periodicity');
$firstacquidate = format_date_in_iso($query->param('firstacquidate'));
$dow = $query->param('dow');
$numberpattern = $query->param('numbering_pattern');
if(C4::Context->preference("RoutingSerials")){
$sublength = $query->param('sublength');
$subtype = $query->param('subtype');
if($subtype eq 'months'){
$monthlength = $sublength;
} elsif ($subtype eq 'weeks'){
$weeklength = $sublength;
} else {
$numberlength = $sublength;
}
} else {
$numberlength = $query->param('numberlength');
$weeklength = $query->param('weeklength');
$monthlength = $query->param('monthlength');
}
$add1 = $query->param('add1');
$every1 = $query->param('every1');
$whenmorethan1 = $query->param('whenmorethan1');
@ -59,14 +81,24 @@ if ($op eq 'modsubscription') {
$innerloop3 = $query->param('innerloop3');
$numberingmethod = $query->param('numberingmethod');
$status = 1;
$callnumber = $query->param('callnumber');
$hemisphere = $query->param('hemisphere');
$notes = $query->param('notes');
if(C4::Context->preference("RoutingSerials")){
&old_modsubscription($auser,$aqbooksellerid,$cost,$aqbudgetid,$startdate,
$periodicity,$firstacquidate,$dow,$irregularity,$numberpattern,$numberlength,$weeklength,$monthlength,
$add1,$every1,$whenmorethan1,$setto1,$lastvalue1,$innerloop1,
$add2,$every2,$whenmorethan2,$setto2,$lastvalue2,$innerloop2,
$add3,$every3,$whenmorethan3,$setto3,$lastvalue3,$innerloop3,
$numberingmethod, $status, $biblionumber, $callnumber, $notes, $hemisphere, $subscriptionid);
} else {
&modsubscription($auser,$aqbooksellerid,$cost,$aqbudgetid,$startdate,
$periodicity,$dow,$numberlength,$weeklength,$monthlength,
$add1,$every1,$whenmorethan1,$setto1,$lastvalue1,$innerloop1,
$add2,$every2,$whenmorethan2,$setto2,$lastvalue2,$innerloop2,
$add3,$every3,$whenmorethan3,$setto3,$lastvalue3,$innerloop3,
$numberingmethod, $status, $biblionumber, $notes, $subscriptionid);
}
}
if ($op eq 'del') {
@ -92,6 +124,23 @@ $totalissues-- if $totalissues; # the -1 is to have 0 if this is a new subscript
my ($user, $cookie, $sessionID, $flags)
= checkauth($query, 0, {catalogue => 1}, "intranet");
my $weekarrayjs='';
my $count = 0;
my ($year, $month, $day) = UnixDate("today", "%Y", "%m", "%d");
my $firstday = Date_DayOfYear($month,$day,$year);
my $wkno = Date_WeekOfYear($month,$day,$year,1); # week starting monday
my $weekno = $wkno;
for(my $i=$firstday;$i<($firstday+365);$i=$i+7){
$count = $i;
if($wkno > 52){$year++; $wkno=1;}
if($count>365){$count=$i-365;}
my ($y,$m,$d) = Date_NthDayOfYear($year,$count);
my $output = "$y-$m-$d";
$weekarrayjs .= "'Wk $wkno: ".format_date($output)."',";
$wkno++;
}
chop($weekarrayjs);
$template->param(
user => $subs->{auser},
librarian => $subs->{librarian},
@ -102,10 +151,13 @@ $template->param(
bookfundid => $subs->{bookfundid},
startdate => format_date($subs->{startdate}),
periodicity => $subs->{periodicity},
firstacquidate => format_date($subs->{firstacquidate}),
dow => $subs->{dow},
numberlength => $subs->{numberlength},
weeklength => $subs->{weeklength},
monthlength => $subs->{monthlength},
irregularity => $subs->{irregularity},
numberlength => $subs->{numberlength},
weeklength => $subs->{weeklength},
monthlength => $subs->{monthlength},
numberpattern => $subs->{numberpattern},
add1 => $subs->{add1},
every1 => $subs->{every1},
whenmorethan1 => $subs->{whenmorethan1},
@ -132,8 +184,12 @@ $template->param(
subscriptionid => $subs->{subscriptionid},
serialslist => \@serialslist,
totalissues => $totalissues,
weekarrayjs => $weekarrayjs,
callnumber => $subs->{callnumber},
hemisphere => $hemisphere,
);
$template->param(
"numberpattern$subs->{numberpattern}" => 1,
"periodicity$subs->{periodicity}" => 1,
"arrival$subs->{dow}" => 1,
intranetstylesheet => C4::Context->preference("intranetstylesheet"),

View File

@ -37,7 +37,7 @@ my $dbh = C4::Context->dbh;
my $op = $query->param('op');
my $subscriptionid = $query->param('subscriptionid');
my $done = 0; # for after form has been submitted
my ($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "bull/subscription-renew.tmpl",
query => $query,
@ -48,6 +48,7 @@ my ($template, $loggedinuser, $cookie)
});
if ($op eq "renew") {
subscriptionrenew($subscriptionid,$loggedinuser,$query->param('startdate'),$query->param('numberlength'),$query->param('weeklength'),$query->param('monthlength'),$query->param('note'));
$done = 1;
}
my $subscription= getsubscription($subscriptionid);
@ -59,6 +60,7 @@ $template->param(startdate => format_date(subscriptionexpirationdate($subscripti
subscriptionid => $subscriptionid,
bibliotitle => $subscription->{bibliotitle},
$op => 1,
done => $done,
intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
intranetstylesheet => C4::Context->preference("intranetstylesheet"),
IntranetNav => C4::Context->preference("IntranetNav"),

View File

@ -1,68 +1,86 @@
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Serials Subscriptions<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscriptions <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!-- TMPL_INCLUDE NAME="masthead.inc" -->
<!-- TMPL_INCLUDE NAME="serials-topmenu.inc" -->
<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
<!--------------------------MAIN BODY OF PAGE-------------------------->
<div id="main">
<form action="bull-home.pl" method="post">
<table>
<caption>Serials Subscriptions</caption>
<h1 class="bull">Serials Management</h1>
<!-- TMPL_IF NAME="routing" -->
<h3 class="bull">Search for Serial Routing List</h3>
<!-- /TMPL_IF -->
<p>
<form action="bull-home.pl" method="post">
<input type="hidden" name="routing" value="<!-- TMPL_VAR
NAME="routing" -->" />
<input type="hidden" name="searched" value="1" />
Title: <input type="text" size=20 maxlength=40 name="title" value="<!-- TMPL_VAR name="title" -->"> or ISSN: <input type="text" size=11 maxlength=11 name="ISSN" value="<!-- TMPL_VAR name="ISSN" -->">
<input type="submit" value="Search" class="button">
</p>
<!-- TMPL_IF name="subscriptions" -->
<table cellpadding="0" cellspacing="0" border="0" class="collapse">
<tr>
<th>ISSN</th>
<th>Title</th>
<th>
Note
</td>
<th colspan="2">&nbsp;</th>
</tr>
<tr>
<td>
<input type="text" size="10" maxlength="11" name="ISSN" value="<!-- TMPL_VAR name="ISSN" -->" title="type ISSN here to filter subscription" />
</td>
<td>
<input type="text" size="40" maxlength="40" name="title" value="<!-- TMPL_VAR name="title" -->" title="type a title -complete or partial- to filter subscription" />
</td>
<td>
&nbsp;
</td>
<td colspan="2">
<input type="submit" value="Filter" class="submit" title="set a filter on ISSN / title" />
</td>
<th class="cell-header">Title</th>
<th class="cell-header">ISSN</th>
<th class="cell-header"
<!-- TMPL_IF NAME="routing" -->
<!-- TMPL_ELSE -->
colspan="2"
<!-- /TMPL_IF -->
>&nbsp;</th>
</tr>
<!-- TMPL_LOOP name="subscriptions" -->
<!-- TMPL_IF name="toggle" -->
<tr class="highlight">
<!-- TMPL_ELSE -->
<tr>
<!-- /TMPL_IF -->
<td>
<!-- TMPL_IF name="ISSN" -->
<a href="bull/serial-issues.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" title="Issues history"><!-- TMPL_VAR name="ISSN" --></a>
<!-- /TMPL_IF -->
<tr>
<td class="cell">
<!-- TMPL_VAR name="title" --> <!-- TMPL_IF name="notes" -->(<!-- TMPL_VAR name="notes" -->)<!-- /TMPL_IF -->
</td>
<td>
<!-- TMPL_IF name="title" -->
<!-- TMPL_VAR name="title" -->
<!-- TMPL_ELSE -->
|
<!-- /TMPL_IF -->
<td class="cell">
<!-- TMPL_VAR name="ISSN" -->
</td>
<td>
<!-- TMPL_IF name="notes" -->(<!-- TMPL_VAR name="notes" -->)<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="routing" -->
<td class="cell">
<a
href="bull/routing.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid"
--><!-- TMPL_UNLESS NAME="routingedit" -->&op=new<!-- /TMPL_UNLESS -->">Routing List</a>
</td>
<!-- TMPL_ELSE -->
<td class="cell">
<a href="bull/subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Detail</a>
</td>
<td>
<a href="bull/subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" title="subscription detail">Detail</a>
</td>
<td>
<a href="bull/statecollection.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" title="receive issues for this subscription">Receive</a>
<td class="cell">
<a href="bull/statecollection.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Receive</a>
</td>
<!-- /TMPL_IF -->
</tr>
<!-- /TMPL_LOOP -->
</table>
</form>
<p><form action="/cgi-bin/koha/bull/subscription-add.pl" method="get"><input type="submit" value="Add Subscription" class="submit" /></form></p>
<!-- TMPL_ELSE -->
<!-- TMPL_IF NAME="done_searched" -->
<p><b>Item not in subscriptions yet - please click 'Add a Subscription'</b></p>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
<br />
<!-- TMPL_IF NAME="routing" -->
<!-- TMPL_ELSE -->
<p>Search for serials subscriptions first before adding a new one.</p>
<p>
<a href="/cgi-bin/koha/bull/subscription-add.pl" class="button bull">Add subscription</a>
</p>
<h4 class="bull">
Notes:
</h4>
<ul>
<li>
The serials subscriptions module allows you to manage subscription arrivals and scheduling.
</li>
<li>
<b>Before</b> each item can be issued, it must be entered into Koha through the Acquisitions process.
</li>
</ul>
<!-- /TMPL_IF -->
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

View File

@ -4,7 +4,7 @@
<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
<div id="main">
<!-- TMPL_IF NAME="lateissues" -->
<h1>Late issues</h1>
<div class="details">
<form action="lateissues.pl" method="post">
@ -13,11 +13,13 @@
<!-- TMPL_IF name="booksellerfax" -->Fax: <!-- TMPL_VAR name="booksellerfax" -->; <!-- /TMPL_IF -->
<!-- TMPL_IF name="contemail" --><a href="mailto:<!-- TMPL_VAR name="contemail" -->"><!-- TMPL_VAR name="contemail" --></a><!-- /TMPL_IF -->
<input type="submit" value="Submit" class="submit" />
<a href="lateissues-excel.pl?supplierid=<!--TMPL_VAR NAME="supplierid"-->">Export Data</a>
</form>
</div>
<table>
<tr>
<th>Title</th>
<th>Supplier</th>
<th>Title</th>
<th>Issue number</th>
<th>Late since</th>
<th colspan="2">&nbsp;</th>
@ -28,6 +30,7 @@
<!-- TMPL_ELSE -->
<tr class="highlight">
<!-- /TMPL_IF -->
<td><!-- TMPL_VAR name="name" --></td>
<td><!-- TMPL_IF name="Title" --><a href="/cgi-bin/koha/bull/subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->"><!-- TMPL_VAR name="Title" --></a><!-- /TMPL_IF --></td>
<td><!-- TMPL_VAR name="serialseq" --></td>
<td><!-- TMPL_VAR name="planneddate" --></td>
@ -38,7 +41,43 @@
</tr>
<!-- /TMPL_LOOP -->
</table>
</div>
<!-- TMPL_ELSE -->
<p>There are currently no outstanding issues.</p>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="missingissues" -->
<h1>Missing Issues</h1>
<table>
<tr>
<th>Supplier</th>
<th>Title</th>
<th>Issue number</th>
<th>Missing since</th>
<th>&nbsp;</th>
</tr>
<!-- TMPL_LOOP name="missingissues" -->
<tr>
<td>
<!-- TMPL_VAR name="name" -->
</td>
<td>
<!-- TMPL_VAR name="Title" -->
</td>
<td>
<!-- TMPL_VAR name="serialseq" -->
</td>
<td>
<!-- TMPL_VAR name="planneddate" -->
</td>
<td>
<a href="statecollection.pl?op=found&amp;planneddate=<!-- TMPL_VAR name="planneddate" -->&amp;missingissue=<!-- TMPL_VAR name="serialseq" -->&amp;subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Recieve</a>
</td>
</tr>
<!-- /TMPL_LOOP -->
</table>
<!-- /TMPL_IF -->
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

View File

@ -18,6 +18,12 @@
<input type="hidden" name="bib" value="<!-- TMPL_VAR name="biblionumber" -->" />
<input class="submit" type="submit" title="go to <!-- TMPL_VAR name="bibliotitle" -->" value="View Biblio Record" /></form>
<!-- TMPL_IF NAME="routing" -->
<form class="inline" method="get" action="/cgi-bin/koha/bull/routing.pl">
<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
<input class="submit" type="submit" title="Routing list" value="Routing List" /></form>
<!-- /TMPL_IF -->
<form method="post" name="f" action="statecollection.pl">
<input type="hidden" name="op" value="serialchangestatus" />
<input type="hidden" name="serial" value="<!-- TMPL_VAR name="serial" -->" />
@ -127,7 +133,7 @@
<!-- TMPL_UNLESS name="hassubscriptionexpired" -->
<tr><th scope="row"><label for="manual-serialseq">Numbered:</label> </th>
<td>
<input type="text" id="manual-serialseq" name="serialseq" size="30" maxlength="100" />
<input type="text" id="manual-serialseq" name="serialseq" size="30" maxlength="100" value="<!-- TMPL_VAR NAME="missingseq" -->" />
</td>
</tr>
<tr>
@ -136,15 +142,24 @@
</tr>
<tr><th scope="row"><label for="manual-planneddate">Expected On: </label></th>
<td>
<input type="text" id="manual-planneddate" name="planneddate" size="10" maxlength="15" />
<input type="text" id="manual-planneddate" name="planneddate" size="10" maxlength="15" value="<!-- TMPL_VAR NAME="missingdate" -->" />
</td></tr>
<tr><th scope="row"><label for="manual-status">Status:</label> </th>
<td>
<input type="hidden" id="serialid" name="serialid" value="0" />
<select id="manual-status" name="status" size="1">
<!-- TMPL_IF NAME="frommissing" -->
<input type="hidden" id="serialid" name="serialid" value="<!-- TMPL_VAR name="missingid" -->">
<!-- TMPL_ELSE -->
<input type="hidden" id="serialid" name="serialid" value="0">
<!--/TMPL_IF-->
<select id="manual-status" name="status" size="1">
<!-- TMPL_IF NAME="frommissing" -->
<option value="2" selected >Arrived</option>
<!-- TMPL_ELSE -->
<option value="2">Arrived</option>
<option value="3" selected>Late</option>
<option value="4">Missing</option>
<!-- /TMPL_IF -->
</select>
</td>
</tr>
@ -191,6 +206,15 @@
<!-- TMPL_IF name="hassubscriptionexpired" -->
<p>Subscription has expired. Last waiting issue status can't be changed. <a href="#" onclick="popup()">Renew</a> your subscription</p>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="abouttoexpire" -->
<h3>Note: Subscription is about to expire next issue.</h3>
<script type="text/javascript">
<!--
alert("Subscription is about to expire next issue");
//-->
</script>
<!-- /TMPL_IF -->
</form></div><br>
<div class="data"><form method="post" name="f" action="statecollection.pl">

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,143 @@
<!-- TMPL_INCLUDE NAME="serials-topmenu.inc" -->
<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
<script type="text/javascript" language="javascript">
<!--
// the english words used in display purposes
var text = new Array('Number','Volume','Issue','Month','Week','Starting with:','Rollover at:','Choose Hemisphere:','Northern','Southern',
'Autumn','Winter','Spring','Summer','Fall','Season','Year');
// common pre defined number patterns
function num_pattern() {
var patternchoice = '<!--TMPL_VAR NAME='numberpattern'-->';
switch(patternchoice){
case "2":
options(text[1],text[0],text[2]);
irregularity();
display_table(0);
break;
case "3":
options(text[1],text[0]);
irregularity();
display_table(0);
break;
case "4":
options(text[1],text[2]);
irregularity();
display_table(0);
break;
case "5":
options(text[0],text[2]);
irregularity();
display_table(0);
break;
case "6":
var d = new Date();
var sYear = d.getFullYear();
// options_seasons(text[15],sYear);
irregularity();
is_season = 1;
display_table(0);
break;
case "7":
display_table(1);
irregularity();
break;
case "8":
options(text[16],text[3]);
irregularity();
is_month = 1;
display_table(0);
break;
default:
options(text[0]);
irregularity();
display_table(0);
break;
}
}
function display_table(n) {
if(n==1){
document.getElementById("basetable").style.display = 'block';
} else {
document.getElementById("basetable").style.display = 'none';
}
}
// to dispaly the options section
function options(x,y,z){
var textbox = '';
// alert("X: "+x+"Y: "+y+"Z: "+z);
if(x){
document.f.xfield.value = x;
if(y){
document.f.yfield.value = y;
if(z){
document.f.zfield.value = z;
}
}
}
}
function irregularity(){
var periodicity = '<!-- TMPL_VAR NAME="periodicity"-->';
switch(periodicity){
case "1":
var names = new Array('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday');
break;
case "2":
<!-- TMPL_IF NAME="weekarrayjs" -->
var names = new Array(<!-- TMPL_VAR NAME="weekarrayjs" -->);
<!-- /TMPL_IF -->
break;
case "3":
<!-- TMPL_IF NAME="weekarrayjs" -->
var names = new Array(<!-- TMPL_VAR NAME="weekarrayjs" -->);
<!-- /TMPL_IF -->
break;
case "4":
<!-- TMPL_IF NAME="weekarrayjs" -->
var names = new Array(<!-- TMPL_VAR NAME="weekarrayjs" -->);
<!-- /TMPL_IF -->
break;
case "5":
var names = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
break;
case "6":
var names = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
break;
case "7":
var names = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
break;
case "8":
var names = new Array('Autumn','Winter','Spring','Summer','Fall');
break;
case "9":
var names = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
break;
case "10":
expected =1;
break;
default:
break;
}
<!-- TMPL_IF NAME="irregularity" -->
var irregular = '<!-- TMPL_VAR NAME="irregularity" -->';
var irregarray = irregular.split('|');
var irregtext = '<p>';
for(var i=0;i<irregarray.length;i++){
irregtext += names[i]+' &nbsp;';
}
irregtext += '</p>';
document.getElementById("irreg").innerHTML = irregtext;
<!-- /TMPL_IF -->
}
-->
</script>
<div id="main">
<h1>Subscription Details: <!-- TMPL_VAR name="bibliotitle" --></h1>
<form class="inline" method="get" action="subscription-add.pl">
@ -26,6 +163,15 @@
<input type="hidden" name="bib" value="<!-- TMPL_VAR name="biblionumber" -->" />
<input type="submit" class="submit" title="go to <!-- TMPL_VAR name="bibliotitle" -->" value="View Biblio Record" /></form>
<form class="inline" method="get" action="/cgi-bin/koha/bull/routing.pl">
<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
<!-- TMPL_IF NAME="routing" -->
<input type="submit" class="submit" title="Edit Routing List" value="Edit Routing List" />
<!-- TMPL_ELSE -->
<input type="hidden" name="op" value="new" />
<input type="submit" class="submit" title="Create Routing List" value="Create Routing List" />
<!-- /TMPL_IF -->
<form class="inline"><input type="submit" class="cancel" value="Delete Subscription" onclick="confirm_deletion(); return false;" /></form>
<div class="data">
@ -39,6 +185,7 @@
</div>
<div class="data">
<form name="f">
<table> <caption>Planning</caption>
<tr><th scope="row">Beginnning date:</th><td> <!-- TMPL_VAR name="startdate" --></td></tr>
<tr><th scope="row">Frequency (*):</th><td>
@ -76,6 +223,31 @@
1/2 Years
<!-- /TMPL_IF -->
</td></tr>
<tr><th scope="row">Number Pattern:</th><td>
<!-- TMPL_IF name="numberpattern1" -->
Number
<!-- /TMPL_IF -->
<!-- TMPL_IF name="numberpattern2" -->
Volume, Number, Issue
<!-- /TMPL_IF -->
<!-- TMPL_IF name="numberpattern3" -->
Volume, Number
<!-- /TMPL_IF -->
<!-- TMPL_IF name="numberpattern4" -->
Volume, Issue
<!-- /TMPL_IF -->
<!-- TMPL_IF name="numberpattern5" -->
Number, Issue
<!-- /TMPL_IF -->
<!-- TMPL_IF name="numberpattern6" -->
Seasonal only
<!-- /TMPL_IF -->
<!-- TMPL_IF name="numberpattern7" -->
None of the above
<!-- /TMPL_IF -->
</td></tr>
<tr><th scope="row">Arrives on:</th><td>
<!--TMPL_IF name="arrival1" -->
Monday
@ -99,6 +271,56 @@
Sunday
<!-- /TMPL_IF --></table>
</div>
<table>
<tr><td>&nbsp;</td>
<td align="right"><input type="text" name="xfield" style="border:0px solid #FFFFFF; text-align:center;"></td>
<!--TMPL_IF NAME="lastvalue2"-->
<td align="right"><input type="text" name="yfield" style="border:0px solid #FFFFFF; text-align:center;"></td>
<!--/TMPL_IF-->
<!--TMPL_IF NAME="lastvalue3"-->
<td align="right"><input type="text" name="zfield" style="border:0px solid #FFFFFF; text-align:center;"></td>
<!--/TMPL_IF-->
</tr>
<tr><td>Starting with:</td>
<td align="center"><!--TMPL_VAR NAME="lastvalue1"--></td>
<!--TMPL_IF NAME="lastvalue2"-->
<td align="center">&nbsp;
<!--TMPL_VAR NAME="lastvalue2"-->
</td>
<!--/TMPL_IF-->
<!--TMPL_IF NAME="lastvalue3"-->
<td align="center">&nbsp;
<!--TMPL_VAR NAME="lastvalue3"-->
</td>
<!--/TMPL_IF-->
</tr>
<tr><td>Rollover:</td>
<td align="center">&nbsp;</td>
<!--TMPL_IF NAME="whenmorethan2"-->
<td align="center">&nbsp;
<!--TMPL_VAR NAME="whenmorethan2"-->
</td>
<!--/TMPL_IF-->
<!--TMPL_IF NAME="whenmorethan3"-->
<td align="center">&nbsp;
<!--TMPL_VAR NAME="whenmorethan3"-->
</td>
<!--/TMPL_IF-->
</tr>
</table>
<!-- TMPL_IF NAME="irregularity" -->
<p>Irregularity:
<div id="irreg"></div>
</p>
<!-- /TMPL_IF -->
<p>Begins on:</label>
<!--TMPL_VAR name="startdate" -->
</p>
</form>
<div class="data">
<table> <caption>Subscription length</caption>
<tr><th scope="row">Number of issues:</th><td><!-- TMPL_VAR name="numberlength" --></td></tr>
@ -106,7 +328,7 @@
<tr><th scope="row">Number of months:</th><td><!-- TMPL_VAR name="monthlength" --></td></tr></table>
</div>
<div class="data">
<div class="data" id="basetable">
<h2>Numbering calculation</h2>
<table><caption>Numbering formula: <!-- TMPL_VAR name="numberingmethod" --></caption>
@ -213,5 +435,6 @@ function confirm_deletion() {
window.location="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->&op=del";
}
}
window.onload = num_pattern();
</script>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

View File

@ -1,9 +1,11 @@
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Subscription Renewal for <!-- TMPL_VAR name="bibliotitle" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<div id="main-compact">
<!-- TMPL_INCLUDE NAME="popup-top.inc" -->
<div id="main">
<h1>Subscription Renewal for <!-- TMPL_VAR name="bibliotitle" --></h1>
<form name="f" method="post" action="subscription-renew.pl">
<input type="hidden" name="op" value="renew">
<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->">
<div class="data">
<table><tr><th><label>Start Date: </label></th><td><input type="text" name="startdate" value="<!-- TMPL_VAR name="startdate" -->" /><input type="hidden" name="op" value="renew" /><input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" /></td></tr></table>
@ -17,5 +19,14 @@
</div>
</form>
</div>
<!-- TMPL_IF NAME="done" -->
<script type="text/javascript">
<!--
opener.document.location.reload();
self.close();
//-->
</script>
<!-- /TMPL_IF -->
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

View File

@ -1 +1,3 @@
<div id="topmenu"><a href="/cgi-bin/koha/bull-home.pl">Serials Home</a> | <a href="/cgi-bin/koha/bull/subscription-add.pl">Add Subscription</a> | <a href="/cgi-bin/koha/bull/lateissues.pl">Late Issues</a></div>
<div id="topmenu"><a href="/cgi-bin/koha/bull-home.pl">Serials Home</a> | <a href="/cgi-bin/koha/bull/subscription-add.pl">Add Subscription</a> | <a href="/cgi-bin/koha/bull/lateissues.pl">Late Issues</a>
| <a href="/cgi-bin/koha/bull-home.pl?routing=1">Create/Edit Routing
List</a> | <a href="/cgi-bin/koha/bull/claims.pl">Claims</a></div>

View File

@ -320,6 +320,8 @@ my %requiretables = (
status tinyint(4) NOT NULL default '0',
planneddate date NOT NULL default '0000-00-00',
publishedddate date NOT NULL default '0000-00-00',
routingnotes text,
claimdate date default NULL,
PRIMARY KEY (serialid)
)",
subscription => "(biblionumber int(11) NOT NULL default '0',
@ -333,7 +335,10 @@ my %requiretables = (
monthlength tinyint(4) default '0',
numberlength tinyint(4) default '0',
periodicity tinyint(4) default '0',
firstacquidate date default '0000-00-00',
dow varchar(100) default '',
numberpattern int(4) default '0',
irregularity varchar(255) default NULL,
numberingmethod varchar(100) default '',
notes text,
status varchar(100) NOT NULL default '',
@ -355,6 +360,8 @@ my %requiretables = (
whenmorethan3 int(11) default 0,
setto3 int(11),
lastvalue3 int(11),
hemisphere int(1) default '1',
callnumber varchar(100) default NULL,
PRIMARY KEY (subscriptionid)
)",
subscriptionhistory => "(biblionumber int(11) NOT NULL default '0',
@ -368,6 +375,13 @@ my %requiretables = (
PRIMARY KEY (subscriptionid),
KEY biblionumber (biblionumber)
)",
subscriptionroutinglist => "(routingid int(11) NOT NULL default null auto_increment,
subscriptionid int(11) NOT NULL default '0',
borrowernumber int(11) NOT NULL default '0',
ranking int(11) NOT NULL default '0',
numberpattern varchar(100) default null,
PRIMARY KEY (routingid)
)",
labels => "(labelid int(11) NOT NULL auto_increment,
itemnumber varchar(100) NOT NULL default '',
timestamp timestamp(14) NOT NULL,
@ -1373,6 +1387,19 @@ my %tabledata = (
'If set, a new item will be automatically added when receiving an issue',
type => 'YesNo',
},
{
uniquefieldrequired => 'variable',
variable => 'RoutingSerials',
value => '0',
forceupdate => {
'explanation' => 1,
'
type' => 1
},
explanation =>
'If set, you will have access to routing serials',
type => 'YesNo',
},
{
uniquefieldrequired => 'variable',
variable => 'advancedMARCeditor',
@ -2193,6 +2220,9 @@ $sth->finish;
exit;
# $Log$
# Revision 1.100.2.55 2006/11/24 00:23:22 bob_lyon
# Adding in the updated files for the routing serials
#
# Revision 1.100.2.54 2006/08/31 14:37:04 tipaul
# fix for :
# http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1140