Bug 19532: (follow-up) Fix for wantarray change and title-string
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
82f6b8725a
commit
9e68bb7fbb
|
|
@ -260,7 +260,7 @@ sub CalcFine {
|
|||
|
||||
# check if item has been recalled. recall should have been marked Overdue by cronjob, so only look at overdue recalls
|
||||
# only charge using recall_overdue_fine if there is an item-level recall for this particular item, OR a biblio-level recall
|
||||
my @recalls = Koha::Recalls->search({ biblionumber => $item->{biblionumber}, old => undef, status => 'O' });
|
||||
my @recalls = Koha::Recalls->search({ biblionumber => $item->{biblionumber}, old => undef, status => 'O' })->as_list;
|
||||
my $bib_level_recall = 0;
|
||||
$bib_level_recall = 1 if scalar @recalls > 0;
|
||||
foreach my $recall ( @recalls ) {
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th class="anti-the">Title</th>
|
||||
<th class="psort title-string">Placed on</th>
|
||||
<th class="title-string">Expires on</th>
|
||||
<th class="psort">Placed on</th>
|
||||
<th>Expires on</th>
|
||||
<th>Pickup location</th>
|
||||
<th>Status</th>
|
||||
<th>Due date</th>
|
||||
|
|
@ -55,13 +55,13 @@
|
|||
</a>
|
||||
[% RECALL.biblio.author | html %]
|
||||
</td>
|
||||
<td class="recalldate">
|
||||
<td class="recalldate" data-order="[% RECALL.recalldate | html %]">
|
||||
<span title="[% RECALL.recalldate | html %]">
|
||||
<span class="tdlabel">Recall date:</span>
|
||||
[% RECALL.recalldate | $KohaDates %]
|
||||
</span>
|
||||
</td>
|
||||
<td class="expirationdate">
|
||||
<td class="expirationdate" data-order="[% RECALL.expirationdate | html %]">
|
||||
[% IF ( RECALL.expirationdate ) %]
|
||||
<span title="[% RECALL.expirationdate | html %]">
|
||||
<span class="tdlabel">Expiration:</span>
|
||||
|
|
|
|||
|
|
@ -756,8 +756,8 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th class="anti-the">Title</th>
|
||||
<th class="psort title-string">Placed on</th>
|
||||
<th class="title-string">Expires on</th>
|
||||
<th class="psort">Placed on</th>
|
||||
<th>Expires on</th>
|
||||
<th>Pickup location</th>
|
||||
<th>Status</th>
|
||||
<th class="nosort"> </th>
|
||||
|
|
@ -769,13 +769,13 @@
|
|||
<td class="title">
|
||||
<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 %]
|
||||
</td>
|
||||
<td class="recalldate">
|
||||
<td class="recalldate" data-order="[% RECALL.recalldate | html %]">
|
||||
<span title="[% RECALL.recalldate | html %]">
|
||||
<span class="tdlabel">Recall date:</span>
|
||||
[% RECALL.recalldate | $KohaDates %]
|
||||
</span>
|
||||
</td>
|
||||
<td class="expirationdate">
|
||||
<td class="expirationdate" data-order="[% RECALL.expirationdate | html %]">
|
||||
[% IF ( RECALL.expirationdate ) %]
|
||||
<span title="[% RECALL.expirationdate | html %]">
|
||||
<span class="tdlabel">Expiration:</span>
|
||||
|
|
|
|||
|
|
@ -928,13 +928,13 @@ subtest 'Recalls tests' => sub {
|
|||
item_level_recall => 1
|
||||
})->store;
|
||||
|
||||
my $recalls_count = scalar $biblio->recalls;
|
||||
my $recalls_count = $biblio->recalls->count;
|
||||
is( $recalls_count, 3, 'Correctly get number of active recalls for biblio' );
|
||||
|
||||
$recall1->set_cancelled;
|
||||
$recall2->set_expired({ interface => 'COMMANDLINE' });
|
||||
|
||||
$recalls_count = scalar $biblio->recalls;
|
||||
$recalls_count = $biblio->recalls->count;
|
||||
is( $recalls_count, 1, 'Correctly get number of active recalls for biblio' );
|
||||
|
||||
t::lib::Mocks::mock_preference('UseRecalls', 0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue