Removing unused files from the serials module
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
This commit is contained in:
parent
78a2b2cb1e
commit
a81d341989
|
|
@ -1,341 +0,0 @@
|
|||
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
|
||||
<title>Koha › Serials › Check In subscription for <!-- TMPL_VAR name="bibliotitle" --></title>
|
||||
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
//<![CDATA[
|
||||
function popup() {
|
||||
window.open("subscription-renew.pl?subscriptionid=<!-- TMPL_VAR
|
||||
name="subscriptionid">","subscription_renewal",'width=700,height=400,toolbar=false,scrollbars=yes');
|
||||
}
|
||||
|
||||
function barcode_check(){
|
||||
<!-- TMPL_IF NAME="count" -->
|
||||
var count = '<!-- TMPL_VAR NAME="count" -->';
|
||||
for(var i=1;i<=count;i++){
|
||||
|
||||
var barcodenum = "barcode"+i;
|
||||
var statusnum = "status"+i;
|
||||
var elembarcode = "document.getElementById('"+barcodenum+"')";
|
||||
var elemstatus = "document.getElementById('"+statusnum+"')";
|
||||
// alert(elembarcode+"\n"+eval(elembarcode+".value));
|
||||
// alert(elemstatus+"\n"+eval(elemstatus+".value"));
|
||||
if(eval(elembarcode+".value") =='' && eval(elemstatus+".value") == 2){
|
||||
var answer = confirm("Leave barcode blank?\n - Note: unable to change this later");
|
||||
if (answer){
|
||||
document.f.submit();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(eval(elembarcode+".value".indexOf('TEMP')) > 0 && eval(elemstatus+".value") == 2){
|
||||
var answer = confirm("A barcode was not entered.\nDo you want to put in a barcode\nor do you want to use a system generated barcode?");
|
||||
if (answer){
|
||||
document.f.submit();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
<!-- /TMPL_IF -->
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- TMPL_INCLUDE NAME="header.inc" -->
|
||||
<!-- TMPL_INCLUDE NAME="serials-search.inc" -->
|
||||
|
||||
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> › Check In subscription for <i><!-- TMPL_VAR name="bibliotitle" --></i></div>
|
||||
|
||||
<div id="doc3" class="yui-t2">
|
||||
|
||||
<div id="bd">
|
||||
<div id="yui-main">
|
||||
<div class="yui-b">
|
||||
|
||||
<h1>Check In subscription for <i><!-- TMPL_VAR name="bibliotitle" --></i></h1>
|
||||
<div id="action">
|
||||
<a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" title="detail of the subscription">Subscription Details</a>
|
||||
<!-- <a href="/cgi-bin/koha/serials/serials-home.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" class="button" title="all subscriptions on <!-- TMPL_VAR name="bibliotitle" -->">Search All Subscriptions</a> -->
|
||||
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" title="go to <!-- TMPL_VAR name="bibliotitle" -->">Show Biblio</a>
|
||||
<!-- TMPL_IF NAME="routing" -->
|
||||
<a href="routing.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" title="subscription routing list">Routing list</a>
|
||||
<!-- /TMPL_IF -->
|
||||
</div>
|
||||
|
||||
<h2>Expected or late</h2>
|
||||
<form method="post" name="f" action="serials-recieve.pl" onsubmit="return barcode_check()">
|
||||
<input type="hidden" name="op" value="serialchangestatus" />
|
||||
<input type="hidden" name="serial" value="<!-- TMPL_VAR name="serial" -->" />
|
||||
<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
|
||||
<input type="hidden" name="user" value="<!-- TMPL_VAR name="user" -->" />
|
||||
<table>
|
||||
<tr>
|
||||
<th>Numbered</th>
|
||||
<th>Published on</th>
|
||||
<th>planned for</th>
|
||||
<th>Status</th>
|
||||
<th>Notes</th>
|
||||
</tr>
|
||||
<!-- TMPL_LOOP name="serialslist" -->
|
||||
<tr>
|
||||
<td>
|
||||
Issue <input type="text" name="serialseq" value="<!-- TMPL_VAR name="serialseq" -->" size="20" maxlength="100" />
|
||||
<!--TMPL_IF Name="serialadditems" -->
|
||||
<br /><br />
|
||||
Callnumber <input type="text" name="itemcallnumber" value="<!--TMPL_VAR NAME="callnumber"-->" size="15" maxlength="100" />
|
||||
Barcode <input type="text" name="barcode" value="<!-- TMPL_VAR NAME="barcode"-->" id="barcode<!-- TMPL_VAR NAME="num" -->" size="20" maxlength="20" />
|
||||
<!--/TMPL_IF -->
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="publisheddate" value="<!-- TMPL_VAR name="publisheddate" -->" size="10" maxlength="15" />
|
||||
<!--TMPL_IF Name="serialadditems" -->
|
||||
<br /><br />
|
||||
<!--/TMPL_IF -->
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="planneddate" value="<!-- TMPL_VAR name="planneddate" -->" size="10" maxlength="15" />
|
||||
<!--TMPL_IF Name="serialadditems" -->
|
||||
<br /><br />
|
||||
<select name="branch">
|
||||
<option value="">Library</option>
|
||||
<!-- TMPL_LOOP name="branchloop" --><!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- /TMPL_LOOP -->
|
||||
</select>
|
||||
<!--/TMPL_IF -->
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" name="serialid" value="<!-- TMPL_VAR name="serialid" -->" />
|
||||
<select name="status" id="status<!-- TMPL_VAR NAME="num" -->">
|
||||
<!--TMPL_IF name="status1" -->
|
||||
<option value="1" selected="selected">Expected</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="status2" -->
|
||||
<option value="2" selected="selected">Arrived</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="2">Arrived</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="status3" -->
|
||||
<option value="3" selected="selected">Late</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="3">Late</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="status4" -->
|
||||
<option value="4" selected="selected">Missing</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="4">Missing</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="status5" -->
|
||||
<option value="5" selected="selected">Not Available</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="5">Not Available</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="status6" -->
|
||||
<option value="6" selected="selected">Delete</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="6">Delete</option>
|
||||
<!-- /TMPL_IF -->
|
||||
</select>
|
||||
<!--TMPL_IF Name="serialadditems" -->
|
||||
<br /><br />
|
||||
<!--TMPL_IF Name="itemstatus"-->
|
||||
<!--TMPL_IF Name="choice"-->
|
||||
<!-- TMPL_LOOP name="itemstatusloop" -->
|
||||
<!-- TMPL_VAR name="itemlib" -->:
|
||||
<!-- TMPL_IF name="selected" -->
|
||||
<input type="checkbox" name="itemstatus" value="<!-- TMPL_VAR name="itemval" -->" checked="checked" />
|
||||
<!-- TMPL_ELSE -->
|
||||
<input type="checkbox" name="itemstatus" value="<!-- TMPL_VAR name="itemval" -->" />
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- /TMPL_LOOP -->
|
||||
<!--TMPL_ELSE-->
|
||||
<select name="itemstatus">
|
||||
<option value="">Item Status</option>
|
||||
<!-- TMPL_LOOP name="itemstatusloop" -->
|
||||
<!-- TMPL_IF name="selected" -->
|
||||
<option value="<!-- TMPL_VAR name="itemval" -->" selected="selected"><!-- TMPL_VAR name="itemlib" --></option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="<!-- TMPL_VAR name="itemval" -->"><!-- TMPL_VAR name="itemlib" --></option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- /TMPL_LOOP -->
|
||||
</select>
|
||||
<!--/TMPL_IF-->
|
||||
<!-- TMPL_ELSE -->
|
||||
|
||||
<!--/TMPL_IF-->
|
||||
<!--/TMPL_IF -->
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="notes" value="<!-- TMPL_VAR name="notes" -->" size="20" maxlength="255" />
|
||||
<!--TMPL_IF Name="serialadditems" -->
|
||||
<br /><br />
|
||||
<!--TMPL_IF Name="itemlocation"-->
|
||||
<select name="location">
|
||||
<option value="">Location</option>
|
||||
<!-- TMPL_LOOP name="itemlocationloop" -->
|
||||
<!-- TMPL_IF name="selected" -->
|
||||
<option value="<!-- TMPL_VAR name="value" -->" selected="selected"><!-- TMPL_VAR name="itemlocationname" --></option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="<!-- TMPL_VAR name="value" -->"><!-- TMPL_VAR name="itemlocationname" --></option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- /TMPL_LOOP -->
|
||||
</select>
|
||||
<!-- TMPL_ELSE -->
|
||||
|
||||
<!--/TMPL_IF-->
|
||||
<!--/TMPL_IF -->
|
||||
</td>
|
||||
</tr>
|
||||
<!-- /TMPL_LOOP -->
|
||||
<!-- TMPL_UNLESS name="hassubscriptionexpired" -->
|
||||
<tr>
|
||||
<td>
|
||||
Manual issue <input type="text" name="serialseq" size="30" maxlength="100" value="<!-- TMPL_VAR NAME="missingseq" -->" />
|
||||
<!--TMPL_IF Name="serialadditems" -->
|
||||
<br /><br />
|
||||
Callnumber <input type="text" name="itemcallnumber" value="" size="10" maxlength="15" />
|
||||
Barcode <input type="text" name="barcode" value="" size="20" maxlength="20" />
|
||||
<!--/TMPL_IF-->
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="publisheddate" value="<!-- TMPL_VAR name="publisheddate" -->" size="10" maxlength="15" />
|
||||
<!--TMPL_IF Name="serialadditems" -->
|
||||
<br /><br />
|
||||
<!--/TMPL_IF -->
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="planneddate" size="10" maxlength="15" value="<!-- TMPL_VAR NAME="missingdate" -->" />
|
||||
<!--TMPL_IF Name="serialadditems" -->
|
||||
<br /><br />
|
||||
<select name="branch">
|
||||
<option value="">Library</option>
|
||||
<!-- TMPL_LOOP name="branchloop" -->
|
||||
<!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- /TMPL_LOOP -->
|
||||
</select>
|
||||
<!--/TMPL_IF-->
|
||||
</td>
|
||||
<td>
|
||||
<!-- TMPL_IF NAME="frommissing" -->
|
||||
<input type="hidden" name="serialid" value="<!-- TMPL_VAR name="missingid" -->" />
|
||||
<!-- TMPL_ELSE -->
|
||||
<input type="hidden" name="serialid" value="0" />
|
||||
<!--/TMPL_IF-->
|
||||
<select name="status">
|
||||
<!-- TMPL_IF NAME="frommissing" -->
|
||||
<option value="2" selected="selected">Arrived</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="2">Arrived</option>
|
||||
|
||||
<!--/TMPL_IF-->
|
||||
<!-- TMPL_IF NAME="frommissing" -->
|
||||
<option value="3">Late</option>
|
||||
<!--TMPL_ELSE-->
|
||||
<option value="3" selected="selected">Late</option>
|
||||
<!--/TMPL_IF-->
|
||||
<option value="4">Missing</option>
|
||||
<option value="5">Not Available</option>
|
||||
|
||||
|
||||
</select>
|
||||
<!--TMPL_IF Name="serialadditems" -->
|
||||
<br /><br />
|
||||
<!-- TMPL_IF Name="itemstatus"-->
|
||||
<!--TMPL_IF Name="choice"-->
|
||||
<!-- TMPL_LOOP name="itemstatusloop" -->
|
||||
<!-- TMPL_VAR name="itemlib" -->:
|
||||
<!-- TMPL_IF name="selected" -->
|
||||
<input type="checkbox" name="itemstatus" value="<!-- TMPL_VAR name="itemval" -->" checked="checked" />
|
||||
<!-- TMPL_ELSE -->
|
||||
<input type="checkbox" name="itemstatus" value="<!-- TMPL_VAR name="itemval" -->" />
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- /TMPL_LOOP -->
|
||||
<!--TMPL_ELSE-->
|
||||
<select name="itemstatus">
|
||||
<option value="">Item Status</option>
|
||||
<!-- TMPL_LOOP name="itemstatusloop" -->
|
||||
<!-- TMPL_IF name="selected" -->
|
||||
<option value="<!-- TMPL_VAR name="itemval" -->" selected="selected"><!-- TMPL_VAR name="itemlib" --></option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="<!-- TMPL_VAR name="itemval" -->"><!-- TMPL_VAR name="itemlib" --></option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- /TMPL_LOOP -->
|
||||
</select>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_ELSE -->
|
||||
|
||||
<!--/TMPL_IF -->
|
||||
<!--/TMPL_IF-->
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<!--TMPL_IF Name="serialadditems" -->
|
||||
<br /><br />
|
||||
<!-- TMPL_IF Name="itemlocation"-->
|
||||
<select name="location">
|
||||
<option value="">Location</option>
|
||||
<!-- TMPL_LOOP name="itemlocationloop" -->
|
||||
<!-- TMPL_IF name="selected" -->
|
||||
<option value="<!-- TMPL_VAR name="value" -->" selected="selected"><!-- TMPL_VAR name="itemlocationname" --></option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="<!-- TMPL_VAR name="value" -->"><!-- TMPL_VAR name="itemlocationname" --></option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- /TMPL_LOOP -->
|
||||
</select>
|
||||
<!-- TMPL_ELSE -->
|
||||
|
||||
<!--/TMPL_IF -->
|
||||
<!--/TMPL_IF-->
|
||||
</td>
|
||||
</tr>
|
||||
<!-- /TMPL_UNLESS -->
|
||||
</table>
|
||||
<input type="submit" value="Save changes" accesskey="w" class="button" />
|
||||
<!-- TMPL_IF name="hassubscriptionexpired" -->
|
||||
<h3>Subscription has expired.</h3>
|
||||
<p><b>Expected issue status can't be changed. <a href="#" onclick="popup()" class="button">Renew</a> your subscription</b></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>
|
||||
|
||||
<h2>Subscription summary</h2>
|
||||
<form method="post" name="f2" action="serials-recieve.pl">
|
||||
<input type="hidden" name="op" value="modsubscriptionhistory" />
|
||||
<input type="hidden" name="serial" value="<!-- TMPL_VAR name="serial" -->" />
|
||||
<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
|
||||
<input type="hidden" name="user" value="<!-- TMPL_VAR name="user" -->" />
|
||||
<p><label>Librarian</label><!-- TMPL_VAR name="user" --></p>
|
||||
<p><label>Starting date:</label><input type="text" name="histstartdate" value="<!-- TMPL_VAR name="histstartdate" -->" /> (the date of the 1st subscription)</p>
|
||||
<p><label>Ending date:</label><input type="text" name="enddate" value="<!-- TMPL_VAR name="enddate" -->" />(if empty subscription is still active)</p>
|
||||
<p>Received issues</p>
|
||||
<p><textarea name="recievedlist" cols="60" rows="5"><!-- TMPL_VAR name="recievedlist" --></textarea></p>
|
||||
<p>Missing issues</p>
|
||||
<p><textarea name="missinglist" cols="60" rows="2"><!-- TMPL_VAR name="missinglist" --></textarea></p>
|
||||
<p>OPAC note</p>
|
||||
<p><textarea name="opacnote" cols="60" rows="5"><!-- TMPL_VAR name="opacnote" --></textarea></p>
|
||||
<input type="submit" value="Save changes" class="button" />
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="yui-b">
|
||||
<!-- TMPL_INCLUDE NAME="serials-menu.inc" -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|
||||
|
|
@ -1,281 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
=head1 NAME
|
||||
|
||||
serials-recieve.pl
|
||||
|
||||
=head1 Parameters
|
||||
|
||||
=over 4
|
||||
|
||||
=item op
|
||||
op can be :
|
||||
* modsubscriptionhistory :to modify the subscription history
|
||||
* serialchangestatus :to modify the status of this subscription
|
||||
|
||||
=item subscriptionid
|
||||
|
||||
=item user
|
||||
|
||||
=item histstartdate
|
||||
|
||||
=item enddate
|
||||
|
||||
=item recievedlist
|
||||
|
||||
=item missinglist
|
||||
|
||||
=item opacnote
|
||||
|
||||
=item librariannote
|
||||
|
||||
=item serialid
|
||||
|
||||
=item serialseq
|
||||
|
||||
=item planneddate
|
||||
|
||||
=item notes
|
||||
|
||||
=item status
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
use strict;
|
||||
use CGI;
|
||||
use C4::Auth;
|
||||
use C4::Dates qw/format_date format_date_in_iso/;
|
||||
use C4::Biblio;
|
||||
use C4::Items;
|
||||
use C4::Koha;
|
||||
use C4::Output;
|
||||
use C4::Context;
|
||||
use C4::Serials;
|
||||
use C4::Branch; # GetBranches
|
||||
|
||||
my $query = new CGI;
|
||||
my $op = $query->param('op');
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $subscriptionid = $query->param('subscriptionid');
|
||||
# my $auser = $query->param('user');
|
||||
my $histstartdate = format_date_in_iso($query->param('histstartdate'));
|
||||
my $enddate = format_date_in_iso($query->param('enddate'));
|
||||
my $recievedlist = $query->param('recievedlist');
|
||||
my $missinglist = $query->param('missinglist');
|
||||
my $opacnote = $query->param('opacnote');
|
||||
my $librariannote = $query->param('librariannote');
|
||||
my @serialids = $query->param('serialid');
|
||||
my @serialseqs = $query->param('serialseq');
|
||||
my @planneddates = $query->param('planneddate');
|
||||
my @publisheddates = $query->param('publisheddate');
|
||||
my @status = $query->param('status');
|
||||
my @notes = $query->param('notes');
|
||||
my @barcodes = $query->param('barcode');
|
||||
my @itemcallnumbers = $query->param('itemcallnumber');
|
||||
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 $auser = $subscription->{'librarian'}; # bob
|
||||
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=?");
|
||||
for (my $i=0;$i<=$#serialids;$i++) {
|
||||
$sth->execute($serialids[$i]);
|
||||
|
||||
my ($oldstatus) = $sth->fetchrow;
|
||||
if ($serialids[$i]) {
|
||||
ModSerialStatus($serialids[$i],$serialseqs[$i],format_date_in_iso($planneddates[$i]),format_date_in_iso($publisheddates[$i]),$status[$i],$notes[$i]) unless ($hassubscriptionexpired && $oldstatus == 1);
|
||||
if (($status[$i]==2) && C4::Context->preference("serialsadditems")){
|
||||
my %info;
|
||||
$info{branch}=$homebranches[$i];
|
||||
$info{barcode}=$barcodes[$i];
|
||||
$info{itemcallnumber}=$itemcallnumbers[$i];
|
||||
$info{location}=$locations[$i];
|
||||
$info{status}=$itemstatus[$i];
|
||||
$info{notes}=$serialseqs[$i]." (".$planneddates[$i].")";
|
||||
my ($status2, @errors)= ItemizeSerials($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 ($status2 ==1){
|
||||
removeMissingIssue($serialseqs[$i],$subscriptionid);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
# add a special issue
|
||||
if ($serialseqs[$i]) {
|
||||
NewIssue($serialseqs[$i],$subscriptionid,$subscription->{biblionumber},$status[$i] ,format_date_in_iso($publisheddates[$i]),format_date_in_iso($planneddates[$i]));
|
||||
}
|
||||
if (($status[$i]==2) && C4::Context->preference("serialsadditems") && !hassubscriptionexpired($subscriptionid)){
|
||||
my %info;
|
||||
$info{branch}=$homebranches[$i];
|
||||
$info{barcode}=$barcodes[$i];
|
||||
$info{itemcallnumber}=$itemcallnumbers[$i];
|
||||
$info{location}=$locations[$i];
|
||||
$info{status}=$itemstatus[$i];
|
||||
$info{notes}=$serialseqs[$i]." (".$planneddates[$i].")";
|
||||
my ($status2, @errors)= ItemizeSerials($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 ($status2 ==1){
|
||||
removeMissingIssue($serialseqs[$i],$subscriptionid);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
my ($template, $loggedinuser, $cookie)
|
||||
= get_template_and_user({template_name => "serials/serials-recieve.tmpl",
|
||||
query => $query,
|
||||
type => "intranet",
|
||||
authnotrequired => 0,
|
||||
flagsrequired => {serials => 1},
|
||||
debug => 1,
|
||||
});
|
||||
|
||||
my $subs = &GetSubscription($subscriptionid);
|
||||
my ($totalissues,@serialslist) = GetSerials($subscriptionid);
|
||||
my $count = @serialslist;
|
||||
for(my $i=0;$i<$count;$i++){
|
||||
warn "la : $i";
|
||||
$serialslist[$i]->{'callnumber'} = $subscription->{'callnumber'};
|
||||
my $temp = rand(10000000);
|
||||
$serialslist[$i]->{'barcode'} = "TEMP" . sprintf("%.0f",$temp);
|
||||
}
|
||||
|
||||
my $sth= C4::Serials::GetSubscriptionHistoryFromSubscriptionId();
|
||||
|
||||
$sth->execute($subscriptionid);
|
||||
my $solhistory = $sth->fetchrow_hashref;
|
||||
|
||||
$subs = &GetSubscription($subscriptionid);
|
||||
($totalissues,@serialslist) = GetSerials($subscriptionid);
|
||||
|
||||
if (C4::Context->preference("serialsadditems")){
|
||||
my $fwk=GetFrameworkCode($subscription->{biblionumber});
|
||||
|
||||
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},
|
||||
);
|
||||
# warn "".$row{'itemval'}.", ". $row{"itemlib"};
|
||||
$itemstatusloopcount++;
|
||||
push @itemstatusloop, \%row;
|
||||
}
|
||||
my $itemlocationhash = GetItemLocation($fwk);
|
||||
my @itemlocationloop;
|
||||
foreach my $thisitemlocation (keys %$itemlocationhash) {
|
||||
my %row =(value => $thisitemlocation,
|
||||
itemlocationname => $itemlocationhash->{$thisitemlocation},
|
||||
);
|
||||
push @itemlocationloop, \%row;
|
||||
}
|
||||
|
||||
my $choice = ($itemstatusloopcount == 1) ? 1 : 0;
|
||||
foreach my $data (@serialslist){
|
||||
$data->{"itemstatusloop"} = (scalar(@itemstatusloop )) ? \@itemstatusloop : [];
|
||||
$data->{"itemlocationloop"} = (scalar(@itemlocationloop)) ? \@itemlocationloop : [];
|
||||
$data->{"branchloop"} = \@branchloop ;
|
||||
}
|
||||
# warn "Choice: $choice";
|
||||
$template->param(choice => $choice);
|
||||
$template->param(serialadditems =>C4::Context->preference("serialsadditems"),
|
||||
branchloop => \@branchloop,
|
||||
) ;
|
||||
$template->param( itemstatus=>1, itemstatusloop=>\@itemstatusloop ) if (scalar(@itemstatusloop ));
|
||||
$template->param(itemlocation=>1,itemlocationloop=>\@itemlocationloop) if (scalar(@itemlocationloop));
|
||||
} else {
|
||||
$template->param(branchloop=>[],itemstatusloop=>[],itemlocationloop=>[]) ;
|
||||
}
|
||||
|
||||
$sth= C4::Serials::GetSubscriptionHistoryFromSubscriptionId();
|
||||
$sth->execute($subscriptionid);
|
||||
$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'}),
|
||||
recievedlist => $solhistory->{'recievedlist'},
|
||||
missinglist => $solhistory->{'missinglist'},
|
||||
opacnote => $solhistory->{'opacnote'},
|
||||
librariannote => $solhistory->{'librariannote'},
|
||||
subscriptionid => $subscriptionid,
|
||||
bibliotitle => $subs->{bibliotitle},
|
||||
biblionumber => $subs->{biblionumber},
|
||||
hassubscriptionexpired =>$hassubscriptionexpired,
|
||||
abouttoexpire =>$abouttoexpire,
|
||||
routing => $routing,
|
||||
missingseq => $manualissue,
|
||||
frommissing => $manualstatus,
|
||||
missingdate => $manualdate,
|
||||
missingid => $manualid,
|
||||
);
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
Loading…
Reference in New Issue