[Koha-bugs] [Bug 27272] Move C4::Items::GetItemsInfo to Koha namespace

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jun 7 10:33:16 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27272

--- Comment #38 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
(In reply to Nick Clemens from comment #36)
> Rough test plan - Jonathan, at one point you switch from item.onloan to
> item.checkout - do we need this extra fetch? onloan both tells us if checked
> out, and provides due date

>From opac-reserve:

-        my $issue = Koha::Checkouts->find( { itemnumber => $itemNum } );
-        if ( $issue ) {
-            $itemLoopIter->{dateDue} = output_pref({ dt =>
dt_from_string($issue->date_due, 'sql'), as_due_date => 1 });
-            $itemLoopIter->{onloan} = 'onloan';

So "onloan" was actually coming from item->checkout.

Also:
                                                                [% IF (
itemLoo.dateDue ) %]
-                                                                    <span
class="checkedout">Due [% itemLoo.dateDue | html %]</span>
+                                                                [% IF (
itemLoo.checkout.date_due) %]
+                                                                    <span
class="checkedout">Due [% itemLoo.checkout.date_due| $KohaDates as_due_date =>
1 %]</span>

=> We need the date_due from issue->checkout anyway.

Thanks a lot for the test plan, Nick!

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list