Bug 25812

Summary: Fines can be displayed on SIP checkin/checkout
Product: Koha Reporter: Matthias Meusburger <matthias.meusburger>
Component: SIP2Assignee: Matthias Meusburger <matthias.meusburger>
Status: Passed QA --- QA Contact: Kyle M Hall <kyle>
Severity: enhancement    
Priority: P5 - low CC: colin.campbell, jonathan.druart+koha, kyle, martin.renvoize, sally.healey
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 25812: Display overdue fines for the document on SIP checkin.
Bug 25812: Display overdue fines for the item on SIP checkin.
Bug 25812: Display overdue fines for the item on SIP checkin.
Bug 25812: Fines can be displayed on SIP checkin/checkout
Bug 25812: Fines can be displayed on SIP checkin/checkout

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>