|
Lines 35-40
use CGI qw ( -utf8 );
Link Here
|
| 35 |
use DateTime; |
35 |
use DateTime; |
| 36 |
use C4::Auth; |
36 |
use C4::Auth; |
| 37 |
|
37 |
|
|
|
38 |
use Koha::Libraries; |
| 39 |
|
| 38 |
=head1 NAME |
40 |
=head1 NAME |
| 39 |
|
41 |
|
| 40 |
C4::ILS-DI::Services - ILS-DI Services |
42 |
C4::ILS-DI::Services - ILS-DI Services |
|
Lines 219-226
sub GetRecords {
Link Here
|
| 219 |
delete $item->{'more_subfields_xml'}; |
221 |
delete $item->{'more_subfields_xml'}; |
| 220 |
|
222 |
|
| 221 |
# Display branch names instead of branch codes |
223 |
# Display branch names instead of branch codes |
| 222 |
$item->{'homebranchname'} = GetBranchName( $item->{'homebranch'} ); |
224 |
my $home_library = Koha::Libraries->find( $item->{homebranch} ); |
| 223 |
$item->{'holdingbranchname'} = GetBranchName( $item->{'holdingbranch'} ); |
225 |
my $holding_library = Koha::Libraries->find( $item->{holdingbranch} ); |
|
|
226 |
$item->{'homebranchname'} = $home_library ? $home_library->branchname : ''; |
| 227 |
$item->{'holdingbranchname'} = $holding_library ? $holding_library->branchname : ''; |
| 224 |
} |
228 |
} |
| 225 |
|
229 |
|
| 226 |
# Hashref building... |
230 |
# Hashref building... |
|
Lines 363-369
sub GetPatronInfo {
Link Here
|
| 363 |
|
367 |
|
| 364 |
# Cleaning the borrower hashref |
368 |
# Cleaning the borrower hashref |
| 365 |
$borrower->{'charges'} = $borrower->{'flags'}->{'CHARGES'}->{'amount'}; |
369 |
$borrower->{'charges'} = $borrower->{'flags'}->{'CHARGES'}->{'amount'}; |
| 366 |
$borrower->{'branchname'} = GetBranchName( $borrower->{'branchcode'} ); |
370 |
my $library = Koha::Libraries->find( $borrower->{branchcode} ); |
|
|
371 |
$borrower->{'branchname'} = $library ? $library->branchname : ''; |
| 367 |
delete $borrower->{'flags'}; |
372 |
delete $borrower->{'flags'}; |
| 368 |
delete $borrower->{'userid'}; |
373 |
delete $borrower->{'userid'}; |
| 369 |
delete $borrower->{'password'}; |
374 |
delete $borrower->{'password'}; |
|
Lines 403-409
sub GetPatronInfo {
Link Here
|
| 403 |
|
408 |
|
| 404 |
# Get additional informations |
409 |
# Get additional informations |
| 405 |
my $item = GetBiblioFromItemNumber( $reserve->{'itemnumber'}, undef ); |
410 |
my $item = GetBiblioFromItemNumber( $reserve->{'itemnumber'}, undef ); |
| 406 |
my $branchname = GetBranchName( $reserve->{'branchcode'} ); |
411 |
my $library = Koha::Libraries->find( $reserve->{branchcode} ); |
|
|
412 |
my $branchname = $library ? $library->branchname : ''; |
| 407 |
|
413 |
|
| 408 |
# Remove unwanted fields |
414 |
# Remove unwanted fields |
| 409 |
delete $item->{'marc'}; |
415 |
delete $item->{'marc'}; |
|
Lines 632-638
sub HoldTitle {
Link Here
|
| 632 |
# Hashref building |
638 |
# Hashref building |
| 633 |
my $out; |
639 |
my $out; |
| 634 |
$out->{'title'} = $title; |
640 |
$out->{'title'} = $title; |
| 635 |
$out->{'pickup_location'} = GetBranchName($branch); |
641 |
my $library = Koha::Libraries->find( $branch ); |
|
|
642 |
$out->{'pickup_location'} = $library ? $library->branchname : ''; |
| 636 |
|
643 |
|
| 637 |
# TODO $out->{'date_available'} = ''; |
644 |
# TODO $out->{'date_available'} = ''; |
| 638 |
|
645 |
|
|
Lines 708-714
sub HoldItem {
Link Here
|
| 708 |
|
715 |
|
| 709 |
# Hashref building |
716 |
# Hashref building |
| 710 |
my $out; |
717 |
my $out; |
| 711 |
$out->{'pickup_location'} = GetBranchName($branch); |
718 |
my $library = Koha::Libraries->find( $branch ); |
|
|
719 |
$out->{'pickup_location'} = $library ? $library->branchname : ''; |
| 712 |
|
720 |
|
| 713 |
# TODO $out->{'date_available'} = ''; |
721 |
# TODO $out->{'date_available'} = ''; |
| 714 |
|
722 |
|
|
Lines 764-770
sub _availability {
Link Here
|
| 764 |
} |
772 |
} |
| 765 |
|
773 |
|
| 766 |
my $biblionumber = $item->{'biblioitemnumber'}; |
774 |
my $biblionumber = $item->{'biblioitemnumber'}; |
| 767 |
my $location = GetBranchName( $item->{'holdingbranch'} ); |
775 |
my $library = Koha::Libraries->find( $item->{holdingbranch} ); |
|
|
776 |
my $location = $library ? $library->branchname : ''; |
| 768 |
|
777 |
|
| 769 |
if ( $item->{'notforloan'} ) { |
778 |
if ( $item->{'notforloan'} ) { |
| 770 |
return ( $biblionumber, 'not available', 'Not for loan', $location ); |
779 |
return ( $biblionumber, 'not available', 'Not for loan', $location ); |