Adding in new files for the routing serials first

This commit is contained in:
bob_lyon 2006-11-24 00:18:05 +00:00
parent 52413b48cb
commit eb46aa718a
12 changed files with 1093 additions and 0 deletions

84
bull/claims.pl Executable file
View File

@ -0,0 +1,84 @@
#!/usr/bin/perl
use strict;
use CGI;
use C4::Auth;
use C4::Bull;
use C4::Acquisition;
use C4::Output;
use C4::Interface::CGI::Output;
use C4::Context;
use HTML::Template;
use Data::Dumper;
my $query = new CGI;
my $serialid = $query->param('serialid');
my $op = $query->param('op');
my $claimletter = $query->param('claimletter');
my $supplierid = $query->param('supplierid');
my %supplierlist = getSupplierListWithLateIssues;
my @select_supplier;
foreach my $supplierid (keys %supplierlist){
my ($count, @dummy) = GetMissingIssues($supplierid);
my $counting = $count;
$supplierlist{$supplierid} = $supplierlist{$supplierid}." ($counting)";
push @select_supplier, $supplierid
}
my @select_letter = (1,2,3,4);
my %letters = (1=>'Claim Form 1',2=>'Claim Form 2',3=>'Claim Form 3',4=>'Claim Form 4');
my ($count2, @missingissues) = GetMissingIssues($supplierid,$serialid);
my $CGIsupplier=CGI::scrolling_list( -name => 'supplierid',
-values => \@select_supplier,
-default => $supplierid,
-labels => \%supplierlist,
-size => 1,
-multiple => 0 );
my $CGIletter=CGI::scrolling_list( -name => 'claimletter',
-values => \@select_letter,
-default => $claimletter,
-labels => \%letters,
-size => 1,
-multiple => 0 );
my ($singlesupplier,@supplierinfo);
if($supplierid){
($singlesupplier,@supplierinfo)=bookseller($supplierid);
} else { # set up supplierid for the claim links out of main table if all suppliers is chosen
for(my $i=0; $i<@missingissues;$i++){
$missingissues[$i]->{'supplierid'} = getsupplierbyserialid($missingissues[$i]->{'serialid'});
}
}
warn Dumper(\@missingissues);
my $preview=0;
if($op eq 'preview'){
$preview = 1;
}
my ($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "bull/claims.tmpl",
query => $query,
type => "intranet",
authnotrequired => 0,
flagsrequired => {catalogue => 1},
debug => 1,
});
$template->param(
CGIsupplier => $CGIsupplier,
CGIletter => $CGIletter,
preview => $preview,
missingissues => \@missingissues,
supplierid => $supplierid,
claimletter => $claimletter,
singlesupplier => $singlesupplier,
supplierloop => \@supplierinfo,
intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
intranetstylesheet => C4::Context->preference("intranetstylesheet"),
IntranetNav => C4::Context->preference("IntranetNav"),
);
output_html_with_http_headers $query, $cookie, $template->output;

121
bull/lateissues-excel.pl Executable file
View File

@ -0,0 +1,121 @@
#!/usr/bin/perl
use strict;
use CGI;
use C4::Auth;
use C4::Bull;
use C4::Acquisition;
use C4::Output;
use C4::Interface::CGI::Output;
use C4::Context;
use HTML::Template;
# use Date::Manip;
use Text::CSV_XS;
use Data::Dumper;
# &Date_Init("DateFormat=non-US"); # set non-USA date, eg:19/08/2005
my $csv = Text::CSV_XS->new(
{
'quote_char' => '"',
'escape_char' => '"',
'sep_char' => ',',
'binary' => 1
}
);
my $query = new CGI;
my $supplierid = $query->param('supplierid');
my @serialid = $query->param('serialid');
my $op = $query->param('op');
my $serialidcount = @serialid;
warn "Chosen: ".Dumper(\@serialid);
my %supplierlist = getSupplierListWithLateIssues;
my @select_supplier;
my @loop1;
my ($count, @lateissues);
if($op ne 'claims'){
($count, @lateissues) = GetLateIssues($supplierid);
for (my $i=0;$i<@lateissues;$i++){
my @rows1 = ($lateissues[$i]->{'name'}, # lets build up a row
$lateissues[$i]->{'title'},
$lateissues[$i]->{'serialseq'},
$lateissues[$i]->{'planneddate'},
);
push (@loop1, \@rows1);
}
}
my $totalcount2 = 0;
my @loop2;
my ($count2, @missingissues);
for (my $k=0;$k<@serialid;$k++){
($count2, @missingissues) = GetMissingIssues($supplierid, $serialid[$k]);
for (my $j=0;$j<@missingissues;$j++){
my @rows2 = ($missingissues[$j]->{'name'}, # lets build up a row
$missingissues[$j]->{'title'},
$missingissues[$j]->{'serialseq'},
$missingissues[$j]->{'planneddate'},
);
push (@loop2, \@rows2);
}
$totalcount2 = $totalcount2 + $count2;
# update claim date to let one know they have looked at this missing item
updateClaim($serialid[$k]);
}
my $heading ='';
my $filename ='';
if($supplierid){
if($missingissues[0]->{'name'}){ # if exists display supplier name in heading for neatness
# not necessarily needed as the name will appear in supplier column also
$heading = "FOR $missingissues[0]->{'name'}";
$filename = "_$missingissues[0]->{'name'}";
}
}
print $query->header(
-type => 'application/vnd.ms-excel',
-attachment => "claims".$filename.".csv",
);
if($op ne 'claims'){
print "LATE ISSUES ".$heading."\n\n";
print "SUPPLIER,TITLE,ISSUE NUMBER,LATE SINCE\n";
for my $row ( @loop1 ) {
$csv->combine(@$row);
my $string = $csv->string;
print $string, "\n";
}
print ",,,,,,,\n\n";
}
if($serialidcount == 1){
print "MISSING ISSUE ".$heading."\n\n";
} else {
print "MISSING ISSUES ".$heading."\n\n";
}
print "SUPPLIER,TITLE,ISSUE NUMBER,LATE SINCE\n";
for my $row ( @loop2 ) {
$csv->combine(@$row);
my $string = $csv->string;
print $string, "\n";
}
print ",,,,,,,\n";
print ",,,,,,,\n";
if($op ne 'claims'){
print ",,Total Number Late, $count\n";
}
if($serialidcount == 1){
} else {
print ",,Total Number Missing, $totalcount2\n";
}

