Bug 32134: Show the bundle size when checked out

When checking out a bundle, it can be useful to know the number of items
in this bundle, so that librarians can quickly check if items are
missing.

Test plan:
1. Create a bundle (see bug 28854 comment 458)
2. Check out the bundle.
3. Verify that you have the bundle size in the message below the barcode
   input ("Checked out: [...]. Bundle of X items. Due on [...]")
4. Checkout an item that is not a bundle.
5. Verify that the bundle message does not appear

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Julian Maurice 2022-11-08 15:19:20 +01:00 committed by Tomas Cohen Arazi
parent 9f44dc5295
commit b00c213876
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -9,6 +9,7 @@
[% USE ItemTypes %]
[% USE Price %]
[% USE AuthorisedValues %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
[% Asset.css("lib/jquery/plugins/rowGroup/stylesheets/rowGroup.dataTables.min.css") | $raw %]
@ -773,7 +774,17 @@
[% IF ( issue ) %]
<div class="lastchecked">
<p><strong>Checked out: </strong>[% issue.item.biblio.title | html %] ([% issue.item.barcode | html %]). Due on [% issue.date_due | $KohaDates as_due_date => 1 %]</p>
<p>
<strong>Checked out: </strong>
[% issue.item.biblio.title | html %] ([% issue.item.barcode | html %]).
[% IF issue.item.is_bundle %]
[% SET bundle_items_count = issue.item.bundle_items.count %]
[% tnx('Bundle of {count} item', 'Bundle of {count} items', bundle_items_count, { count = bundle_items_count }) | html %].
[% END %]
Due on [% issue.date_due | $KohaDates as_due_date => 1 %]
</p>
</div>
[% END %]
</form> <!-- /#mainform -->