Bug 12820

Summary: SIP2 does not send rental charge fee!
Product: Koha Reporter: Kyle M Hall <kyle>
Component: SIP2Assignee: Colin Campbell <colin.campbell>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: chris, colin.campbell, fridolin.somers, katrin.fischer, martin.renvoize, mtj, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13159
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 7904    
Bug Blocks:    
Attachments: Bug 12820 - SIP2 does not send rental charge fee!
Bug 12820 - SIP2 does not send rental charge fee!
Bug 12820 [QA Followup] - Let Koha calculate fee for Checkout
Bug 12820 [QA Followup] - Let Koha calculate fee for Checkout
Bug 12820 - SIP2 does not send rental charge fee!
Signed Off Patch
Revised Patch
Bug 12820: Handle rental fees in Sip issue and renew
[PASSED QA] Bug 12820: Handle rental fees in Sip issue and renew
Bug 12820 [QA Followup] - Tab and whitespace cleanup

Description Kyle M Hall 2014-08-25 12:30:14 UTC
Koha's SIP2 implementation has facilities to send the fee amount ( BV ) for checking out a given item, but in our code, the fee amount is never set!
Comment 1 Kyle M Hall 2014-08-25 12:32:52 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2014-08-26 07:27:43 UTC Comment hidden (obsolete)
Comment 3 Colin Campbell 2014-10-28 09:59:23 UTC
Should we not be using C4::Circulation::GetIssuingCharges to get the amount? This returns the rental fee but also calculates the discount if one is applicable, that step is omitted in this patch
Comment 4 Katrin Fischer 2014-10-28 10:08:54 UTC
Hi Colin, thank you for taking a look. I think you are correct, it won't apply the correct rental charge.
Comment 5 Kyle M Hall 2014-11-25 13:17:08 UTC Comment hidden (obsolete)
Comment 6 Kyle M Hall 2014-11-25 13:18:20 UTC Comment hidden (obsolete)
Comment 7 Katrin Fischer 2014-11-25 13:20:19 UTC
Is this really a follow up or a new patch?
Comment 8 Kyle M Hall 2014-11-25 15:18:42 UTC Comment hidden (obsolete)
Comment 9 Colin Campbell 2014-11-27 12:35:35 UTC Comment hidden (obsolete)
Comment 10 Colin Campbell 2015-02-10 13:42:07 UTC
Updated status to signed off
Comment 11 Colin Campbell 2015-02-10 17:34:16 UTC
I tried using the patch on a site and it didnt accept the fee acknowledgement. I've got a fixed patch which a site is testing with some 3M machines, will upload if they dont find any further probs
Comment 12 Colin Campbell 2015-02-12 16:17:46 UTC Comment hidden (obsolete)
Comment 13 Brendan Gallagher 2015-02-25 05:35:07 UTC Comment hidden (obsolete)
Comment 14 Kyle M Hall 2015-03-20 13:11:42 UTC
Created attachment 37038 [details] [review]
[PASSED QA] Bug 12820: Handle rental fees in Sip issue and renew

Implement correct handling of fees associated with checking out
an item.
This is associated with fee acknowledged field (BO)

To quote from the Sip2 document
" If this field is N in a Checkout message and there is a fee
associated with checking out the item, the ACS should tell the
SC in the Checkout Response that there is a fee, and refuse to
check out the item. If the SC and the patron then interact and the
patron agrees to pay the fee, this field will be set to Y on a second
Checkout message, indicating to the ACS that the patron has acknowledged
the fee and checkout of the item should not be refused just
because there is a fee associated with the item"

So there are two Checkout requests the first with BO not set to Y is
rejected but the fee amount is returned. The Second Checkout with BO set
to Y should succeed.

Added a debug log message indicating why we block a checkout
when we dont otherwise indicate

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 15 Kyle M Hall 2015-03-20 13:11:49 UTC
Created attachment 37039 [details] [review]
Bug 12820 [QA Followup] - Tab and whitespace cleanup

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 16 Tomás Cohen Arazi 2015-03-25 14:32:43 UTC
Patches pushed to master.

Thanks for making SIP support better Colin!
Comment 17 Chris Cormack 2015-03-29 06:33:27 UTC
Pushed to 3.18.x will be in 3.18.6
Comment 18 Mason James 2015-04-23 03:40:47 UTC
Pushed to 3.16.x, will be in 3.16.10
Comment 19 Fridolin Somers 2015-06-03 13:35:15 UTC
Note that this patch was pushed in 3.16.10, whereas 7904 was pushed only in 3.16.11.
We noticed SIP checkouts does not work on a 3.16.10.

So upgrade is mandatory for SIP users.