51
bull/member-search.pl Executable file
View File

@ -0,0 +1,51 @@
#!/usr/bin/perl
# Member Search.pl script used to search for members to add to a routing list
use strict;
use CGI;
use C4::Koha;
use C4::Auth;
use C4::Date;
use C4::Output;
use C4::Acquisition;
use C4::Interface::CGI::Output;
use C4::Context;
use HTML::Template;
use C4::Search;
use C4::Bull;
use Data::Dumper;
my $query = new CGI;
my $subscriptionid = $query->param('subscriptionid');
my $op = $query->param('op');
my $searchstring = $query->param('member');
my $dbh = C4::Context->dbh;
my $env;
my ($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "bull/member-search.tmpl",
query => $query,
type => "intranet",
authnotrequired => 0,
flagsrequired => {catalogue => 1},
debug => 1,
});
if($searchstring){
my ($count, $members) = &BornameSearch($env, $searchstring, "surname", "advanced");
warn Dumper($count);
warn Dumper($members);
$template->param(
subscriptionid => $subscriptionid,
memberloop => $members,
member => $searchstring,
);
} else {
$template->param(
subscriptionid => $subscriptionid,
);
}
output_html_with_http_headers $query, $cookie, $template->output;

29
bull/reorder_members.pl Executable file
View File

@ -0,0 +1,29 @@
#!/usr/bin/perl
# Routing.pl script used to create a routing list for a serial subscription
# In this instance it is in fact a setting up of a list of reserves for the item
# where the hierarchical order can be changed on the fly and a routing list can be
# printed out
use strict;
use CGI;
use C4::Koha;
use C4::Auth;
use C4::Date;
use C4::Output;
use C4::Acquisition;
use C4::Interface::CGI::Output;
use C4::Context;
use HTML::Template;
use C4::Search;
use C4::Bull;
use Data::Dumper;
my $query = new CGI;
my $subscriptionid = $query->param('subscriptionid');
my $routingid = $query->param('routingid');
my $rank = $query->param('rank');
reorder_members($subscriptionid,$routingid,$rank);
print $query->redirect("/cgi-bin/koha/bull/routing.pl?subscriptionid=$subscriptionid");

123
bull/routing-preview.pl Executable file
View File

