Lines 32-46
my $flags = {
Link Here
|
32 |
my $type = 'intranet'; |
32 |
my $type = 'intranet'; |
33 |
my ($user, $cookie) = C4::Auth::checkauth($cgi, $authnotrequired, $flags, $type); |
33 |
my ($user, $cookie) = C4::Auth::checkauth($cgi, $authnotrequired, $flags, $type); |
34 |
|
34 |
|
35 |
my $borrowernumber = $cgi->param('borrowernumber'); |
35 |
my $op = $cgi->param('op') // q{}; |
36 |
my $accountlines_id = $cgi->param('accountlines_id'); |
36 |
|
37 |
|
37 |
if ( $op eq "cud-cancel" ) { |
38 |
my $charge = Koha::Account::Lines->find($accountlines_id); |
38 |
my $accountlines_id = $cgi->param('accountlines_id'); |
39 |
$charge->cancel( |
39 |
|
40 |
{ |
40 |
my $charge = Koha::Account::Lines->find($accountlines_id); |
41 |
branch => C4::Context->userenv->{'branch'}, |
41 |
my $borrowernumber = $charge->patron->borrowernumber; |
42 |
staff_id => C4::Context->userenv->{'number'} |
42 |
$charge->cancel( |
43 |
} |
43 |
{ |
44 |
); |
44 |
branch => C4::Context->userenv->{'branch'}, |
45 |
|
45 |
staff_id => C4::Context->userenv->{'number'} |
46 |
print $cgi->redirect('/cgi-bin/koha/members/boraccount.pl?borrowernumber=' . $borrowernumber); |
46 |
} |
|
|
47 |
); |
48 |
print $cgi->redirect( '/cgi-bin/koha/members/boraccount.pl?borrowernumber=' . $borrowernumber ); |
49 |
exit; |
50 |
} |
51 |
|
52 |
print $cgi->redirect('/cgi-bin/koha/errors/403.pl'); |
47 |
- |
|
|