Bug 5010: Fix OPACBaseURL to include protocol
[srvgit] / C4 / Suggestions.pm
index 35deb20..8fa5a85 100644 (file)
@@ -5,23 +5,23 @@ package C4::Suggestions;
 #
 # 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 <http://www.gnu.org/licenses>.
 
 use strict;
 
 #use warnings; FIXME - Bug 2505
-use CGI;
+use CGI qw ( -utf8 );
 
 use C4::Context;
 use C4::Output;
@@ -101,6 +101,7 @@ sub SearchSuggestion {
             B1.branchname       AS branchnamesuggestedby,
             U1.surname          AS surnamesuggestedby,
             U1.firstname        AS firstnamesuggestedby,
+            U1.cardnumber       AS cardnumbersuggestedby,
             U1.email            AS emailsuggestedby,
             U1.borrowernumber   AS borrnumsuggestedby,
             U1.categorycode     AS categorycodesuggestedby,
@@ -203,9 +204,9 @@ sub SearchSuggestion {
 
 =head2 GetSuggestion
 
-\%sth = &GetSuggestion($ordernumber)
+\%sth = &GetSuggestion($suggestionid)
 
-this function get the detail of the suggestion $ordernumber (input arg)
+this function get the detail of the suggestion $suggestionid (input arg)
 
 return :
     the result of the SQL query as a hash : $sth->fetchrow_hashref.
@@ -213,7 +214,7 @@ return :
 =cut
 
 sub GetSuggestion {
-    my ($ordernumber) = @_;
+    my ($suggestionid) = @_;
     my $dbh           = C4::Context->dbh;
     my $query         = q{
         SELECT *
@@ -221,7 +222,7 @@ sub GetSuggestion {
         WHERE  suggestionid=?
     };
     my $sth = $dbh->prepare($query);
-    $sth->execute($ordernumber);
+    $sth->execute($suggestionid);
     return ( $sth->fetchrow_hashref );
 }
 
@@ -437,6 +438,7 @@ sub NewSuggestion {
         accepteddate
         rejectedby
         rejecteddate
+        budgetid
     ) ) {
         # Set the fields to NULL if not given.
         $suggestion->{$field} ||= undef;
@@ -475,6 +477,7 @@ sub ModSuggestion {
         accepteddate
         rejectedby
         rejecteddate
+        budgetid
     ) ) {
         # Set the fields to NULL if not given.
         $suggestion->{$field} = undef