X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=C4%2FContract.pm;h=2630af403e872fbbb23ad3b9d456d56feb9e4523;hb=eded6edacc5e3bf8dd0be21ed05842c3b78aadce;hp=57978a042e5628e206029b78c2f8b87af29be66d;hpb=1b887029181eb21e696251f09dd37ee8f902ee50;p=koha-ffzg.git diff --git a/C4/Contract.pm b/C4/Contract.pm index 57978a042e..2630af403e 100644 --- a/C4/Contract.pm +++ b/C4/Contract.pm @@ -4,39 +4,35 @@ package C4::Contract; # # 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 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 3 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. +# 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., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . use Modern::Perl; -use strict; -#use warnings; FIXME - Bug 2505 use C4::Context; use Koha::Database; -use vars qw($VERSION @ISA @EXPORT); +use vars qw(@ISA @EXPORT); BEGIN { - # set the version for version checking - $VERSION = 3.07.00.049; require Exporter; - @ISA = qw(Exporter); - @EXPORT = qw( - &GetContracts - &GetContract - &AddContract - &ModContract - &DelContract - ); + @ISA = qw(Exporter); + @EXPORT = qw( + GetContracts + GetContract + AddContract + ModContract + DelContract + ); } =head1 NAME @@ -92,7 +88,7 @@ sub GetContracts { =head2 GetContract -$contract = GetContract( { contractnumber => $contractnumber } ); +$contract = GetContract( { contractnumber => $contractnumber } ); Looks up the contract that has PRIMKEY (contractnumber) value $contractID @@ -104,6 +100,8 @@ sub GetContract { my ($params) = @_; my $contractnumber = $params->{contractnumber}; + return unless $contractnumber; + my $contracts = GetContracts({ contractnumber => $contractnumber, });