pay.pl: bug fix , add variable declaration
authorbtoumi <btoumi>
Tue, 13 Jun 2006 09:19:18 +0000 (09:19 +0000)
committerbtoumi <btoumi>
Tue, 13 Jun 2006 09:19:18 +0000 (09:19 +0000)
pay.tmpl bug fix modify wrong url to access pay.pl
add back url ( from pay.tmpl to moremember.tmpl )
memberentry.pl: replace variable name

koha-tmpl/intranet-tmpl/prog/en/members/pay.tmpl
members/memberentry.pl
members/pay.pl

index 2472e6c..92a8dc4 100644 (file)
@@ -4,8 +4,10 @@
 <!-- TMPL_INCLUDE NAME="menu-members.inc" -->
 
 <h1>Pay Fines for <!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --></h1>
-<form action="/cgi-bin/koha/pay.pl" method="post">
+<a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR name="bornum" -->">Back to borrower</a> 
+<form action="/cgi-bin/koha/members/pay.pl" method="post">
        <input type="hidden" name="bornum" value="<!-- TMPL_VAR name="bornum" -->" />
+
 <table>
 <tr>
        <th>Fines &amp; Charges</th>
@@ -41,5 +43,4 @@
 </tr>
 </table>
 <input type="submit" name="submit"  value="Make Payment" class="submit" /></form>
-
 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file
index fe1db55..6bfa455 100755 (executable)
@@ -56,7 +56,6 @@ my ($template, $loggedinuser, $cookie)
                             flagsrequired => {borrowers => 1},
                             debug => 1,
                             });
-my $borrowerid=$input->param('borrowerid');
 my $guarantorid=$input->param('guarantorid');
 my $borrowernumber=$input->param('borrowernumber');
 my $actionType=$input->param('actionType') || '';
@@ -94,11 +93,7 @@ if ($step eq 0){
     foreach my $column (keys %$borrower_data){
        $data{$column}=$borrower_data->{$column};
     }
-    $data{'borrowerid'}=$borrowernumber;
-    if (!$borrowerid){
-       $borrowerid=$borrowernumber;
-    }
-}    
+   }    
 
 if ($op eq 'add' or $op eq 'modify') {
        my @names=$input->param;
@@ -210,7 +205,7 @@ if ($category_type eq 'C' and $guarantorid ne '' and $data{'contactname'} eq '')
                                if ($data{'organisations'}){                                
                                    # need to add the members organisations
                                    my @orgs=split(/\|/,$data{'organisations'});
-                                   add_member_orgs($borrowerid,\@orgs);
+                                   add_member_orgs($borrowernumber,\@orgs);
                                 }
                                logaction($loggedinuser,"MEMBERS","add member", $borrowernumber, "");
                        }
index 1bad384..7aedff9 100755 (executable)
@@ -140,7 +140,8 @@ if ($check ==0){
                $bornum=$input->param("bornum$value");
                my $itemno=$input->param("itemnumber$value");
                my $amount=$input->param("amount$value");
-               writeoff($bornum,$accountno,$itemno,$accounttype,$amount);
+               my $accountno=$input->param("accountno$value");
+               writeoff($bornum,$accountno,$itemno,$accounttype,$amount);
        }
        $bornum=$input->param('bornum');
        print $input->redirect("/cgi-bin/koha/members/moremember.pl?bornum=$bornum");