[Koha-cvs] koha admin/systempreferences.pl C4/Circulation/... [rel_3_0]

Antoine Farnault antoine at koha-fr.org
Mon Jan 15 10:55:40 CET 2007


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_3_0
Changes by:	Antoine Farnault <toins>	07/01/15 09:55:40

Modified files:
	admin          : systempreferences.pl 
	C4/Circulation : Fines.pm 
	C4             : Log.pm 
	koha-tmpl/intranet-tmpl/prog/en/tools: viewlog.tmpl 
	misc           : fines.pl 
	updater        : updatedatabase 

Log message:
	adding a new logging systempref : FinesLog.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/admin/systempreferences.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.34.2.16&r2=1.34.2.17
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Circulation/Fines.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.14.2.8&r2=1.14.2.9
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Log.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.5.2.4&r2=1.5.2.5
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/tools/viewlog.tmpl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.1.2.5&r2=1.1.2.6
http://cvs.savannah.gnu.org/viewcvs/koha/misc/fines.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.1.2.6&r2=1.1.2.7
http://cvs.savannah.gnu.org/viewcvs/koha/updater/updatedatabase?cvsroot=koha&only_with_tag=rel_3_0&r1=1.157.2.47&r2=1.157.2.48

Patches:
Index: admin/systempreferences.pl
===================================================================
RCS file: /sources/koha/koha/admin/systempreferences.pl,v
retrieving revision 1.34.2.16
retrieving revision 1.34.2.17
diff -u -b -r1.34.2.16 -r1.34.2.17
--- admin/systempreferences.pl	12 Jan 2007 18:04:35 -0000	1.34.2.16
+++ admin/systempreferences.pl	15 Jan 2007 09:55:39 -0000	1.34.2.17
@@ -167,6 +167,7 @@
     $tabsysprefs{IssueLog}        = "LOGFeatures";
     $tabsysprefs{ReturnLog}       = "LOGFeatures";
     $tabsysprefs{LetterLog}       = "LOGFeatures";
+    $tabsysprefs{FinesLog}        = "LOGFeatures";
     
 sub StringSearch  {
 	my ($env,$searchstring,$type)=@_;

Index: C4/Circulation/Fines.pm
===================================================================
RCS file: /sources/koha/koha/C4/Circulation/Fines.pm,v
retrieving revision 1.14.2.8
retrieving revision 1.14.2.9
diff -u -b -r1.14.2.8 -r1.14.2.9
--- C4/Circulation/Fines.pm	13 Dec 2006 08:22:09 -0000	1.14.2.8
+++ C4/Circulation/Fines.pm	15 Jan 2007 09:55:39 -0000	1.14.2.9
@@ -1,6 +1,6 @@
 package C4::Circulation::Fines;
 
-# $Id: Fines.pm,v 1.14.2.8 2006/12/13 08:22:09 btoumi Exp $
+# $Id: Fines.pm,v 1.14.2.9 2007/01/15 09:55:39 toins Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -21,15 +21,15 @@
 
 use strict;
 require Exporter;
-use DBI;
 use C4::Context;
 use Date::Calc qw/Today/;
 use vars qw($VERSION @ISA @EXPORT);
 use C4::Accounts2;
 use Date::Manip qw/UnixDate/;
+use C4::Log; # logaction
 
 # set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.14.2.8 $' =~ /\d+/g; 
+$VERSION = do { my @v = '$Revision: 1.14.2.9 $' =~ /\d+/g; 
 shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
 
 =head1 NAME
@@ -194,7 +194,7 @@
 
 =cut
 
-sub GetSpecialHolidays{
+sub GetSpecialHolidays {
 my ($date_dues,$itemnumber) = @_;
 # calcul the today date
 my $today = join "-", &Today();
@@ -235,10 +235,6 @@
 return $specialdaycount;
 }
 
-
-
-
-
 =item GetRepeatableHolidays
 
 &GetRepeatableHolidays($date_dues, $itemnumber, $difference,);
@@ -436,6 +432,15 @@
             $amount, $nextaccntno);
         $sth2->finish;
     }
+    # logging action
+    &logaction(
+        C4::Context->userenv->{'number'},
+        "FINES",
+        $type,
+        $borrowernumber,
+        "due=".$due."  amount=".$amount." itemnumber=".$itemnum
+        ) if C4::Context->preference("FinesLog");
+
     $sth->finish;
 }
 
@@ -627,6 +632,7 @@
 C<$notify_id> contains the file number for the borrower number nad item number
 
 =cut
