Bug 25812 - Fines can be displayed on SIP checkin/checkout
Summary: Fines can be displayed on SIP checkin/checkout
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: SIP2 (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Matthias Meusburger
QA Contact: Kyle M Hall
URL:
Keywords:
Depends on: 25815
Blocks:
  Show dependency treegraph
 
Reported: 2020-06-19 08:57 UTC by Matthias Meusburger
Modified: 2023-12-28 20:45 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00


Attachments
Bug 25812: Display overdue fines for the document on SIP checkin. (1.67 KB, patch)
2020-06-19 08:59 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 25812: Display overdue fines for the item on SIP checkin. (1.65 KB, patch)
2020-06-26 13:46 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 25812: Display overdue fines for the item on SIP checkin. (1.72 KB, patch)
2022-08-23 15:23 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 25812: Fines can be displayed on SIP checkin/checkout (8.34 KB, patch)
2022-11-24 13:54 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 25812: Fines can be displayed on SIP checkin/checkout (8.39 KB, patch)
2022-12-07 17:17 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Meusburger 2020-06-19 08:57:46 UTC
Display overdue fines for the document on SIP checkin

Test plan:

     - Using SIP, checkin an item that has one or several overdue fines.
     - Check that the following message is displayed (AF field):
       "You owe {correctly formatted price} for this document."
Comment 1 Matthias Meusburger 2020-06-19 08:59:10 UTC
Created attachment 106056 [details] [review]
Bug 25812: Display overdue fines for the document on SIP checkin.

Test plan:

 - Using SIP, checkin an item that has one or several overdue fines.
 - Check that the following message is displayed (AF field):
   "You owe {correctly formatted price} for this document."
Comment 2 Katrin Fischer 2020-06-22 22:44:47 UTC
I think document is not the right word here - i'd use item as it's neutral to what it is (it could be anything from keys to a multi-part language course).
Comment 3 Matthias Meusburger 2020-06-26 13:46:36 UTC
Created attachment 106340 [details] [review]
Bug 25812: Display overdue fines for the item on SIP checkin.

Test plan:

 - Using SIP, checkin an item that has one or several overdue fines.
 - Check that the following message is displayed (AF field):
   "You owe {correctly formatted price} for this item."
Comment 4 Matthias Meusburger 2020-06-26 13:48:12 UTC
Thanks for the feedback, Katrin. The new patch uses item instead of document.
Comment 5 Martin Renvoize 2022-08-23 15:23:00 UTC
Created attachment 139690 [details] [review]
Bug 25812: Display overdue fines for the item on SIP checkin.

Test plan:

 - Using SIP, checkin an item that has one or several overdue fines.
 - Check that the following message is displayed (AF field):
   "You owe {correctly formatted price} for this item."

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2022-08-23 15:24:25 UTC
Looks good and works as designed.. I wonder if other outstanding charges associated with the patron and item combination should be taken into account.. i.e. issueing charges?

Signing off, but form a QA perspective I'd love to see a Unit test.
Comment 7 Kyle M Hall 2022-09-23 18:27:36 UTC
I like this, but I think it needs to be optional. It would be nice if the feature accepted a TT template so the message could be translated, but even a simple on/off switch would suffice.
Comment 8 Matthias Meusburger 2022-11-24 13:54:17 UTC
Created attachment 144217 [details] [review]
Bug 25812: Fines can be displayed on SIP checkin/checkout

This new patch adds the following:

 - rebased on master
 - adds a configuration option in SIPconfig.xml: show_outstanding_amount
 - extends the feature to SIP checkout
 - adds unit tests
Comment 9 Matthias Meusburger 2022-11-24 13:57:18 UTC
I'm not sure if the status should be Signed Off or Needs Signoff, since Martin has signed off before, but the feature has been extended to checkouts. Feel free to change accordingly.
Comment 10 Matthias Meusburger 2022-11-24 13:59:42 UTC
Also, not sure if show_outstanding_amount should be enabled or disabled by default in SIPconfig.xml.
Comment 11 Martin Renvoize 2022-11-25 12:23:40 UTC
Tests look solid to me.. my signoff still stands.. just need a QA on this now :)
Comment 12 Kyle M Hall 2022-12-07 17:17:31 UTC
Created attachment 144476 [details] [review]
Bug 25812: Fines can be displayed on SIP checkin/checkout

Test plan:

 - Enable show_outstanding_amount in SIPconfig.xml

 - Check that the total outstanding amout for the patron is displayed on SIP
   checkout (if it exists), for example:
   Patron has fines - You owe $10.00.

 - Check that the outstanding amout for a given item is displayed on SIP
   checkin (if it exists), for example:
   "You owe $10.00 for this item."

 - Check that it is not displayed when show_outstanding_amount is disabled.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 13 Tomás Cohen Arazi 2023-01-31 13:23:10 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 14 Jonathan Druart 2023-02-01 20:28:09 UTC
+                    $message .= (" - You owe " . Koha::Number::Price->new( $balance )->format({ with_symbol => 1}) . ".");

.= a list? those parenthesis are not needed.