[Koha-cvs] koha/admin aqbookfund.pl [R_2-2-7-1]
paul poulain
paul at koha-fr.org
Tue Feb 27 21:09:17 CET 2007
CVSROOT: /sources/koha
Module name: koha
Branch: R_2-2-7-1
Changes by: paul poulain <tipaul> 07/02/27 20:09:17
Modified files:
admin : aqbookfund.pl
Log message:
BUGFIX : budget branch was not retrieved in budget modification.
bug probably exist also in 2.2 and in rel_3_0
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/admin/aqbookfund.pl?cvsroot=koha&only_with_tag=R_2-2-7-1&r1=1.19.2.10&r2=1.19.2.10.2.1
Patches:
Index: aqbookfund.pl
===================================================================
RCS file: /sources/koha/koha/admin/aqbookfund.pl,v
retrieving revision 1.19.2.10
retrieving revision 1.19.2.10.2.1
diff -u -b -r1.19.2.10 -r1.19.2.10.2.1
--- aqbookfund.pl 20 Jun 2006 16:21:42 -0000 1.19.2.10
+++ aqbookfund.pl 27 Feb 2007 20:09:16 -0000 1.19.2.10.2.1
@@ -123,14 +123,6 @@
$select_branches{$branches[$i]->{'branchcode'}} = $branches[$i]->{'branchname'};
}
-my $CGIbranch=CGI::scrolling_list( -name => 'branchcode',
- -values => \@select_branch,
- -labels => \%select_branches,
- -size => 1,
- -tabindex=>'',
- -multiple => 0 );
-$template->param(CGIbranch => $CGIbranch);
-
################## ADD_FORM ##################################
# called by default. Used to create form to add or modify a record
if ($op eq 'add_form') {
@@ -139,11 +131,28 @@
my $header;
if ($bookfundid) {
my $dbh = C4::Context->dbh;
- my $sth=$dbh->prepare("select bookfundid,bookfundname,bookfundgroup from aqbookfund where bookfundid=?");
+ my $sth=$dbh->prepare("select bookfundid,bookfundname,bookfundgroup,branchcode from aqbookfund where bookfundid=?");
$sth->execute($bookfundid);
$data=$sth->fetchrow_hashref;
$sth->finish;
+ my $CGIbranch=CGI::scrolling_list( -name => 'branchcode',
+ -values => \@select_branch,
+ -labels => \%select_branches,
+ -size => 1,
+ -tabindex=>'',
+ -default=> $data->{branchcode},
+ -multiple => 0 );
+ $template->param(CGIbranch => $CGIbranch);
+ } else {
+ my $CGIbranch=CGI::scrolling_list( -name => 'branchcode',
+ -values => \@select_branch,
+ -labels => \%select_branches,
+ -size => 1,
+ -tabindex=>'',
+ -multiple => 0 );
+ $template->param(CGIbranch => $CGIbranch);
}
+
if ($bookfundid) {
$header = "Modify book fund";
$template->param('header-is-modify-p' => 1);
@@ -152,7 +161,7 @@
$template->param('header-is-add-p' => 1);
}
$template->param('use-header-flags-p' => 1);
- $template->param(header => $header); # NOTE deprecated
+# $template->param(header => $header); # NOTE deprecated
my $add_or_modify=0;
if ($bookfundid) {
$add_or_modify=1;
More information about the Koha-cvs
mailing list