View | Details | Raw Unified | Return to bug 25855
Collapse All | Expand All

(-)a/C4/Circulation.pm (-1 / +42 lines)
Lines 62-67 use Koha::Checkouts::ReturnClaims; Link Here
62
use Carp;
62
use Carp;
63
use List::MoreUtils qw( uniq any );
63
use List::MoreUtils qw( uniq any );
64
use Scalar::Util qw( looks_like_number );
64
use Scalar::Util qw( looks_like_number );
65
use Try::Tiny;
65
use Date::Calc qw(
66
use Date::Calc qw(
66
  Today
67
  Today
67
  Today_and_Now
68
  Today_and_Now
Lines 3066-3071 sub AddRenewal { Link Here
3066
            DelUniqueDebarment({ borrowernumber => $borrowernumber, type => 'OVERDUES' });
3067
            DelUniqueDebarment({ borrowernumber => $borrowernumber, type => 'OVERDUES' });
3067
        }
3068
        }
3068
3069
3070
        _post_renewal_actions(
3071
            {
3072
                renewal_library_id =>
3073
                  $item_object->renewal_branchcode( { branch => $branch } ),
3074
                charge            => $charge,
3075
                item_id           => $itemnumber,
3076
                item_type         => $itemtype,
3077
                shelving_location => $item_object->location // q{},
3078
                patron_id         => $borrowernumber,
3079
                collection_code   => $item_object->ccode // q{},
3080
                date_due          => $datedue
3081
            }
3082
        ) if C4::Context->config("enable_plugins");
3083
3069
        # Add the renewal to stats
3084
        # Add the renewal to stats
3070
        UpdateStats(
3085
        UpdateStats(
3071
            {
3086
            {
Lines 4212-4217 sub GetTopIssues { Link Here
4212
    return @$rows;
4227
    return @$rows;
4213
}
4228
}
4214
4229
4230
=head2 Internal methods
4231
4232
=cut
4233
4215
sub _CalculateAndUpdateFine {
4234
sub _CalculateAndUpdateFine {
4216
    my ($params) = @_;
4235
    my ($params) = @_;
4217
4236
Lines 4288-4293 sub _item_denied_renewal { Link Here
4288
    return 0;
4307
    return 0;
4289
}
4308
}
4290
4309
4310
=head3 _post_renewal_actions
4311
4312
Internal method that calls the post_renewal_action plugin hook on configured
4313
plugins.
4314
4315
=cut
4316
4317
sub _post_renewal_actions {
4318
    my ($params) = @_;
4319
4320
    my @plugins = Koha::Plugins->new->GetPlugins({
4321
        method => 'post_renewal_action',
4322
    });
4323
4324
    foreach my $plugin ( @plugins ) {
4325
        try {
4326
            $plugin->post_renewal_action( $params );
4327
        }
4328
        catch {
4329
            warn "$_";
4330
        };
4331
    }
4332
}
4291
4333
4292
1;
4334
1;
4293
4335
4294
- 

Return to bug 25855