From 8ca9c864838cfba6f614bfa58520f12d5704b1d4 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 25 Aug 2014 08:30:09 -0400 Subject: [PATCH] Bug 12820 - SIP2 does not send rental charge fee! 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! Test Plan: 1) Check out an item with a rental fee via SIP2. 2) Note the BV field is missing. 3) Apply this patch, restart your SIP2 server. 4) Repeat step 1. 5) Note the BV field is now set to the correct value. Signed-off-by: Chris Cormack --- C4/SIP/ILS/Item.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/C4/SIP/ILS/Item.pm b/C4/SIP/ILS/Item.pm index 7f144a8..991ac1d 100644 --- a/C4/SIP/ILS/Item.pm +++ b/C4/SIP/ILS/Item.pm @@ -92,7 +92,10 @@ sub new { my $it = C4::Context->preference('item-level_itypes') ? $item->{itype} : $item->{itemtype}; my $itemtype = Koha::Database->new()->schema()->resultset('Itemtype')->find( $it ); - $item->{sip_media_type} = $itemtype->sip_media_type() if $itemtype; + if ($itemtype) { + $item->{sip_media_type} = $itemtype->sip_media_type(); + $item->{fee} = $itemtype->rentalcharge(); + } # check if its on issue and if so get the borrower my $issue = GetItemIssue($item->{'itemnumber'}); -- 1.9.1