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

(-)a/C4/Circulation.pm (-2 / +9 lines)
Lines 1240-1248 sub checkHighHolds { Link Here
1240
1240
1241
        my $issuedate = dt_from_string();
1241
        my $issuedate = dt_from_string();
1242
1242
1243
        my $calendar = Koha::Calendar->new( branchcode => $branchcode );
1244
1245
        my $itype = $item_object->effective_itemtype;
1243
        my $itype = $item_object->effective_itemtype;
1244
        my $useDaysMode_value = Koha::CirculationRules->get_useDaysMode_effective_value(
1245
            {
1246
                categorycode => $borrower->{categorycode},
1247
                itemtype     => $itype,
1248
                branchcode   => $branchcode,
1249
            }
1250
        );
1251
        my $calendar = Koha::Calendar->new( branchcode => $branchcode, days_mode => $useDaysMode_value );
1252
1246
        my $orig_due = C4::Circulation::CalcDateDue( $issuedate, $itype, $branchcode, $borrower );
1253
        my $orig_due = C4::Circulation::CalcDateDue( $issuedate, $itype, $branchcode, $borrower );
1247
1254
1248
        my $decreaseLoanHighHoldsDuration = C4::Context->preference('decreaseLoanHighHoldsDuration');
1255
        my $decreaseLoanHighHoldsDuration = C4::Context->preference('decreaseLoanHighHoldsDuration');
(-)a/Koha/Hold.pm (-1 / +10 lines)
Lines 178-189 sub set_waiting { Link Here
178
178
179
    my $max_pickup_delay = C4::Context->preference("ReservesMaxPickUpDelay");
179
    my $max_pickup_delay = C4::Context->preference("ReservesMaxPickUpDelay");
180
    my $cancel_on_holidays = C4::Context->preference('ExpireReservesOnHolidays');
180
    my $cancel_on_holidays = C4::Context->preference('ExpireReservesOnHolidays');
181
    my $calendar = Koha::Calendar->new( branchcode => $self->branchcode );
182
181
183
    my $expirationdate = $today->clone;
182
    my $expirationdate = $today->clone;
184
    $expirationdate->add(days => $max_pickup_delay);
183
    $expirationdate->add(days => $max_pickup_delay);
185
184
186
    if ( C4::Context->preference("ExcludeHolidaysFromMaxPickUpDelay") ) {
185
    if ( C4::Context->preference("ExcludeHolidaysFromMaxPickUpDelay") ) {
186
        my $itemtype = $self->item ? $self->item->effective_itemtype : $self->biblio->itemtype;
187
        my $useDaysMode_value = Koha::CirculationRules->get_useDaysMode_effective_value(
188
            {
189
                categorycode => $self->borrower->categorycode,
190
                itemtype     => $itemtype,
191
                branchcode   => $self->branchcode,
192
            }
193
        );
194
        my $calendar = Koha::Calendar->new( branchcode => $self->branchcode, days_mode => $useDaysMode_value );
195
187
        $expirationdate = $calendar->days_forward( dt_from_string(), $max_pickup_delay );
196
        $expirationdate = $calendar->days_forward( dt_from_string(), $max_pickup_delay );
188
    }
197
    }
189
198
(-)a/misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl (-3 / +11 lines)
Lines 311-317 sub GetWaitingHolds { Link Here
311
311
312
    my $patron_branchcode_filter = $patron_branchcode ? "AND borrowers.branchcode = '$patron_branchcode'" : q{};
312
    my $patron_branchcode_filter = $patron_branchcode ? "AND borrowers.branchcode = '$patron_branchcode'" : q{};
313
313
314
    my $query = "SELECT borrowers.borrowernumber, borrowers.cardnumber, borrowers.title as patron_title, borrowers.firstname, borrowers.surname,
314
    my $query = "SELECT borrowers.borrowernumber, borrowers.cardnumber, borrowers.title as patron_title, borrowers.firstname, borrowers.surname, borrowers.categorycode,
315
                borrowers.phone, borrowers.email, borrowers.branchcode, biblio.biblionumber, biblio.title, items.barcode, reserves.waitingdate,
315
                borrowers.phone, borrowers.email, borrowers.branchcode, biblio.biblionumber, biblio.title, items.barcode, reserves.waitingdate,
316
                reserves.branchcode AS site, branches.branchname AS site_name,
316
                reserves.branchcode AS site, branches.branchname AS site_name,
317
                TO_DAYS(NOW())-TO_DAYS(reserves.waitingdate) AS days_since_waiting
317
                TO_DAYS(NOW())-TO_DAYS(reserves.waitingdate) AS days_since_waiting
Lines 332-338 sub GetWaitingHolds { Link Here
332
    $sth->execute();
332
    $sth->execute();
333
    my @results;
333
    my @results;
334
    while ( my $issue = $sth->fetchrow_hashref() ) {
334
    while ( my $issue = $sth->fetchrow_hashref() ) {
335
        my $calendar = Koha::Calendar->new( branchcode => $issue->{'site'} );
335
        my $item = Koha::Items->find({ barcode => $issue->{barcode} });
336
        my $useDaysMode_value = Koha::CirculationRules->get_useDaysMode_effective_value(
337
            {
338
                categorycode => $issue->{categorycode},
339
                itemtype     => $item->effective_itemtype,
340
                branchcode   => $issue->{site},
341
            }
342
        );
343
344
        my $calendar = Koha::Calendar->new( branchcode => $issue->{'site'}, days_mode => $useDaysMode_value );
336
345
337
        my $waiting_date = dt_from_string( $issue->{waitingdate}, 'sql' );
346
        my $waiting_date = dt_from_string( $issue->{waitingdate}, 'sql' );
338
        my $pickup_date = $waiting_date->clone->add( days => $pickupdelay );
347
        my $pickup_date = $waiting_date->clone->add( days => $pickupdelay );
339
- 

Return to bug 24159