[Koha-bugs] [Bug 18527] Add a system preference to exclude renewals from the quick slip

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jul 17 19:30:40 CEST 2017


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

--- Comment #10 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
(In reply to Katrin Fischer from comment #9)
> Can we document how this would work with TT?
> 
> Excluding the renewed ones = removing checkouts with last renewal today?

Since you have Koha::Objects based objects and the power of TT, you can do
whatever you like.

Something like the following should achieve the same goal.

[% SET today_date = today | $KohaDates %
[% FOREACH checkout IN checkouts %]
    [% IF checkout.renewals %]
        This checkout has been renewed [% checkout.renewals %] times.
        [% SET last_renewal_date = checkout.lastreneweddate | $KohaDates %]
        [% IF today_date == last_renewal_date%]
            It has been renewed today!
        [% END %]
    [% ELSE %]
        This checkout has never been renewed.
    [% END %]
[% END %]

You can use today.substr instead of the the KohaDates filter if you prefer.

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


More information about the Koha-bugs mailing list