[Koha-patches] [PATCH] Adding Optionnal suggestion creation when renewing subscription.

Henri-Damien LAURENT henridamien at koha-fr.org
Mon May 12 22:48:14 CEST 2008


---
 C4/Serials.pm |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/C4/Serials.pm b/C4/Serials.pm
index 78d7e43..487f1c0 100644
--- a/C4/Serials.pm
+++ b/C4/Serials.pm
@@ -1428,14 +1428,16 @@ sub ReNewSubscription {
      my $sth = $dbh->prepare($query);
      $sth->execute( $subscription->{biblionumber} );
      my $biblio = $sth->fetchrow_hashref;
-     NewSuggestion(
-         $user,             $subscription->{bibliotitle},
-         $biblio->{author}, $biblio->{publishercode},
-         $biblio->{note},   '',
-         '',                '',
-         '',                '',
-         $subscription->{biblionumber}
-     );
+     if (C4::Context->preference("RenewSerialAddsSuggestion")){
+        NewSuggestion(
+            $user,             $subscription->{bibliotitle},
+            $biblio->{author}, $biblio->{publishercode},
+            $biblio->{note},   '',
+            '',                '',
+            '',                '',
+            $subscription->{biblionumber}
+        );
+    }
 
     # renew subscription
     $query = qq|
-- 
1.5.4.3




More information about the Koha-patches mailing list