&DelBranch
&DelBranchCategory
&CheckCategoryUnique
+ &mybranch
);
@EXPORT_OK = qw( &onlymine &mybranch get_branch_code_from_name );
}
$branches = &GetBranches();
- Returns informations about ALL branches, IndependantBranches Insensitive.
- GetBranchInfo() returns the same information without the problems of this function
- (namespace collision, mainly).
- Create a branch selector with the following code.
-
+Returns informations about ALL branches, IndependantBranches Insensitive.
+GetBranchInfo() returns the same information without the problems of this function
+(namespace collision, mainly).
+
+Create a branch selector with the following code.
+
=head3 in PERL SCRIPT
my $branches = GetBranches;
my $onlymine = @_ ? shift : onlymine();
my $branches = GetBranches($onlymine);
my @loop;
- foreach (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) {
+ foreach ( sort { uc($branches->{$a}->{branchname}) cmp uc($branches->{$b}->{branchname}) } keys %$branches ) {
push @loop, {
value => $_,
selected => ($_ eq $branch) ? 1 : 0,
my $query = "
INSERT INTO branches
(branchcode,branchname,branchaddress1,
- branchaddress2,branchaddress3,branchzip,branchcity,
+ branchaddress2,branchaddress3,branchzip,branchcity,branchstate,
branchcountry,branchphone,branchfax,branchemail,
branchurl,branchip,branchprinter,branchnotes)
- VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
+ VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
";
my $sth = $dbh->prepare($query);
$sth->execute(
$data->{'branchcode'}, $data->{'branchname'},
$data->{'branchaddress1'}, $data->{'branchaddress2'},
$data->{'branchaddress3'}, $data->{'branchzip'},
- $data->{'branchcity'}, $data->{'branchcountry'},
+ $data->{'branchcity'}, $data->{'branchstate'},
+ $data->{'branchcountry'},
$data->{'branchphone'}, $data->{'branchfax'},
$data->{'branchemail'}, $data->{'branchurl'},
$data->{'branchip'}, $data->{'branchprinter'},
UPDATE branches
SET branchname=?,branchaddress1=?,
branchaddress2=?,branchaddress3=?,branchzip=?,
- branchcity=?,branchcountry=?,branchphone=?,
+ branchcity=?,branchstate=?,branchcountry=?,branchphone=?,
branchfax=?,branchemail=?,branchurl=?,branchip=?,
branchprinter=?,branchnotes=?
WHERE branchcode=?
$data->{'branchname'},
$data->{'branchaddress1'}, $data->{'branchaddress2'},
$data->{'branchaddress3'}, $data->{'branchzip'},
- $data->{'branchcity'}, $data->{'branchcountry'},
+ $data->{'branchcity'}, $data->{'branchstate'},
+ $data->{'branchcountry'},
$data->{'branchphone'}, $data->{'branchfax'},
$data->{'branchemail'}, $data->{'branchurl'},
$data->{'branchip'}, $data->{'branchprinter'},
=head1 AUTHOR
-Koha Development Team <info@koha.org>
+Koha Development Team <http://koha-community.org/>
=cut