Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'ptfs-master' of git@github.com:pjones9/ptfs-master into…

… ptfs-master
  • Loading branch information...
commit abf15f03ba1590f13d5d504ffb63d0661f291bda 2 parents bbf98e8 + 87e0dd0
Clay Fouts ctfliblime authored
Showing with 12 additions and 25 deletions.
  1. +11 −24 circ/returns.pl
  2. +1 −1  opac/opac-modrequest.pl
35 circ/returns.pl
View
@@ -167,7 +167,8 @@ =head1 returns.pl
############
# Deal with the requests....
-
+my $notransfer = 0;
+my $reservenumber = $query->param('reservenumber');
if ($query->param('WT-itemNumber')){
updateWrongTransfer ($query->param('WT-itemNumber'),$query->param('WT-waitingAt'),$query->param('WT-From'));
}
@@ -175,7 +176,6 @@ =head1 returns.pl
my $item = $query->param('itemnumber');
my $borrowernumber = $query->param('borrowernumber');
my $resbarcode = $query->param('resbarcode');
- my $reservenumber = $query->param('reservenumber');
my $diffBranchReturned = $query->param('diffBranch');
my $iteminfo = GetBiblioFromItemNumber($item);
# fix up item type for display
@@ -183,15 +183,20 @@ =head1 returns.pl
my $diffBranchSend = ($userenv_branch ne $diffBranchReturned) ? $diffBranchReturned : undef;
## wonky case of hold Waiting at branch B but here we are checkin at branch A,
- ## if we keep the item here, then we have to requeue the hold
+ ## if we keep the item here, then we have to requeue the hold as a bib-level hold.
+ ## This case does not reflect reality and is a contrived scenario of playing with
+ ## Koha as superlibrarian
if ($query->param('requeue')) {
+ $notransfer = 1;
ModReserve(1,
$query->param('biblionumber'),
$borrowernumber,
$query->param('pickbranch'),
- $item,
+ undef,#$item,
$reservenumber,
);
+ ModItem({holdingbranch=>$userenv_branch}, $iteminfo->{'biblionumber'}, $iteminfo->{'itemnumber'} );
+# C4::Items::ModItemTransfer($query->param('itemnumber')); # delete from branchtransfers
}
else {
# diffBranchSend tells ModReserveAffect whether document is expected in this library or not,
@@ -199,25 +204,6 @@ =head1 returns.pl
ModReserveAffect( $item, $borrowernumber, $diffBranchSend, $reservenumber );
}
-# check if we have other reserves for this document, if we have a return send the message of transfer
- my ( $messages, $nextreservinfo ) = GetOtherReserves($item);
-
- my ($borr) = GetMemberDetails( $nextreservinfo, 0 );
- my $name = $borr->{'surname'} . ", " . $borr->{'title'} . " " . $borr->{'firstname'};
- if ( $messages->{'transfert'} ) {
- $template->param(
- itemtitle => $iteminfo->{'title'},
- itembiblionumber => $iteminfo->{'biblionumber'},
- iteminfo => $iteminfo->{'author'},
- tobranchname => GetBranchName($messages->{'transfert'}),
- name => $name,
- borrowernumber => $borrowernumber,
- borcnum => $borr->{'cardnumber'},
- borfirstname => $borr->{'firstname'},
- borsurname => $borr->{'surname'},
- diffbranch => 1,
- );
- }
if ($query->param('fromqueue')) {
$template->param(
closeGB => 1,
@@ -244,7 +230,8 @@ =head1 returns.pl
my $today_iso = $today->output('iso');
my $dropboxdate = $calendar->addDate($today, -1);
$barcode =~ s/^\s*|\s+//g;
-if ($dotransfer){
+
+if ($dotransfer && !$notransfer){
# An item has been returned to a branch other than the homebranch, and the librarian has chosen to initiate a transfer
my $transferitem = $query->param('transferitem');
my $tobranch = $query->param('tobranch');
2  opac/opac-modrequest.pl
View
@@ -58,7 +58,7 @@
$resumedate = $parts[2] . '-' . $parts[0] . '-' . $parts[1];
}
- if ( $resumedate =~ m/(\d{4})-(0[13578]|1[02])-(0[1-9]|[12]\d|3[01])|(\d{4})-(0[469]|11])-(0[1-9]|[12]\d|30)|(\d{4})-(02)-(0[1-9]|1\d|2[0-9])/ ) {
+ if ( $resumedate =~ m/^([0-9]{4})(?:(1[0-2]|0[1-9])|-?(1[0-2]|0[1-9])-?)(3[0-1]|0[1-9]|[1-2][0-9])$/ ) {
SuspendReserve( $reservenumber[$i], $resumedate );
} else {
SuspendReserve( $reservenumber[$i] );
Please sign in to comment.
Something went wrong with that request. Please try again.