[Koha-patches] [PATCH] Bug 9724 - Hourly loans don't show time due in SCO

Owen Leonard oleonard at myacpl.org
Thu Apr 24 18:02:33 CEST 2014


Due dates in the self checkout module don't display the time items are
due, and thus items which are on hourly loans don't display an accurate
due date and time. This patch corrects this by adding the "with_hours =>
1" parameter.

To test, enable an hourly loan period for an itemtype in your
collection. Log into the self-checkout system and check out an item
which circulates by the hour. The due date and time should be displayed
correctly.

Test in both prog and Bootstrap themes.
---
 .../opac-tmpl/bootstrap/en/modules/sco/sco-main.tt |    4 ++--
 .../opac-tmpl/prog/en/modules/sco/sco-main.tt      |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt
index e7a42e7..d73de6e 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt
@@ -229,9 +229,9 @@
                                                 </td>
                                                 <td>[% ISSUE.itemcallnumber %]</td>
                                                 [% IF ( ISSUE.overdue ) %]
-                                                    <td class="overdue"><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates %]</span></td>
+                                                    <td class="overdue"><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates with_hours => 1 %]</span></td>
                                                 [% ELSE   %]
-                                                    <td><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates %]</span></td>
+                                                    <td><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates with_hours => 1 %]</span></td>
                                                 [% END %]
                                                 <td>
                                                     <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt
index a5661d5..3d444bb 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt
@@ -276,7 +276,7 @@ Sorry, this self-checkout station has lost authentication.  Please contact the a
 	<td>[% UNLESS ( noitemlinks ) %]<a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE.biblionumber %]">[% ISSUE.title |html %]</a>[% ELSE %]<strong>[% ISSUE.title |html %]</strong>[% END %]<span class="item-details">
 	[% ISSUE.author %]</span> ([% ISSUE.barcode %])</td>
 	<td>[% ISSUE.itemcallnumber %]</td>
-    [% IF ( ISSUE.overdue ) %]<td class="overdue"><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates %]</span></td>[% ELSE %]<td><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates %]</span></td>[% END %]
+    [% IF ( ISSUE.overdue ) %]<td class="overdue"><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates with_hours => 1 %]</span></td>[% ELSE %]<td><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates with_hours => 1 %]</span></td>[% END %]
 	<td>
     <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
     <input type="hidden" name="patronid" value="[% patronid %]" />
-- 
1.7.9.5


More information about the Koha-patches mailing list