Lines 20-26
use strict;
Link Here
|
20 |
#use warnings; FIXME - Bug 2505 |
20 |
#use warnings; FIXME - Bug 2505 |
21 |
require Exporter; |
21 |
require Exporter; |
22 |
use C4::Context; |
22 |
use C4::Context; |
23 |
use C4::Koha; |
|
|
24 |
|
23 |
|
25 |
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); |
24 |
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); |
26 |
|
25 |
|
Lines 408-441
sub GetBranchDetail {
Link Here
|
408 |
return $sth->fetchrow_hashref(); |
407 |
return $sth->fetchrow_hashref(); |
409 |
} |
408 |
} |
410 |
|
409 |
|
411 |
=head2 get_branchinfos_of |
|
|
412 |
|
413 |
my $branchinfos_of = get_branchinfos_of(@branchcodes); |
414 |
|
415 |
Associates a list of branchcodes to the information of the branch, taken in |
416 |
branches table. |
417 |
|
418 |
Returns a href where keys are branchcodes and values are href where keys are |
419 |
branch information key. |
420 |
|
421 |
print 'branchname is ', $branchinfos_of->{$code}->{branchname}; |
422 |
|
423 |
=cut |
424 |
|
425 |
sub get_branchinfos_of { |
426 |
my @branchcodes = @_; |
427 |
|
428 |
my $query = ' |
429 |
SELECT branchcode, |
430 |
branchname |
431 |
FROM branches |
432 |
WHERE branchcode IN (' |
433 |
. join( ',', map( { "'" . $_ . "'" } @branchcodes ) ) . ') |
434 |
'; |
435 |
return C4::Koha::get_infos_of( $query, 'branchcode' ); |
436 |
} |
437 |
|
438 |
|
439 |
=head2 GetBranchesInCategory |
410 |
=head2 GetBranchesInCategory |
440 |
|
411 |
|
441 |
my $branches = GetBranchesInCategory($categorycode); |
412 |
my $branches = GetBranchesInCategory($categorycode); |