@ -0,0 +1,123 @@
#!/usr/bin/perl
# Routing Preview.pl script used to view a routing list after creation
# lets one print out routing slip and create (in this instance) the heirarchy
# of reserves for the serial
use strict;
use CGI;
use C4::Koha;
use C4::Auth;
use C4::Date;
use C4::Output;
use C4::Acquisition;
use C4::Reserves2;
use C4::Circulation::Circ2;
use C4::Interface::CGI::Output;
use C4::Context;
use HTML::Template;
use C4::Search;
use C4::Bull;
use Data::Dumper;
my $query = new CGI;
my $subscriptionid = $query->param('subscriptionid');
my $issue = $query->param('issue');
my $routingid;
my $ok = $query->param('ok');
my $edit = $query->param('edit');
my $delete = $query->param('delete');
my $dbh = C4::Context->dbh;
if($delete){
delroutingmember($routingid,$subscriptionid);
my $sth = $dbh->prepare("UPDATE serial SET routingnotes = NULL WHERE subscriptionid = ?");
$sth->execute($subscriptionid);
print $query->redirect("routing.pl?subscriptionid=$subscriptionid&op=new");
}
if($edit){
print $query->redirect("routing.pl?subscriptionid=$subscriptionid");
}
my ($routing, @routinglist) = getroutinglist($subscriptionid);
my $subs = getsubscription($subscriptionid);
my ($count,@serials) = getserials($subscriptionid);
my ($template, $loggedinuser, $cookie);
if($ok){
my $env;
# get biblio information....
my $biblio = $subs->{'biblionumber'};
# get existing reserves .....
my ($count,$reserves) = FindReserves($biblio);
my $totalcount = $count;
foreach my $res (@$reserves) {
if ($res->{'found'} eq 'W') {
$count--;
}
}
my ($count2,@bibitems) = bibitems($biblio);
my @itemresults = ItemInfo($env, $subs->{'biblionumber'}, 'intra');
my $branch = $itemresults[0]->{'holdingbranch'};
my $const = 'o';
my $notes;
my $title = $subs->{'bibliotitle'};
for(my $i=0;$i<$routing;$i++){
my $sth = $dbh->prepare("SELECT * FROM reserves WHERE biblionumber = ? AND borrowernumber = ?
AND cancellationdate is NULL AND (found <> 'F' or found is NULL)");
$sth->execute($biblio,$routinglist[$i]->{'borrowernumber'});
my $data = $sth->fetchrow_hashref;
# warn Dumper($data);
# warn "$routinglist[$i]->{'borrowernumber'} is the same as $data->{'borrowernumber'}";
if($routinglist[$i]->{'borrowernumber'} == $data->{'borrowernumber'}){
UpdateReserve($routinglist[$i]->{'ranking'},$biblio,$routinglist[$i]->{'borrowernumber'},$branch);
} else {
CreateReserve(\$env,$branch,$routinglist[$i]->{'borrowernumber'},$biblio,$const,\@bibitems,$routinglist[$i]->{'ranking'},$notes,$title);
}
}
($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "bull/routing-preview-slip.tmpl",
query => $query,
type => "intranet",
authnotrequired => 0,
flagsrequired => {catalogue => 1},
debug => 1,
});
} else {
($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "bull/routing-preview.tmpl",
query => $query,
type => "intranet",
authnotrequired => 0,
flagsrequired => {catalogue => 1},
debug => 1,
});
}
# my $firstdate = "$serials[0]->{'serialseq'} ($serials[0]->{'planneddate'})";
my @results;
my $data;
for(my $i=0;$i<$routing;$i++){
$data=borrdata('',$routinglist[$i]->{'borrowernumber'});
$data->{'location'}=$data->{'streetaddress'};
$data->{'name'}="$data->{'firstname'} $data->{'surname'}";
$data->{'routingid'}=$routinglist[$i]->{'routingid'};
$data->{'subscriptionid'}=$subscriptionid;
push(@results, $data);
}
my $routingnotes = $serials[0]->{'routingnotes'};
$routingnotes =~ s/\n/\<br \/\>/g;
$template->param(
title => $subs->{'bibliotitle'},
issue => $issue,
subscriptionid => $subscriptionid,
memberloop => \@results,
routingnotes => $routingnotes,
);
output_html_with_http_headers $query, $cookie, $template->output;

205
bull/routing-reserves.pl Executable file
View File

