Bug 41861: Update how cost and price_paid show

1) Enabled ILLModule
2) Create a new ILL request, set a title, '42' for cardnumber and any library:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) (k-t-d required, cost is not editable in UI, but backends may set it) Run the following query:
koha-mysql kohadev
update illrequests set cost = 1;
4) Notice cost shows, now run the same but set to 0:
update illrequests set cost = 1;
5) Notice it doesn't show.
6) Apply patch. Refresh. Notice is shows '0' now.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Edith Speller <edith.speller@ukhsa.gov.uk>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 041fa90a0d)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
This commit is contained in:
Pedro Amorim 2026-02-17 10:20:11 +00:00 committed by Wainui Witika-Park
parent fd9be777fb
commit 4e83b669a5
No known key found for this signature in database
GPG Key ID: 2D0A6AB5DAF1B78D
1 changed files with 3 additions and 3 deletions

View File

@ -434,7 +434,7 @@
</li>
<li class="cost">
<label class="cost">Cost:</label>
[% IF request.cost %][% request.cost | $Price %][% ELSE %]<span>N/A</span>[% END %]
[% IF request.cost.defined %][% request.cost | $Price %][% ELSE %]<span>N/A</span>[% END %]
</li>
<li class="price_paid">
<label class="price_paid">Price paid:</label>
@ -700,13 +700,13 @@
[% type_disclaimer_date | $KohaDates with_hours => 1 %]
</li>
[% END %]
[% IF request.cost %]
[% IF request.cost.defined %]
<li class="cost">
<span class="label cost">Cost:</span>
[% request.cost | $Price %]
</li>
[% END %]
[% IF request.price_paid %]
[% IF request.price_paid.defined %]
<li class="price_paid">
<span class="label price_paid">Price paid:</span>
[% request.price_paid | $Price %]