[Koha-patches] [PATCH 39/78] Bookseller.pm changes

paul.poulain at biblibre.com paul.poulain at biblibre.com
Thu May 28 18:32:49 CEST 2009


From: Paul Poulain <paul.poulain at biblibre.com>

* search on %<userentry>% instead of <userentry>%
* deal with gst at bookseller level
---
 C4/Bookseller.pm |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/C4/Bookseller.pm b/C4/Bookseller.pm
index 0244bc3..c18769a 100644
--- a/C4/Bookseller.pm
+++ b/C4/Bookseller.pm
@@ -71,7 +71,7 @@ sub GetBookSeller($) {
     my $dbh = C4::Context->dbh;
     my $query = "SELECT * FROM aqbooksellers WHERE name LIKE ?";
     my $sth =$dbh->prepare($query);
-    $sth->execute( "$searchstring%" );
+    $sth->execute( "%$searchstring%" );
     my @results;
     # count how many baskets this bookseller has.
     # if it has none, the bookseller can be deleted
@@ -218,8 +218,8 @@ in the Koha database. It must contain entries for all of the fields.
 The entry to modify is determined by C<$bookseller-E<gt>{id}>.
 
 The easiest way to get all of the necessary fields is to look up a
-book seller with C<&booksellers>, modify what's necessary, then call
-C<&ModSupplier> with the result.
+book seller with C<&GetBookseller>, modify what's necessary, then call
+C<&ModBookseller> with the result.
 
 =cut
 
@@ -232,8 +232,8 @@ sub ModBookseller {
             postal=?,phone=?,fax=?,url=?,contact=?,contpos=?,
             contphone=?,contfax=?,contaltphone=?,contemail=?,
             contnotes=?,active=?,listprice=?, invoiceprice=?,
-            gstreg=?, listincgst=?,invoiceincgst=?,
-            specialty=?,discount=?,invoicedisc=?,nocalc=?, notes=?
+            gstreg=?,listincgst=?,invoiceincgst=?,
+            specialty=?,discount=?,invoicedisc=?,nocalc=?,notes=?,gstrate=?
         WHERE id=?
     ";
     my $sth    = $dbh->prepare($query);
@@ -251,7 +251,8 @@ sub ModBookseller {
         $data->{'listincgst'},   $data->{'invoiceincgst'},
         $data->{'specialty'},    $data->{'discount'},
         $data->{'invoicedisc'},  $data->{'nocalc'},
-        $data->{'notes'},        $data->{'id'}
+        $data->{'notes'},        $data->{'gstrate'},
+        $data->{'id'}
     );
     $sth->finish;
 }
-- 
1.6.0.4




More information about the Koha-patches mailing list