@ -0,0 +1,205 @@
#!/usr/bin/perl
# script to place the hierarchy of reserves onto serial
# Copyright 2000-2002 Katipo Communications
#
# This file is part of Koha.
#
# Koha is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
use strict;
use C4::Search;
use C4::Output;
use C4::Interface::CGI::Output;
use C4::Auth;
use C4::Reserves2;
use C4::Biblio;
use C4::Koha;
use C4::Circulation::Circ2;
use HTML::Template;
use C4::Acquisition;
use CGI;
use C4::Date;
my $input = new CGI;
# get biblio information....
my $bib = $input->param('bib');
my $dat = bibdata($bib);
# get existing reserves .....
my ($count,$reserves) = FindReserves($bib);
my $totalcount = $count;
foreach my $res (@$reserves) {
if ($res->{'found'} eq 'W') {
$count--;
}
}
# make priorities options
my $num = $count + 1;
#priorityoptions building
my @optionloop;
for (my $i=1; $i<=$num; $i++){
my %option;
$option{num}=$i;
$option{selected}=($i==$num);
push(@optionloop, \%option);
}
# todays date
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =localtime(time);
$year=$year+1900;
$mon++;
my $date=format_date("$year-$mon-$mday");
# get biblioitem information and build rows for form
my ($count2,@data) = bibitems($bib);
my @bibitemloop;
foreach my $dat (sort {$b->{'dateaccessioned'} cmp $a->{'dateaccessioned'}} @data) {
$dat->{'dewey'}="" if ($dat->{'dewey'} == 0);
$dat->{'volumeddesc'} = "&nbsp;" unless $dat->{'volumeddesc'};
$dat->{'dewey'}=~ s/\.0000$//;
$dat->{'dewey'}=~ s/00$//;
my %abibitem;
my @barcodeloop;
my @barcodes = barcodes($dat->{'biblioitemnumber'});
foreach my $num (@barcodes) {
my %barcode;
$barcode{'barcode'}=$num->{'barcode'};
$barcode{'message'}=$num->{'itemlost'} == 1 ? "(lost)" :
$num->{'itemlost'} == 2 ? "(long overdue)" : "";
push(@barcodeloop, \%barcode);
}
$abibitem{'barcodeloop'}=\@barcodeloop;
$abibitem{'class'}="$dat->{'classification'}$dat->{'dewey'}$dat->{'subclass'}";
my $select;
$abibitem{'itemlost'}=(($dat->{'notforloan'})|| ($dat->{'itemlost'} == 1)) ;
$abibitem{'biblioitemnumber'}=$dat->{'biblioitemnumber'};
$abibitem{'description'}=$dat->{'description'};
$abibitem{'volumeddesc'}=$dat->{'volumeddesc'};
$abibitem{'publicationyear'}=$dat->{'publicationyear'};
push(@bibitemloop,\%abibitem);
}
#existingreserves building
my @reserveloop;
my $branches = getbranches('IS');
foreach my $res (sort {$a->{'found'} cmp $b->{'found'}} @$reserves){
my %reserve;
# my $prioropt = priorityoptions($totalcount, $res->{'priority'});
my @optionloop;
for (my $i=1; $i<=$totalcount; $i++){
my %option;
$option{num}=$i;
$option{selected}=($i==$res->{'priority'});
push(@optionloop, \%option);
}
my @branchloop;
foreach my $br (keys %$branches) {
# (next) unless $branches->{$br}->{'IS'};
# Only branches with the 'IS' branchrelation
# can issue books
my %abranch;
$abranch{'selected'}=($br eq $res->{'branchcode'});
$abranch{'branch'}=$br;
$abranch{'branchname'}=$branches->{$br}->{'branchname'};
push(@branchloop,\%abranch);
}
if ($res->{'found'} eq 'W') {
my %env;
my $item = $res->{'itemnumber'};
$item = getiteminformation(\%env,$item);
$reserve{'holdingbranch'}=$item->{'holdingbranch'};
$reserve{'barcode'}=$item->{'barcode'};
$reserve{'biblionumber'}=$item->{'biblionumber'};
$reserve{'wbrcode'} = $res->{'branchcode'};
$reserve{'wbrname'} = $branches->{$res->{'branchcode'}}->{'branchname'};
if($reserve{'holdingbranch'} eq $reserve{'wbrcode'}){
$reserve{'atdestination'} = 1;
}
}
$reserve{'date'} = format_date($res->{'reservedate'});
$reserve{'borrowernumber'}=$res->{'borrowernumber'};
$reserve{'biblionumber'}=$res->{'biblionumber'};
$reserve{'bornum'}=$res->{'borrowernumber'};
$reserve{'firstname'}=$res->{'firstname'};
$reserve{'surname'}=$res->{'surname'};
$reserve{'bornum'}=$res->{'borrowernumber'};
$reserve{'notes'}=$res->{'reservenotes'};
$reserve{'wait'}=($res->{'found'} eq 'W');
$reserve{'constrainttypea'}=($res->{'constrainttype'} eq 'a');
$reserve{'constrainttypeo'}=($res->{'constrainttype'} eq 'o');
$reserve{'voldesc'}=$res->{'volumeddesc'};
$reserve{'itemtype'}=$res->{'itemtype'};
$reserve{'branchloop'}=\@branchloop;
$reserve{'optionloop'}=\@optionloop;
push(@reserveloop,\%reserve);
}
my @branches;
# re-uses getbranches('IS') from above (approx line 110)
foreach my $br (keys %$branches) {
my %abranch;
$abranch{'branch'}=$br;
$abranch{'branchname'}=$branches->{$br}->{'branchname'};
push(@branches,\%abranch);
}
# my @select_branch;
# my %select_branches;
# my ($count2,@branches)=branches();
# for (my $i=0;$i<$count2;$i++){
#push @select_branch, $branches[$i]->{'branchcode'};#
#$select_branches{$branches[$i]->{'branchcode'}} = $branches[$i]->{'branchname'};
# }
# my $CGIbranch=CGI::scrolling_list( -name => 'pickup',
#-values => \@select_branch,
#-labels => \%select_branches,
#-size => 1,
#-multiple => 0 );
#get the time for the form name...
my $time = time();
#setup colours
my ($template, $borrowernumber, $cookie)
= get_template_and_user({template_name => "request.tmpl",
query => $input,
type => "intranet",
authnotrequired => 0,
flagsrequired => {parameters => 1},
});
$template->param(optionloop =>\@optionloop,
#CGIbranch => $CGIbranch,
branches => \@branches,
reserveloop => \@reserveloop,
'time' => $time,
bibitemloop => \@bibitemloop,
date => $date,
bib => $bib,
title =>$dat->{title});
# printout the page
print $input->header(
-type => C4::Interface::CGI::Output::guesstype($template->output),
-expires=>'now'
), $template->output;

