[Koha-cvs] koha C4/Accounts2.pm C4/Members.pm members/pay.pl [rel_3_0]

Bruno Toumi btoumi at ouestprovence.fr
Fri Nov 24 14:56:20 CET 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_3_0
Changes by:	Bruno Toumi <btoumi>	06/11/24 13:56:19

Modified files:
	C4             : Accounts2.pm Members.pm 
	members        : pay.pl 

Log message:
	add possibility  to show and pay all type(except REF type) from manuel in voice in pay template

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Accounts2.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.30.2.2&r2=1.30.2.3
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Members.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.32.2.20&r2=1.32.2.21
http://cvs.savannah.gnu.org/viewcvs/koha/members/pay.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.4.2.2&r2=1.4.2.3

Patches:
Index: C4/Accounts2.pm
===================================================================
RCS file: /sources/koha/koha/C4/Accounts2.pm,v
retrieving revision 1.30.2.2
retrieving revision 1.30.2.3
diff -u -b -r1.30.2.2 -r1.30.2.3
--- C4/Accounts2.pm	17 Nov 2006 14:57:21 -0000	1.30.2.2
+++ C4/Accounts2.pm	24 Nov 2006 13:56:19 -0000	1.30.2.3
@@ -18,7 +18,7 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
-# $Id: Accounts2.pm,v 1.30.2.2 2006/11/17 14:57:21 tipaul Exp $
+# $Id: Accounts2.pm,v 1.30.2.3 2006/11/24 13:56:19 btoumi Exp $
 use strict;
 require Exporter;
 use DBI;
@@ -29,7 +29,7 @@
 use vars qw($VERSION @ISA @EXPORT);
 
 # set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.30.2.2 $' =~ /\d+/g; 
