X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=members%2Fpay.pl;h=f19f5b8e8891bb73024f3cc5265f158ba539cce1;hb=f1f833c96568284552dae2b12f14229ef5c991bc;hp=a6504721dcb869e86d1e9157516a1aab0987b1f7;hpb=dd8bc5076865912e8885a0d87f18a229d680d343;p=srvgit diff --git a/members/pay.pl b/members/pay.pl index a6504721dc..f19f5b8e88 100755 --- a/members/pay.pl +++ b/members/pay.pl @@ -45,7 +45,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => { borrowers => 1 }, + flagsrequired => { borrowers => 1, updatecharges => 1 }, debug => 1, } ); @@ -147,18 +147,20 @@ $template->param( picture => 1 ) if $picture; firstname => $data->{'firstname'}, surname => $data->{'surname'}, borrowernumber => $borrowernumber, - cardnumber => $data->{'cardnumber'}, - categorycode => $data->{'categorycode'}, - category_type => $data->{'category_type'}, - category_description => $data->{'description'}, - address => $data->{'address'}, - address2 => $data->{'address2'}, - city => $data->{'city'}, - zipcode => $data->{'zipcode'}, - phone => $data->{'phone'}, - email => $data->{'email'}, - branchcode => $data->{'branchcode'}, - is_child => ($data->{'category_type'} eq 'C'), + cardnumber => $data->{'cardnumber'}, + categorycode => $data->{'categorycode'}, + category_type => $data->{'category_type'}, + categoryname => $data->{'description'}, + address => $data->{'address'}, + address2 => $data->{'address2'}, + city => $data->{'city'}, + zipcode => $data->{'zipcode'}, + country => $data->{'country'}, + phone => $data->{'phone'}, + email => $data->{'email'}, + branchcode => $data->{'branchcode'}, + branchname => GetBranchName($data->{'branchcode'}), + is_child => ($data->{'category_type'} eq 'C'), total => sprintf( "%.2f", $total ) ); output_html_with_http_headers $input, $cookie, $template->output; @@ -198,7 +200,7 @@ sub writeoff { undef $itemnum unless $itemnum; # if no item is attached to fine, make sure to store it as a NULL my $sth = $dbh->prepare( -"Update accountlines set amountoutstanding=0 where (accounttype='Res' OR accounttype='FU' OR accounttype ='IP' OR accounttype='CH' OR accounttype='N' OR accounttype='F' OR accounttype='A' OR accounttype='M' OR accounttype='L' OR accounttype='RE' OR accounttype='RL') and accountno=? and borrowernumber=?" +"Update accountlines set amountoutstanding=0 where accountno=? and borrowernumber=?" ); $sth->execute( $accountnum, $borrowernumber ); $sth->finish;