+
 sub NumberNotifyId{
 	my ($borrowernumber)=@_;
 	my $dbh = C4::Context->dbh;
@@ -658,6 +664,7 @@
 C<$notify_id> contains the file number for the borrower number nad item number
 
 =cut
+
 sub AmountNotify{
 	my ($notifyid)=@_;
 	my $dbh = C4::Context->dbh;
@@ -686,6 +693,7 @@
 C<$notify_id> contains the file number for the borrower number nad item number
 
 =cut
+
  sub GetNotifyId {
  my ($borrowernumber,$itemnumber)=@_;
  my $query=qq|SELECT notify_id 
@@ -767,6 +775,7 @@
 C<$borrowernumber> contains the borrowernumber
 
 =cut
+
 sub UpdateAccountLines {
 my ($notify_id,$notify_level,$borrowernumber,$itemnumber)=@_;
 my $query;
@@ -945,8 +954,6 @@
 	}
 }
 
-
-
 =item UpdateBorrowerDebarred
 
 ($borrowerstatut) = &UpdateBorrowerDebarred($borrowernumber);
@@ -956,6 +963,7 @@
 C<$borrowernumber> borrower number
 
 =cut
+
 sub UpdateBorrowerDebarred{
 	my($borrowernumber) = @_;
 	my $dbh = C4::Context->dbh;
@@ -969,9 +977,6 @@
     	return 1;
 }
 
-
-
-
 =item CheckExistantNotifyid
 
   ($exist) = &CheckExistantNotifyid($borrowernumber,$itemnumber,$accounttype,$notify_id);
@@ -1024,8 +1029,8 @@
 
 C<$notify_id> contains the file number 
 
-
 =cut
+
 sub CheckAccountLineItemInfo {
  	my($borrowernumber,$itemnumber,$accounttype,$notify_id) = @_;
  	my $dbh = C4::Context->dbh;

Index: C4/Log.pm
===================================================================
RCS file: /sources/koha/koha/C4/Log.pm,v
retrieving revision 1.5.2.4
retrieving revision 1.5.2.5
diff -u -b -r1.5.2.4 -r1.5.2.5
--- C4/Log.pm	12 Jan 2007 18:02:52 -0000	1.5.2.4
+++ C4/Log.pm	15 Jan 2007 09:55:40 -0000	1.5.2.5
@@ -29,7 +29,7 @@
 use vars qw($VERSION @ISA @EXPORT);
 
 # set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.5.2.4 $' =~ /\d+/g; shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v ); };
+$VERSION = do { my @v = '$Revision: 1.5.2.5 $' =~ /\d+/g; shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v ); };
 
 =head1 NAME
 
@@ -93,6 +93,7 @@
     $hash{ReturnLog}       = C4::Context->preference("CataloguingLog");
     $hash{SubscriptionLog} = C4::Context->preference("CataloguingLog");
     $hash{LetterLog}       = C4::Context->preference("LetterLog");
+    $hash{FinesLog}       = C4::Context->preference("FinesLog");
     
     return \%hash;
 }

Index: koha-tmpl/intranet-tmpl/prog/en/tools/viewlog.tmpl
===================================================================
RCS file: /sources/koha/koha/koha-tmpl/intranet-tmpl/prog/en/tools/Attic/viewlog.tmpl,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -b -r1.1.2.5 -r1.1.2.6
--- koha-tmpl/intranet-tmpl/prog/en/tools/viewlog.tmpl	12 Jan 2007 18:09:19 -0000	1.1.2.5
+++ koha-tmpl/intranet-tmpl/prog/en/tools/viewlog.tmpl	15 Jan 2007 09:55:40 -0000	1.1.2.6
@@ -127,6 +127,7 @@
 				<option value ="SERIAL">Serial</option>
 				<option value="CIRCULATION">Circulation</option>
 				<option value="LETTER">Letter</option>
+				<option value="FINES">Fines</option>
 			</select>
 	    </td>
 	    <td>

Index: misc/fines.pl
===================================================================
RCS file: /sources/koha/koha/misc/Attic/fines.pl,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -b -r1.1.2.6 -r1.1.2.7
--- misc/fines.pl	1 Dec 2006 09:36:08 -0000	1.1.2.6
+++ misc/fines.pl	15 Jan 2007 09:55:40 -0000	1.1.2.7
@@ -25,7 +25,7 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
-# $Id: fines.pl,v 1.1.2.6 2006/12/01 09:36:08 toins Exp $
+# $Id: fines.pl,v 1.1.2.7 2007/01/15 09:55:40 toins Exp $
 
 use C4::Context;
 use C4::Circulation::Circ2;

Index: updater/updatedatabase
===================================================================
RCS file: /sources/koha/koha/updater/updatedatabase,v
retrieving revision 1.157.2.47
retrieving revision 1.157.2.48
diff -u -b -r1.157.2.47 -r1.157.2.48
--- updater/updatedatabase	12 Jan 2007 18:09:49 -0000	1.157.2.47
+++ updater/updatedatabase	15 Jan 2007 09:55:40 -0000	1.157.2.48
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: updatedatabase,v 1.157.2.47 2007/01/12 18:09:49 toins Exp $
+# $Id: updatedatabase,v 1.157.2.48 2007/01/15 09:55:40 toins Exp $
 
 # Database Updater
 # This script checks for required updates to the database.
@@ -503,7 +503,15 @@
             forceupdate         => {'explanation' => 1, 'type' => 1},
             explanation         => 'Active this if you want to log all the letter sent',
             type                => 'YesNo',
-        }
+        },
+        {
+            uniquefieldrequired => 'variable',
+            variable            => 'FinesLog',
+            value               => '0',
+            forceupdate         => {'explanation' => 1, 'type' => 1},
+            explanation         => 'Active this if you want to log fines',
+            type                => 'YesNo',
+        },
     ],
     userflags => [
         {
@@ -2150,6 +2158,9 @@
 exit;
 
 # $Log: updatedatabase,v $
+# Revision 1.157.2.48  2007/01/15 09:55:40  toins
+# adding a new logging systempref : FinesLog.
+#
 # Revision 1.157.2.47  2007/01/12 18:09:49  toins
 # LetterLog added
 #





More information about the Koha-cvs mailing list