129
bull/routing.pl Executable file
View File

@ -0,0 +1,129 @@
#!/usr/bin/perl
# Routing.pl script used to create a routing list for a serial subscription
# In this instance it is in fact a setting up of a list of reserves for the item
# where the hierarchical order can be changed on the fly and a routing list can be
# printed out
use strict;
use CGI;
use C4::Koha;
use C4::Auth;
use C4::Date;
use C4::Output;
use C4::Acquisition;
use C4::Interface::CGI::Output;
use C4::Context;
use HTML::Template;
use C4::Search;
use C4::Bull;
use Data::Dumper;
my $query = new CGI;
my $subscriptionid = $query->param('subscriptionid');
my $serialseq = $query->param('serialseq');
my $routingid = $query->param('routingid');
my $bornum = $query->param('bornum');
my $notes = $query->param('notes');
my $op = $query->param('op');
my $date_selected = $query->param('date_selected');
my $dbh = C4::Context->dbh;
if($op eq 'delete'){
delroutingmember($routingid,$subscriptionid);
}
if($op eq 'add'){
addroutingmember($bornum,$subscriptionid);
}
if($op eq 'save'){
my $sth = $dbh->prepare("UPDATE serial SET routingnotes = ? WHERE subscriptionid = ?");
$sth->execute($notes,$subscriptionid);
print $query->redirect("routing-preview.pl?subscriptionid=$subscriptionid&issue=$date_selected");
}
my ($routing, @routinglist) = getroutinglist($subscriptionid);
my $subs = getsubscription($subscriptionid);
my ($count,@serials) = old_getserials($subscriptionid);
my ($serialdates) = getlatestserials($subscriptionid,$count);
use Data::Dumper;
warn "count $count";
warn Dumper($serialdates);
my @dates;
my $i=0;
foreach my $dateseq (@$serialdates) {
$dates[$i]->{'planneddate'} = $dateseq->{'planneddate'};
$dates[$i]->{'serialseq'} = $dateseq->{'serialseq'};
$dates[$i]->{'serialid'} = $dateseq->{'serialid'};
if($date_selected eq $dateseq->{'serialid'}){
$dates[$i]->{'selected'} = ' selected';
} else {
$dates[$i]->{'selected'} = '';
}
$i++;
}
warn Dumper(@dates);
my ($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "bull/routing.tmpl",
query => $query,
type => "intranet",
authnotrequired => 0,
flagsrequired => {catalogue => 1},
debug => 1,
});
# my $date;
# if($serialseq){
# for(my $i = 0;$i<@serials; $i++){
# if($serials[$i]->{'serialseq'} eq $serialseq){
# $date = $serials[$i]->{'planneddate'}
# }
# }
# } else {
# $serialseq = $serials[0]->{'serialseq'};
# $date = $serials[0]->{'planneddate'};
# }
# my $issue = "$serialseq ($date)";
my @results;
my $data;
for(my $i=0;$i<$routing;$i++){
$data=borrdata('',$routinglist[$i]->{'borrowernumber'});
$data->{'location'}=$data->{'streetaddress'};
$data->{'name'}="$data->{'firstname'} $data->{'surname'}";
$data->{'routingid'}=$routinglist[$i]->{'routingid'};
$data->{'subscriptionid'}=$subscriptionid;
my $rankingbox = '<select name="itemrank" onchange="reorder_item('.$subscriptionid.','.$routinglist[$i]->{'routingid'}.',this.options[this.selectedIndex].value)">';
for(my $j=1; $j <= $routing; $j++) {
$rankingbox .= "<option ";
if($routinglist[$i]->{'ranking'} == $j){
$rankingbox .= " selected='SELECTED'";
}
$rankingbox .= " value='$j'>$j</option>";
}
$rankingbox .= "</select>";
$data->{'routingbox'} = $rankingbox;
push(@results, $data);
}
# warn Dumper(@results);
# for adding routing list
my $new;
if ($op eq 'new') {
$new = 1;
} else {
# for modify routing list default
$new => 0;
}
$template->param(
title => $subs->{'bibliotitle'},
subscriptionid => $subscriptionid,
memberloop => \@results,
op => $new,
dates => \@dates,
routingnotes => $serials[0]->{'routingnotes'},
);
output_html_with_http_headers $query, $cookie, $template->output;

View File

