koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha negotiate.pl pay.pl C4/Accounts2.pm koha-t... [dev_week]


From: Kyle Hall
Subject: [Koha-cvs] koha negotiate.pl pay.pl C4/Accounts2.pm koha-t... [dev_week]
Date: Fri, 27 Apr 2007 15:02:32 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         dev_week
Changes by:     Kyle Hall <kylemhall>   07/04/27 15:02:32

Modified files:
        .              : negotiate.pl pay.pl 
        C4             : Accounts2.pm 
        koha-tmpl/intranet-tmpl/ccfls/en/members: memberentry.tmpl 

Log message:
        Branchcode was not being added for fine payments.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/negotiate.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.1.2.2&r2=1.1.2.3
http://cvs.savannah.gnu.org/viewcvs/koha/pay.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.9.2.5.2.3&r2=1.9.2.5.2.4
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Accounts2.pm?cvsroot=koha&only_with_tag=dev_week&r1=1.22.4.1.2.3&r2=1.22.4.1.2.4
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/ccfls/en/members/memberentry.tmpl?cvsroot=koha&only_with_tag=dev_week&r1=1.1.2.1.2.8&r2=1.1.2.1.2.9

Patches:
Index: negotiate.pl
===================================================================
RCS file: /sources/koha/koha/Attic/negotiate.pl,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -b -r1.1.2.2 -r1.1.2.3
--- negotiate.pl        27 Apr 2007 13:30:35 -0000      1.1.2.2
+++ negotiate.pl        27 Apr 2007 15:02:31 -0000      1.1.2.3
@@ -52,6 +52,8 @@
     }
 );
 
+my $branch = $input->cookie('branch');
+
 #get account details
 my %bor;
 $bor{'borrowernumber'} = $bornum;
@@ -73,11 +75,12 @@
          amount = ?,
          description = CONCAT( description, ' *' ),
          amountoutstanding = ?,
+         branchcode = ?,
          timestamp = NOW( ) 
        WHERE
          accountno = ?;"
       );
-      $sth->execute( $amount, $amount, $accountno );
+      $sth->execute( $amount, $amount, $branch, $accountno );
       $sth->finish;
     }
 }

Index: pay.pl
===================================================================
RCS file: /sources/koha/koha/Attic/pay.pl,v
retrieving revision 1.9.2.5.2.3
retrieving revision 1.9.2.5.2.4
diff -u -b -r1.9.2.5.2.3 -r1.9.2.5.2.4
--- pay.pl      26 Mar 2007 16:28:42 -0000      1.9.2.5.2.3
+++ pay.pl      27 Apr 2007 15:02:31 -0000      1.9.2.5.2.4
@@ -2,7 +2,7 @@
 # WARNING: Not enough context to figure out the correct tabstop size
 # WARNING: Assume that this file uses 4-character tabs
 
-# $Id: pay.pl,v 1.9.2.5.2.3 2007/03/26 16:28:42 kylemhall Exp $
+# $Id: pay.pl,v 1.9.2.5.2.4 2007/04/27 15:02:31 kylemhall Exp $
 
 #written 11/1/2000 by address@hidden
 #part of the koha library system, script to facilitate paying off fines
@@ -41,6 +41,7 @@
 if ( $bornum eq '' ) {
     $bornum = $input->param('bornum0');
 }
+my $branch = $input->cookie('branch');
 
 #get borrower details
 my $data = borrdata( '', $bornum );
@@ -82,8 +83,7 @@
         my $amount    = $input->param( $names[ $i + 4 ] );
         my $bornum    = $input->param( $names[ $i + 5 ] );
         my $accountno = $input->param( $names[ $i + 6 ] );
-        makepayment( $bornum, $accountno, $amount, $user,
-            C4::Context->userenv->{branch} );
+        makepayment( $bornum, $accountno, $amount, $user, $branch );
         $check = 2;
     }
 }

Index: C4/Accounts2.pm
===================================================================
RCS file: /sources/koha/koha/C4/Attic/Accounts2.pm,v
retrieving revision 1.22.4.1.2.3
retrieving revision 1.22.4.1.2.4
diff -u -b -r1.22.4.1.2.3 -r1.22.4.1.2.4
--- C4/Accounts2.pm     26 Apr 2007 17:58:57 -0000      1.22.4.1.2.3
+++ C4/Accounts2.pm     27 Apr 2007 15:02:32 -0000      1.22.4.1.2.4
@@ -172,13 +172,13 @@
 
   # create new line
   my $payment=0-$amount;
-  $dbh->do(<<EOT);
+  my $description = "Payment, thanks.";
+  $sth = $dbh->prepare("
        INSERT INTO     accountlines
-                       (borrowernumber, accountno, date, amount,
-                        description, accounttype, amountoutstanding, 
branchcode)
-       VALUES          ($bornumber, $nextaccntno, now(), $payment,
-                       'Payment,thanks - $user', 'Pay', 0, '$branchcode')
-EOT
+      (borrowernumber, accountno, date, amount, description, accounttype, 
amountoutstanding, branchcode)
+    VALUES (?, ?, now(), ?, ?, 'Pay', 0, ?)
+    ");
+  $sth->execute( $bornumber, $nextaccntno, $payment, $description, $branchcode 
);
 
   # FIXME - The second argument to &UpdateStats is supposed to be the
   # branch code.

Index: koha-tmpl/intranet-tmpl/ccfls/en/members/memberentry.tmpl
===================================================================
RCS file: 
/sources/koha/koha/koha-tmpl/intranet-tmpl/ccfls/en/members/Attic/memberentry.tmpl,v
retrieving revision 1.1.2.1.2.8
retrieving revision 1.1.2.1.2.9
diff -u -b -r1.1.2.1.2.8 -r1.1.2.1.2.9
--- koha-tmpl/intranet-tmpl/ccfls/en/members/memberentry.tmpl   25 Apr 2007 
14:05:30 -0000      1.1.2.1.2.8
+++ koha-tmpl/intranet-tmpl/ccfls/en/members/memberentry.tmpl   27 Apr 2007 
15:02:32 -0000      1.1.2.1.2.9
@@ -64,7 +64,7 @@
                
                <div class="error">
                <h3>Missing Information</h3>
-                       <p>The following fields have a forbidden value. Correct 
them and press OK again :</p><ul>
+                       <p>The following fields have a forbidden value. Correct 
them and click <i>Add This Patron</i> Or <i>Update This Patron</i> again 
:</p><ul>
 
                    <!-- FOR CCFLS ONLY -->
                         <!-- TMPL_IF NAME="ERROR_dateofbirth" -->
@@ -375,7 +375,7 @@
 
 <td>
 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->"><!-- 
TMPL_IF NAME="addAction" -->
-<input tabindex="24" name="submit" type="submit" class="submit" value="Add 
This Patron" /><!-- TMPL_ELSE --><input tabindex="25" name="submit" 
type="submit" class="submit" value="Update This Patron" /><!-- /TMPL_IF --></p>
+<input tabindex="24" name="submit" type="submit" class="cancel" value="Add 
This Patron" /><!-- TMPL_ELSE --><input tabindex="25" name="submit" 
type="submit" class="cancel" value="Update This Patron" /><!-- /TMPL_IF --></p>
 </td>
        </tr>
         




reply via email to

[Prev in Thread] Current Thread [Next in Thread]