=item AddReserve
- AddReserve($branch,$borrowernumber,$biblionumber,$constraint,$bibitems,$priority,$notes,$title,$checkitem,$found)
+ AddReserve($branch,$borrowernumber,$biblionumber,$constraint,$bibitems,$priority,$notes,$title,$checkitem,$found, $from)
=cut
my (
$branch, $borrowernumber, $biblionumber,
$constraint, $bibitems, $priority, $notes,
- $title, $checkitem, $found
+ $title, $checkitem, $found, $from
) = @_;
my $fee =
GetReserveFee($borrowernumber, $biblionumber, $constraint,
if(C4::Context->preference("emailLibrarianWhenHoldIsPlaced")){
my $borrower = GetMemberDetails($borrowernumber);
my $biblio = GetBiblioData($biblionumber);
- my $letter = C4::Letters::getletter( 'reserves', 'HOLDPLACED');
+ my $lettertype = ($from eq "intranet") ? "STAFFHOLDPLACED" : "HOLDPLACED";
+ my $letter = C4::Letters::getletter( 'reserves', $lettertype);
my $admin_email_address = C4::Context->preference('KohaAdminEmailAddress');
my %keys = (%$borrower, %$biblio);
}
my $bibno = $bib->{biblionumber};
AddReserve($branch, $borrower->{borrowernumber},
- $bibno, 'a', GetBiblioItemByBiblioNumber($bibno)) ;
+ $bibno, 'a', GetBiblioItemByBiblioNumber($bibno), "opac") ;
# unfortunately no meaningful return value
$self->ok(1);
return $self;
SetVersion ($DBversion);
}
+$DBversion = '3.00.06.006';
+if (C4::Context->preference('Version') < TransformToNum($DBversion)){
+ $dbh->do("
+ INSERT INTO `letter` (module, code, name, title, content) VALUES('reserves', 'STAFFHOLDPLACED', 'Hold Placed on Item (from staff)', 'Hold Placed on Item (from staff)','An hold has been placed on the following item from the intranet : <<title>> (<<biblionumber>>) for the user <<firstname>> <<surname>> (<<cardnumber>>).');
+ ");
+ print "Upgrade to $DBversion done (Added notice for hold from staff)\n";
+ SetVersion ($DBversion);
+}
+
use strict;
sub kohaversion {
- our $VERSION = '3.00.06.005';
+ our $VERSION = '3.00.06.006';
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install
my $const;
if ($input->param('request') eq 'any'){
# place a request on 1st available
- AddReserve($branch,$borrowernumber->{'borrowernumber'},$biblionumber,'a',\@realbi,$rank[0],$notes,$title,$checkitem,$found);
+ AddReserve($branch,$borrowernumber->{'borrowernumber'},$biblionumber,'a',\@realbi,$rank[0],$notes,$title,$checkitem,$found, "intranet");
} elsif ($reqbib[0] ne ''){
# FIXME : elsif probably never reached, (see top of the script)
# place a request on a given item
- AddReserve($branch,$borrowernumber->{'borrowernumber'},$biblionumber,'o',\@reqbib,$rank[0],$notes,$title,$checkitem, $found);
+ AddReserve($branch,$borrowernumber->{'borrowernumber'},$biblionumber,'o',\@reqbib,$rank[0],$notes,$title,$checkitem, $found, "intranet");
} else {
- AddReserve($branch,$borrowernumber->{'borrowernumber'},$biblionumber,'a',\@realbi,$rank[0],$notes,$title,$checkitem, $found);
+ AddReserve($branch,$borrowernumber->{'borrowernumber'},$biblionumber,'a',\@realbi,$rank[0],$notes,$title,$checkitem, $found, "intranet");
}
print $input->redirect("request.pl?biblionumber=$biblionumber");
if($routinglist[$i]->{'borrowernumber'} == $data->{'borrowernumber'}){
ModReserve($routinglist[$i]->{'ranking'},$biblio,$routinglist[$i]->{'borrowernumber'},$branch);
} else {
- AddReserve($branch,$routinglist[$i]->{'borrowernumber'},$biblio,$const,\@bibitems,$routinglist[$i]->{'ranking'},$notes,$title);
+ AddReserve($branch,$routinglist[$i]->{'borrowernumber'},$biblio,$const,\@bibitems,$routinglist[$i]->{'ranking'},$notes,$title, "intranet");
}
}