@ -0,0 +1,163 @@
<!-- TMPL_UNLESS NAME="preview" -->
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription Claims<!-- TMPL_INCLUDE
NAME="doc-head-close.inc" -->
<!-- TMPL_INCLUDE NAME="masthead.inc" -->
<!-- TMPL_INCLUDE NAME="serials-topmenu.inc" -->
<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
<div id="main">
<!-- TMPL_ELSE -->
<!-- TMPL_INCLUDE NAME="popup-top.inc" -->
<div class="popup-block">
<!-- /TMPL_UNLESS -->
<!-- TMPL_UNLESS NAME="preview" -->
<h1>Claims</h1>
<p>
<form action="claims.pl" method="post">
<input type="hidden" name="claimletter" value="<!-- TMPL_VAR NAME="claimletter"-->">
<!-- TMPL_VAR name="CGIsupplier" -->
<input type="submit" value="Filter by Supplier" class="button bull">
</form>
</p>
<!--
<p>
<form action="claims.pl" method="post">
<input type="hidden" name="supplierid" value="<!-- TMPL_VAR NAME="supplierid"-->">
<!-- TMPL_VAR name="CGIletter" -->
<input type="submit" value="Choose Claim Form" class="button bull">
</form>
</p> -->
<form method="post" action="lateissues-excel.pl">
<input type="hidden" name="op" value="claims" />
<!-- TMPL_IF NAME="missingissues" -->
<h3>Missing Issues</h3>
<table cellpadding="0" cellspacing="0" border="0" class="collapse">
<tr>
<th class="cell-header">&nbsp;</th>
<th class="cell-header">Supplier</th>
<th class="cell-header">Title</th>
<th class="cell-header">Issue number</th>
<th class="cell-header">Missing since</th>
<th class="cell-header">Began Claim</th>
<th class="cell-header">&nbsp;</th>
</tr>
<!-- TMPL_LOOP name="missingissues" -->
<tr>
<td class="cell">
<input type="checkbox" name="serialid" value="<!-- TMPL_VAR NAME="serialid"-->">
</td>
<td class="cell">
<!-- TMPL_VAR name="name" -->
</td>
<td class="cell">
<!-- TMPL_VAR name="Title" -->
</td>
<td class="cell">
<!-- TMPL_VAR name="serialseq" -->
</td>
<td class="cell">
<!-- TMPL_VAR name="planneddate" -->
</td>
<td class="cell">
<!-- TMPL_VAR name="claimdate" -->
</td>
<td class="cell">
<a href="lateissues-excel.pl?supplierid=<!--TMPL_VAR NAME="supplierid"-->&amp;serialid=<!-- TMPL_VAR name="serialid" -->&amp;op=claims" class="button bull">Export Item Data</a>
<!--
<a href="claims.pl?serialid=<!-- TMPL_VAR name="serialid" -->&amp;supplierid=<!-- TMPL_VAR name="supplierid" -->&amp;op=preview" onclick="popup(<!-- TMPL_VAR name="supplierid" -->,<!-- TMPL_VAR name="serialid" -->); return false">Claim Letter</a> -->
</td>
</tr>
<!-- /TMPL_LOOP -->
</table>
<!-- TMPL_ELSE -->
<p>There are no missing issues to claim</p>
<!-- /TMPL_IF -->
<!-- TMPL_IF Name="singlesupplier"-->
<input type="hidden" name="supplierid" value="<!--TMPL_VAR NAME="supplierid"-->" />
<!--
<a href="claims.pl?supplierid=<!-- TMPL_VAR name="supplierid" -->&amp;op=preview" onclick="popup(<!-- TMPL_VAR name="supplierid" -->,''); return false" class="bull button">Supplier Group Claim Letter</a></p> -->
<!-- /TMPL_IF -->
<p><br/>
<input type="submit" name="submit" class="button bull" value="Export Selected Data" />
</form>
<!-- TMPL_ELSE -->
<!-- TMPL_IF Name="supplierloop"-->
<!-- TMPL_LOOP Name="supplierloop"-->
<!-- TMPL_IF NAME="name" -->
<p><b><!-- TMPL_VAR NAME="name" --></b><br />
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="postal" -->
<!-- TMPL_VAR NAME="postal" --><br />
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="contphone" -->
Ph: <!-- TMPL_VAR NAME="contphone" --><br />
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="contfax" -->
Fax: <!-- TMPL_VAR NAME="contfax" --><br />
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="contemail" -->
Email: <!-- TMPL_VAR NAME="contemail" --><br />
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="accountnumber" -->
A/C: <!-- TMPL_VAR NAME="accountnumber"></p>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="contact" -->
<p>Dear <!-- TMPL_VAR NAME="contact" --></p>
<!-- TMPL_ELSE -->
<p>To whom it may concern</p>
<!-- /TMPL_IF -->
<p>The following items have not been received from you and are now considered missing:</p>
<!-- /TMPL_LOOP -->
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="missingissues" -->
<h3 class="bull">Missing Issues</h3>
<table cellpadding="0" cellspacing="4" border="0" width="550" class="collapse">
<tr>
<td class="cell"><b>Supplier<b></td>
<td class="cell"><b>Title</b></td>
<td class="cell"><b>Issue number</b></td>
<td class="cell"><b>Missing since</b></td>
</tr>
<!-- TMPL_LOOP name="missingissues" -->
<tr>
<td class="cell">
<!-- TMPL_VAR name="name" -->
</td>
<td class="cell">
<!-- TMPL_VAR name="Title" -->
</td>
<td class="cell">
<!-- TMPL_VAR name="serialseq" -->
</td>
<td class="cell">
<!-- TMPL_VAR name="planneddate" -->
</td>
</tr>
<!-- /TMPL_LOOP -->
</table>
<!-- /TMPL_IF -->
<br />
<p class="noprint"><a href="javascript:window.print()" class="button">Print</a> &nbsp; <a href="javascript:window.close()" class="button">Close</a></p>
<!-- /TMPL_UNLESS -->
</div>
<script type="text/javascript">
<!--
function popup(supplierid,serialid){
window.open('claims.pl?supplierid='+ supplierid +'&amp;serialid='+ serialid +'&amp;op=preview' ,'popup', 'width=600,height=400,toolbar=no,scrollbars=yes');
}
//-->
</script>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

