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

(-)a/C4/Overdues.pm (-1 / +1 lines)
Lines 260-266 sub CalcFine { Link Here
260
260
261
        # check if item has been recalled. recall should have been marked Overdue by cronjob, so only look at overdue recalls
261
        # check if item has been recalled. recall should have been marked Overdue by cronjob, so only look at overdue recalls
262
        # only charge using recall_overdue_fine if there is an item-level recall for this particular item, OR a biblio-level recall
262
        # only charge using recall_overdue_fine if there is an item-level recall for this particular item, OR a biblio-level recall
263
        my @recalls = Koha::Recalls->search({ biblionumber => $item->{biblionumber}, old => undef, status => 'O' });
263
        my @recalls = Koha::Recalls->search({ biblionumber => $item->{biblionumber}, old => undef, status => 'O' })->as_list;
264
        my $bib_level_recall = 0;
264
        my $bib_level_recall = 0;
265
        $bib_level_recall = 1 if scalar @recalls > 0;
265
        $bib_level_recall = 1 if scalar @recalls > 0;
266
        foreach my $recall ( @recalls ) {
266
        foreach my $recall ( @recalls ) {
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt (-4 / +4 lines)
Lines 35-42 Link Here
35
                                    <thead>
35
                                    <thead>
36
                                        <tr>
36
                                        <tr>
37
                                            <th class="anti-the">Title</th>
37
                                            <th class="anti-the">Title</th>
38
                                            <th class="psort title-string">Placed on</th>
38
                                            <th class="psort">Placed on</th>
39
                                            <th class="title-string">Expires on</th>
39
                                            <th>Expires on</th>
40
                                            <th>Pickup location</th>
40
                                            <th>Pickup location</th>
41
                                            <th>Status</th>
41
                                            <th>Status</th>
42
                                            <th>Due date</th>
42
                                            <th>Due date</th>
Lines 55-67 Link Here
55
                                                    </a>
55
                                                    </a>
56
                                                    [% RECALL.biblio.author | html %]
56
                                                    [% RECALL.biblio.author | html %]
57
                                                </td>
57
                                                </td>
58
                                                <td class="recalldate">
58
                                                <td class="recalldate" data-order="[% RECALL.recalldate | html %]">
59
                                                    <span title="[% RECALL.recalldate | html %]">
59
                                                    <span title="[% RECALL.recalldate | html %]">
60
                                                        <span class="tdlabel">Recall date:</span>
60
                                                        <span class="tdlabel">Recall date:</span>
61
                                                            [% RECALL.recalldate | $KohaDates %]
61
                                                            [% RECALL.recalldate | $KohaDates %]
62
                                                    </span>
62
                                                    </span>
63
                                                </td>
63
                                                </td>
64
                                                <td class="expirationdate">
64
                                                <td class="expirationdate" data-order="[% RECALL.expirationdate | html %]">
65
                                                        [% IF ( RECALL.expirationdate ) %]
65
                                                        [% IF ( RECALL.expirationdate ) %]
66
                                                            <span title="[% RECALL.expirationdate | html %]">
66
                                                            <span title="[% RECALL.expirationdate | html %]">
67
                                                                <span class="tdlabel">Expiration:</span>
67
                                                                <span class="tdlabel">Expiration:</span>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-4 / +4 lines)
Lines 756-763 Link Here
756
                                    <thead>
756
                                    <thead>
757
                                        <tr>
757
                                        <tr>
758
                                            <th class="anti-the">Title</th>
758
                                            <th class="anti-the">Title</th>
759
                                            <th class="psort title-string">Placed on</th>
759
                                            <th class="psort">Placed on</th>
760
                                            <th class="title-string">Expires on</th>
760
                                            <th>Expires on</th>
761
                                            <th>Pickup location</th>
761
                                            <th>Pickup location</th>
762
                                            <th>Status</th>
762
                                            <th>Status</th>
763
                                            <th class="nosort">&nbsp;</th>
763
                                            <th class="nosort">&nbsp;</th>
Lines 769-781 Link Here
769
                                            <td class="title">
769
                                            <td class="title">
770
                                                <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RECALL.biblionumber | html %]">[% INCLUDE 'biblio-title.inc' biblio=RECALL.biblio %]</a> [% IF RECALL.item_level_recall %]<p class="hint">Item recalled: [% RECALL.item.barcode | html %]</p>[% END %]
770
                                                <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RECALL.biblionumber | html %]">[% INCLUDE 'biblio-title.inc' biblio=RECALL.biblio %]</a> [% IF RECALL.item_level_recall %]<p class="hint">Item recalled: [% RECALL.item.barcode | html %]</p>[% END %]
771
                                            </td>
771
                                            </td>
772
                                            <td class="recalldate">
772
                                            <td class="recalldate" data-order="[% RECALL.recalldate | html %]">
773
                                                <span title="[% RECALL.recalldate | html %]">
773
                                                <span title="[% RECALL.recalldate | html %]">
774
                                                    <span class="tdlabel">Recall date:</span>
774
                                                    <span class="tdlabel">Recall date:</span>
775
                                                    [% RECALL.recalldate | $KohaDates %]
775
                                                    [% RECALL.recalldate | $KohaDates %]
776
                                                </span>
776
                                                </span>
777
                                            </td>
777
                                            </td>
778
                                            <td class="expirationdate">
778
                                            <td class="expirationdate" data-order="[% RECALL.expirationdate | html %]">
779
                                                [% IF ( RECALL.expirationdate ) %]
779
                                                [% IF ( RECALL.expirationdate ) %]
780
                                                    <span title="[% RECALL.expirationdate | html %]">
780
                                                    <span title="[% RECALL.expirationdate | html %]">
781
                                                        <span class="tdlabel">Expiration:</span>
781
                                                        <span class="tdlabel">Expiration:</span>
(-)a/t/db_dependent/Koha/Biblio.t (-3 / +2 lines)
Lines 928-940 subtest 'Recalls tests' => sub { Link Here
928
        item_level_recall => 1
928
        item_level_recall => 1
929
    })->store;
929
    })->store;
930
930
931
    my $recalls_count = scalar $biblio->recalls;
931
    my $recalls_count = $biblio->recalls->count;
932
    is( $recalls_count, 3, 'Correctly get number of active recalls for biblio' );
932
    is( $recalls_count, 3, 'Correctly get number of active recalls for biblio' );
933
933
934
    $recall1->set_cancelled;
934
    $recall1->set_cancelled;
935
    $recall2->set_expired({ interface => 'COMMANDLINE' });
935
    $recall2->set_expired({ interface => 'COMMANDLINE' });
936
936
937
    $recalls_count = scalar $biblio->recalls;
937
    $recalls_count = $biblio->recalls->count;
938
    is( $recalls_count, 1, 'Correctly get number of active recalls for biblio' );
938
    is( $recalls_count, 1, 'Correctly get number of active recalls for biblio' );
939
939
940
    t::lib::Mocks::mock_preference('UseRecalls', 0);
940
    t::lib::Mocks::mock_preference('UseRecalls', 0);
941
- 

Return to bug 19532