[Koha-bugs] [Bug 33210] (Bug 31963 follow-up) No hold fee message on OPAC should be displayed when there is no fee

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Mar 13 15:11:05 CET 2023


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

Janusz Kaczmarek <januszop at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |Needs Signoff
           Assignee|koha-bugs at lists.koha-commun |januszop at gmail.com
                   |ity.org                     |

--- Comment #1 from Janusz Kaczmarek <januszop at gmail.com> ---
Created attachment 148120
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148120&action=edit
Bug 33210: (Bug 31963 follow-up) No hold fee message on OPAC should be
displayed when there is no fee

After resolving Bug 31963 everything works as expected when there is
hold fee defined (!= 0).  But in case when the fee for given patron
category is set to 0.00, the user will always see the message "You will
be charged a hold fee of 0,00 ...", which is obviously not intended.

This is because categories.reservefee is returned from database as
'0.000000' and as such, without type casting, is interpreted as string
in Perl. Prior to Bug 31963 the result was compared to 0 before sending
anything to the template, so the casting was done, now it is not.

To test:
========
1. Go to Administration -> Patron categories
2. Edit your patron category and give a hold fee of 0.
3. HoldFeeMode does not matter - you can set it to any value.
4. In another tab, open the OPAC.
5. Search the OPAC for any record with an item.
6. Go to place a hold on this record.  You will see "You will be
   charged a hold fee of 0,00" --> This is a bug.
7. Apply patch and restart services.
6. Repeat step 6.
8. You should NOT see the hold fee message.

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


More information about the Koha-bugs mailing list