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

(-)a/misc/cronjobs/longoverdue.pl (-4 / +16 lines)
Lines 106-111 if ( scalar @branches && scalar @skip_branches ) { Link Here
106
    );
106
    );
107
}
107
}
108
108
109
my $lost_control_pref = C4::Context->preference('LostChargesControl');
110
my $home_holding_pref = C4::Context->preference('HomeOrHoldingBranch');
111
if (   ( scalar @branches || scalar @skip_branches )
112
    && $lost_control_pref eq 'PickupLibrary'
113
    && !( C4::Context->userenv->{branch} ) )
114
{
115
    pod2usage(
116
        -verbose => 0,
117
        -message =>
118
            "There is no branch set for the cron user, LostCharge Control is set to 'library you are logged in at'.\n"
119
            . "No branches will satisfy this requirement - exiting.",
120
        -exitval => 1
121
    );
122
}
123
109
if ( scalar @$itemtype && scalar @$skip_itemtype ) {
124
if ( scalar @$itemtype && scalar @$skip_itemtype ) {
110
    pod2usage(
125
    pod2usage(
111
        -verbose => 1,
126
        -verbose => 1,
Lines 359-367 sub longoverdue_sth { Link Here
359
    return C4::Context->dbh->prepare($query);
374
    return C4::Context->dbh->prepare($query);
360
}
375
}
361
376
362
my $dbh               = C4::Context->dbh;
377
my $dbh = C4::Context->dbh;
363
my $lost_control_pref = C4::Context->preference('LostChargesControl');
364
my $home_holding_pref = C4::Context->preference('HomeOrHoldingBranch');
365
378
366
my @available_categories = Koha::Patron::Categories->search()->get_column('categorycode');
379
my @available_categories = Koha::Patron::Categories->search()->get_column('categorycode');
367
$borrower_category      = [ map { uc $_ } @$borrower_category ];
380
$borrower_category      = [ map { uc $_ } @$borrower_category ];
368
- 

Return to bug 39802