my $self = shift;
my $xmldoc = shift;
if ($xmldoc) {
- my $root = $xmldoc->documentElement();
- my $xpc = $self->xpc();
- my $itemid =
- $xpc->findnodes('//ns:ItemId',$root);
+ my $root = $xmldoc->documentElement();
+ my $xpc = $self->xpc();
+ my $itemid = $xpc->findnodes( '//ns:ItemIdentifierValue', $root );
# checkin the item
- my $branch='AS'; # where the hell do we get this from???
- my $checkin = $self->ils->checkin( $itemid,$branch );
+ my $branch = 'AS'; # where the hell do we get this from???
+ my $checkin = $self->ils->checkin( $itemid, $branch );
my $output;
my $vars;
$vars->{'messagetype'} = 'CheckInItemResponse';
- $vars->{'barcode'} = $itemid;
+ $vars->{'barcode'} = $itemid;
+ my ( $from, $to ) = $self->get_agencies($xmldoc);
+ $vars->{'fromagency'} = $to;
+ $vars->{'toagency'} = $from;
+
if ( !$checkin->{success} ) {
- $vars->{'processingerror'} = 1;
- $vars->{'processingerrortype'} = $checkin->{'messages'};
+ $vars->{'processingerror'} = 1;
+ $vars->{'processingerrortype'} = $checkin->{'messages'};
$vars->{'processingerrorelement'} = 'UniqueItemIdentifier';
$output = $self->render_output( 'problem.tt', $vars );
}
There is no hold on this item
[% CASE 'NO_HOLD_BORROWER' %]
We can not place a hold, we have no borrower information
+ [% CASE 'Wrongbranch' %]
+ We are trying to check this item in at the wrong branch
[% END %]
</Value>