View File

@ -0,0 +1,44 @@
<!-- TMPL_INCLUDE NAME="popup-top.inc" -->
<script type="text/javascript">
<!--
function add_member(subscriptionid,bornum){
var myurl = "routing.pl?subscriptionid="+subscriptionid+"&bornum="+bornum+"&op=add";
window.opener.location.href = myurl;
}
//-->
</script>
<div class="popup-block">
<h1 class="bull">Member Search</h1>
<p>
<form name="search" action="/cgi-bin/koha/bull/member-search.pl" method="post">
<input type="text" name="member" size="30" />
<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR NAME="subscriptionid" -->">
<input type="submit" class="button" value="Search" />
</form>
</p>
<!-- TMPL_IF NAME="memberloop" -->
<table cellspacing="0" cellpadding="0" border="0" width="480" class="collapse">
<tr><td class="cell-header">Name</td>
<td class="cell-header">Location</td>
<td class="cell-header">Add</td></tr>
<!-- TMPL_LOOP NAME="memberloop" -->
<tr><td class="cell"><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></td>
<td class="cell"><!-- TMPL_VAR NAME="streetaddress" --></td>
<td class="cell"><a onclick="add_member(<!-- TMPL_VAR NAME="subscriptionid" -->,<!-- TMPL_VAR NAME="borrowernumber" -->); return false" href="/cgi-bin/koha/bull/routing.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->&amp;bornum=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;op=add">Add</a></td></tr>
<!-- /TMPL_LOOP -->
</table></td></tr>
</table>
<!-- TMPL_ELSE -->
<!-- TMPL_IF NAME="member" -->
<p>No results found</p>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
<br />
<p><a href="javascript:self.close()" class="button">Close</a></p>
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

View File

@ -0,0 +1,23 @@
<!-- TMPL_INCLUDE NAME="popup-top.inc" -->
<div id="slip-block">
<table cellspacing="0" cellpadding="0" border="0" class="collapse routingslip">
<tr><td class="cell" colspan="3"><h3>Opus International Consultants - Information Centre</h3></td></tr>
<tr><td class="cell" colspan="3"><b>Title:</b> <!-- TMPL_VAR NAME="title" --><br />
<!-- TMPL_VAR NAME="issue" --></td></tr>
<tr><td class="cell"><b>Name/Location</b></td>
<td class="cell"><b>Date Due</b></td></tr>
<!-- TMPL_LOOP NAME="memberloop" -->
<tr><td class="name"><b><!-- TMPL_VAR NAME="name" --></b> <!-- TMPL_VAR NAME="location" --></td>
<td class="date">&nbsp;</td></tr>
<!-- /TMPL_LOOP -->
</table>
<p><b>Notes:</b> Please return this journal
promptly as others are waiting.
<br /><!-- TMPL_VAR NAME="routingnotes" --></p>
<div id="slip-block-links">
<a class="button" href="javascript:window.print();self.close()">Print</a> &nbsp; <a class="button" href="javascript:self.close()">Close</a>
</div>
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

View File

@ -0,0 +1,45 @@
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Routing List<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!-- TMPL_INCLUDE NAME="masthead.inc" -->
<!-- TMPL_INCLUDE NAME="serials-topmenu.inc" -->
<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
<div id="main">
<h1 class="bull">Preview Routing List</h1>
<form method="post" action="routing-preview.pl">
<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR NAME="subscriptionid" -->" />
<p><b>Serial Title:</b> <!-- TMPL_VAR NAME="title" --></p>
<p><b>Issue:</b> <!-- TMPL_VAR NAME="issue" --></p>
<table border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td style="padding-top: 5px;"><b>List Member:</b>&nbsp;</td>
<td><table cellspacing="0" cellpadding="0" border="0" class="collapse">
<tr><td class="cell-header">Name</td>
<td class="cell-header">Location</td></tr>
<!-- TMPL_LOOP NAME="memberloop" -->
<tr><td class="cell"><!-- TMPL_VAR NAME="name" --></td>
<td class="cell"><!-- TMPL_VAR NAME="location" --></td></tr>
<!-- /TMPL_LOOP -->
</table></td></tr>
<tr valign="top"><td colspan="2">&nbsp;</td></tr>
<tr valign="top"><td><b>Notes:</b></td>
<td><!-- TMPL_VAR NAME="routingnotes" --></td></tr>
</table>
<p>
<input type="submit" name="ok" class="button" value="OK, Preview Routing Slip" onclick="print_slip(<!-- TMPL_VAR NAME="subscriptionid" -->,'<!-- TMPL_VAR NAME="issue" -->'); return false" />
<input type="submit" name="edit" class="button" value="Edit" />
<input type="submit" name="delete" class="button" value="Delete" /></p>
</form>
</div>
<script type="text/javascript">
<!--
function print_slip(subscriptionid,issue){
var myurl = 'routing-preview.pl?ok=1&subscriptionid='+subscriptionid+'&issue='+issue;
window.open(myurl,'PrintSlip','width=400,height=500,toolbar=no,scrollbars=yes');
window.location.href='../bull-home.pl';
}
//-->
</script>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

