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

(-)a/C4/Circulation.pm (-2 / +9 lines)
Lines 1238-1246 sub checkHighHolds { Link Here
1238
1238
1239
        my $issuedate = DateTime->now( time_zone => C4::Context->tz() );
1239
        my $issuedate = DateTime->now( time_zone => C4::Context->tz() );
1240
1240
1241
        my $calendar = Koha::Calendar->new( branchcode => $branchcode );
1242
1243
        my $itype = $item_object->effective_itemtype;
1241
        my $itype = $item_object->effective_itemtype;
1242
        my $useDaysMode_value = Koha::CirculationRules->get_useDaysMode_effective_value(
1243
            {
1244
                categorycode => $borrower->{categorycode},
1245
                itemtype     => $itype,
1246
                branchcode   => $branchcode,
1247
            }
1248
        );
1249
        my $calendar = Koha::Calendar->new( branchcode => $branchcode, days_mode => $useDaysMode_value );
1250
1244
        my $orig_due = C4::Circulation::CalcDateDue( $issuedate, $itype, $branchcode, $borrower );
1251
        my $orig_due = C4::Circulation::CalcDateDue( $issuedate, $itype, $branchcode, $borrower );
1245
1252
1246
        my $decreaseLoanHighHoldsDuration = C4::Context->preference('decreaseLoanHighHoldsDuration');
1253
        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