+$VERSION = do { my @v = '$Revision: 1.30.2.3 $' =~ /\d+/g; 
 shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
 
 =head1 NAME
@@ -120,7 +120,6 @@
 sub recordpayment{
   #here we update both the accountoffsets and the account lines
   my ($env,$borrowernumber,$data)=@_;
-    warn "in accounts2.pm";
   my $dbh = C4::Context->dbh;
   my $newamtos = 0;
   my $accdata = "";
@@ -324,6 +323,7 @@
 sub manualinvoice{
   my ($borrowernumber,$itemnum,$desc,$type,$amount,$user)=@_;
   my $dbh = C4::Context->dbh;
+  my $notifyid;
   my $insert;
   $itemnum=~ s/ //g;
   my %env;
@@ -338,24 +338,40 @@
   if ($type eq 'N'){
     $desc.="New Card";
   }
+  if ($type eq 'F'){
+    $desc.="Fine";
+  }
+  if ($type eq 'A'){
+    $desc.="Account Management fee";
+  }
+  if ($type eq 'M'){
+    $desc.="Sundry";
+  }		
+  		
   if ($type eq 'L' && $desc eq ''){
+    
     $desc="Lost Item";
   }
   if ($type eq 'REF'){
+	$desc.="Cash Refund";    
     $amountleft=refund('',$borrowernumber,$amount);
   }
+  if(($type eq 'L') or ($type eq 'F') or ($type eq 'A') or ($type eq 'N') or ($type eq 'M') ){
+  $notifyid=1;	
+  }
+ 	
   if ($itemnum ne ''){
     $desc.=" ".$itemnum;
     my $sth=$dbh->prepare("INSERT INTO  accountlines
-                        (borrowernumber, accountno, date, amount, description, accounttype, amountoutstanding, itemnumber)
-        VALUES (?, ?, now(), ?,?, ?,?,?)");
+                        (borrowernumber, accountno, date, amount, description, accounttype, amountoutstanding, itemnumber,notify_id)
+        VALUES (?, ?, now(), ?,?, ?,?,?,?)");
 #     $sth->execute($borrowernumber, $accountno, $amount, $desc, $type, $amountleft, $data->{'itemnumber'});
-     $sth->execute($borrowernumber, $accountno, $amount, $desc, $type, $amountleft, $itemnum);
+     $sth->execute($borrowernumber, $accountno, $amount, $desc, $type, $amountleft, $itemnum,$notifyid);
   } else {
     my $sth=$dbh->prepare("INSERT INTO	accountlines
-			(borrowernumber, accountno, date, amount, description, accounttype, amountoutstanding)
-			VALUES (?, ?, now(), ?, ?, ?, ?)");
-    $sth->execute($borrowernumber, $accountno, $amount, $desc, $type, $amountleft);
+			(borrowernumber, accountno, date, amount, description, accounttype, amountoutstanding,notify_id)
+			VALUES (?, ?, now(), ?, ?, ?, ?,?)");
+    $sth->execute($borrowernumber, $accountno, $amount, $desc, $type, $amountleft,$notifyid);
   }
 }
 

Index: C4/Members.pm
===================================================================
RCS file: /sources/koha/koha/C4/Members.pm,v
retrieving revision 1.32.2.20
retrieving revision 1.32.2.21
diff -u -b -r1.32.2.20 -r1.32.2.21
--- C4/Members.pm	20 Nov 2006 11:01:03 -0000	1.32.2.20
+++ C4/Members.pm	24 Nov 2006 13:56:19 -0000	1.32.2.21
@@ -17,7 +17,7 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
-# $Id: Members.pm,v 1.32.2.20 2006/11/20 11:01:03 toins Exp $
+# $Id: Members.pm,v 1.32.2.21 2006/11/24 13:56:19 btoumi Exp $
 
 use strict;
 require Exporter;
@@ -29,7 +29,7 @@
 
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
 
-$VERSION = do { my @v = '$Revision: 1.32.2.20 $' =~ /\d+/g; shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v ); };
+$VERSION = do { my @v = '$Revision: 1.32.2.21 $' =~ /\d+/g; shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v ); };
 
 =head1 NAME
 
@@ -1031,7 +1031,7 @@
 			FROM accountlines 
 			WHERE borrowernumber=? 
 			AND notify_id=? 
-			AND (accounttype='FU' OR accounttype='IP' OR accounttype='CH' OR accounttype='RE' OR accounttype='RL')
+			AND (accounttype='FU' OR accounttype='N' OR accounttype='M'OR accounttype='A'OR accounttype='F'OR accounttype='L' OR accounttype='IP' OR accounttype='CH' OR accounttype='RE' OR accounttype='RL')
 			AND amountoutstanding != '0' 
 			ORDER BY notify_id,accounttype
 		|;

Index: members/pay.pl
===================================================================
RCS file: /sources/koha/koha/members/pay.pl,v
retrieving revision 1.4.2.2
retrieving revision 1.4.2.3
diff -u -b -r1.4.2.2 -r1.4.2.3
--- members/pay.pl	17 Nov 2006 14:57:22 -0000	1.4.2.2
+++ members/pay.pl	24 Nov 2006 13:56:19 -0000	1.4.2.3
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: pay.pl,v 1.4.2.2 2006/11/17 14:57:22 tipaul Exp $
+# $Id: pay.pl,v 1.4.2.3 2006/11/24 13:56:19 btoumi Exp $
 
 # written 11/1/2000 by chris at katipo.oc.nz
 # part of the koha library system, script to facilitate paying off fines
@@ -111,7 +111,7 @@
 			if ($accts->[$i]{'amountoutstanding'} > 0){
 				$accts->[$i]{'amount'}+=0.00;
 				$accts->[$i]{'amountoutstanding'}+=0.00;
-				$line{i}=$i;
+				$line{i}=$j."".$i;
 				$line{itemnumber} = $accts->[$i]{'itemnumber'};
 				$line{accounttype} = $accts->[$i]{'accounttype'};
 				$line{amount} = sprintf("%.2f",$accts->[$i]{'amount'});





More information about the Koha-cvs mailing list