-package NCIP::Handler::AccpetItem;
+package NCIP::Handler::AcceptItem;
=head1
my $root = $xmldoc->documentElement();
my $xpc = XML::LibXML::XPathContext->new;
$xpc->registerNs( 'ns', $self->namespace() );
- my $itemid =
- $xpc->findnodes( 'ns:AcceptItem/UniqueItemId/ItemIdentifierValue',
- $root );
+ my $itemid = $xpc->findnodes( '//ns:ItemId', $root );
# checkin the item
my $accepted = $self->ils->acceptitem($itemid);
else {
my $elements = $self->get_user_elements($xmldoc);
$vars->{'elements'} = $elements;
- $vars->{'checkin'} = $checkin;
+ $vars->{'accept'} = $accepted;
$output = $self->render_output( 'response.tt', $vars );
}
return $output;
my ( $reservedate, $borrowernumber, $branchcode, $reserve_id, $wait ) =
GetReservesFromItemnumber( $itemdata->{'itemnumber'} );
unless ($reserve_id) {
- $result = { success => 0, messages => 'No hold found for that item' };
+ $result = { success => 0, messages => { NO_HOLD => 1 } };
return $result;
}
- $result = $self->checkin( $barcode, $branch );
+ $result = $self->checkin( $barcode, $branchcode );
return $result;
}
1;
The item is on hold for another borrower
[% CASE 'RENEW_ISSUE' %]
This item is already on loan to this borrower
+ [% CASE 'NO_HOLD' %]
+ There is no hold on this item
[% END %]
</Value>