View File

@ -0,0 +1,76 @@
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Routing List<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!-- TMPL_INCLUDE NAME="masthead.inc" -->
<!-- TMPL_INCLUDE NAME="serials-topmenu.inc" -->
<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
<script language="javascript" type="text/javascript">
<!--
function reorder_item(sid,rid,rank){
var mylocation = 'reorder_members.pl?subscriptionid='+sid+'&routingid='+rid+'&rank='+rank;
window.location.href=mylocation;
}
//-->
</script>
<div id="main">
<!-- TMPL_IF NAME="op" -->
<h1 class="bull">Create Routing List</h1>
<!-- TMPL_ELSE -->
<h1 class="bull">Edit Routing List</h1>
<!-- /TMPL_IF -->
<form method="post" action="routing.pl">
<input type="hidden" name="op" value="save" />
<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR NAME="subscriptionid" -->" />
<p><b>Serial Title:</b> <!-- TMPL_VAR NAME="title" --></p>
<p><b>Issue:</b>
<select name="date_selected">
<!-- TMPL_LOOP NAME="dates" -->
<option value="<!-- TMPL_VAR NAME="serialseq" --> (<!-- TMPL_VAR NAME="planneddate" -->)" <!-- TMPL_IF NAME="selected" --> selected="SELECTED" <!-- /TMPL_IF -->><!-- TMPL_VAR NAME="serialseq" --> (<!-- TMPL_VAR NAME="planneddate" -->)</option>
<!-- /TMPL_LOOP -->
</select>
<!-- TMPL_VAR NAME="issue" --></p>
<!-- TMPL_IF NAME="memberloop" -->
<table border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td style="padding-top:5px;"><b>List Member:</b>&nbsp;</td>
<td><table cellspacing="0" cellpadding="0" border="0" class="collapse">
<tr><td class="cell-header">Name</td>
<td class="cell-header">Location</td>
<td class="cell-header">Rank</td>
<td class="cell-header">Delete</td></tr>
<!-- TMPL_LOOP NAME="memberloop" -->
<tr><td class="cell"><!-- TMPL_VAR NAME="name" --></td>
<td class="cell"><!-- TMPL_VAR NAME="location" --></td>
<td class="cell"><!-- TMPL_VAR NAME="routingbox" --></td>
<td class="cell"><a href="/cgi-bin/koha/bull/routing.pl?routingid=<!-- TMPL_VAR NAME="routingid" -->&amp;subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->&amp;op=delete">Delete</a></td></tr>
<!-- /TMPL_LOOP -->
<tr><td colspan="4"><br /><a onclick="search_member(<!-- TMPL_VAR NAME="subscriptionid" -->); return false" href="/cgi-bin/koha/bull/member-search.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->" class="button bull">Add List Member</a> &nbsp; <a href="/cgi-bin/koha/bull/routing.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->&amp;op=delete" class="button bull">Delete All</a></td></tr>
</table></td></tr>
<!-- TMPL_ELSE -->
<table border="0" cellspacing="0" cellpadding="0">
<tr><td><b>List Member:&nbsp;</b></td>
<td><p><a onclick="search_member(<!-- TMPL_VAR NAME="subscriptionid" -->); return false" href="/cgi-bin/koha/bull/member-search.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->" class="button bull">Add List Member</a></p></td></tr>
<!-- /TMPL_IF -->
<tr><td valign="top" colspan="2">&nbsp;</td></tr>
<tr><td valign="top"><b>Notes:</b></td>
<td><textarea name="notes" rows="3" cols="50"><!-- TMPL_VAR NAME="routingnotes" --></textarea></td></tr>
<tr><td></td>
<td><input type="submit" name="submit" class="button" value="Save" /></td></tr>
</table>
</form>
</div>
<script type="text/javascript">
<!--
function search_member(subscriptionid){
var myurl = 'member-search.pl?subscriptionid='+subscriptionid; window.open(myurl,'FindAMember','width=500,height=400,toolbar=no,scrollbars=yes');
}
//-->
</script>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->