[Koha-bugs] [Bug 26648] Prevent internal server error if item attached to old checkout has been removed

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Oct 9 22:52:22 CEST 2020


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

--- Comment #6 from Caroline Cyr La Rose <caroline.cyr-la-rose at inlibro.com> ---
Oh yeah, we should remove the random price to use in production

[%- USE KohaDates -%]
[%- USE Price -%]
[% totalValue = 0 %]
[% totalSavings = 0 %]
<h3><<branches.branchname>></h3>
Checked out by <<borrowers.firstname>> <<borrowers.surname>> <br />
(<<borrowers.cardnumber>>) <br />

<<today>><br />

<h4>Borrowed today</h4>
[% FOREACH checkout IN checkouts %]
[%~ SET item = checkout.item %]
[%~ SET biblio = checkout.item.biblio %]
[% totalValue = item.price + totalValue %]
[% totalSavings = item.price + totalSavings %]
<p>[% biblio.title %]<br />
Call number: [% item.itemcallnumber %]<br />
Due date: [% checkout.date_due | $KohaDates %]</p>
[% END %]

[% IF overdues.count %]
<h4>Overdues</h4>
[% FOREACH overdue IN overdues %]
[%~ SET item = overdue.item %]
[%~ SET biblio = overdue.item.biblio %]
[% totalValue = item.price + totalValue %]
[% totalSavings = item.price + totalSavings %]
<p>[% biblio.title %]<br />
Call number: [% item.itemcallnumber %]<br />
Due date: [% overdue.date_due | $KohaDates %]</p>
[% END %]
[% END %]

[% FOREACH old_checkout IN borrower.old_checkouts %]
  [% IF old_checkout.item %]
[% totalSavings = old_checkout.item.price + totalSavings %]
  [% END %]
[% END %]

<p>You saved [% totalValue | $Price %] by using the library today!</p>
<p>Since you've been a member of the library, you saved [% totalSavings |
$Price %]!</p>

<hr>

<h4 style="text-align: center; font-style:italic;">News</h4>
<news>
<div class="newsitem">
<h5 style="margin-bottom: 1px; margin-top: 1px"><b><<opac_news.title>></b></h5>
<p style="margin-bottom: 1px; margin-top: 1px"><<opac_news.content>></p>
<p class="newsfooter" style="font-size: 8pt; font-style:italic; margin-bottom:
1px; margin-top: 1px">Published on <<opac_news.timestamp>></p>
<hr />
</div>
</news>

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


More information about the Koha-bugs mailing list