[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/admin aqbookfund.pl,1.19.2.4,1.19.2.5 aqbudget.pl,1
From: |
Henri-Damien LAURENT |
Subject: |
[Koha-cvs] CVS: koha/admin aqbookfund.pl,1.19.2.4,1.19.2.5 aqbudget.pl,1.16.2.1,1.16.2.2 |
Date: |
Tue, 27 Sep 2005 11:03:41 -0700 |
Update of /cvsroot/koha/koha/admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7580/admin
Modified Files:
Tag: rel_2_2
aqbookfund.pl aqbudget.pl
Log Message:
Bug Fixing : Problems with Independant branches management.
Index: aqbookfund.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/aqbookfund.pl,v
retrieving revision 1.19.2.4
retrieving revision 1.19.2.5
diff -C2 -r1.19.2.4 -r1.19.2.5
*** aqbookfund.pl 9 Sep 2005 08:39:17 -0000 1.19.2.4
--- aqbookfund.pl 27 Sep 2005 18:03:39 -0000 1.19.2.5
***************
*** 210,227 ****
$row_data{bookfundid} =$results->[$i]{'bookfundid'};
$row_data{bookfundname} = $results->[$i]{'bookfundname'};
! # warn "".$results->[$i]{'bookfundid'}."
".$results->[$i]{'bookfundname'}." ".$results->[$i]{'branchcode'};
$row_data{branchname} =
$select_branches{$results->[$i]{'branchcode'}};
! my $strsth2="Select
aqbudgetid,startdate,enddate,budgetamount,aqbudget.branchcode from aqbudget
where aqbudget.bookfundid = ?";
! if ($homebranch){
! $strsth2 .= " AND ((aqbudget.branchcode='') OR
(aqbudget.branchcode= ".$dbh->quote($homebranch).")) " ;
! } else {
! $strsth2 .= " AND (aqbudget.branchcode='') " if
(C4::Context->userenv->{flags}>1);
! }
$strsth2 .= " order by aqbudgetid";
! # warn "".$strsth2;
my $sth2 = $dbh->prepare($strsth2);
$sth2->execute($row_data{bookfundid});
my @budget_loop;
! while (my
($aqbudgetid,$startdate,$enddate,$budgetamount,$branchcode) = $sth2->fetchrow) {
my %budgetrow_data;
$budgetrow_data{aqbudgetid} = $aqbudgetid;
--- 210,229 ----
$row_data{bookfundid} =$results->[$i]{'bookfundid'};
$row_data{bookfundname} = $results->[$i]{'bookfundname'};
! # warn "".$results->[$i]{'bookfundid'}."
".$results->[$i]{'bookfundname'}." ".$results->[$i]{'branchcode'};
$row_data{branchname} =
$select_branches{$results->[$i]{'branchcode'}};
! my $strsth2="Select aqbudgetid,startdate,enddate,budgetamount
from aqbudget where aqbudget.bookfundid = ?";
! # my $strsth2="Select
aqbudgetid,startdate,enddate,budgetamount,branchcode from aqbudget where
aqbudget.bookfundid = ?";
! # if ($homebranch){
! # $strsth2 .= " AND ((aqbudget.branchcode is null) OR
(aqbudget.branchcode='') OR (aqbudget.branchcode=
".$dbh->quote($homebranch).")) " ;
! # } else {
! # $strsth2 .= " AND (aqbudget.branchcode='') " if
((C4::Context->userenv) && (C4::Context->userenv->{flags}>1));
! # }
$strsth2 .= " order by aqbudgetid";
! # warn "".$strsth2;
my $sth2 = $dbh->prepare($strsth2);
$sth2->execute($row_data{bookfundid});
my @budget_loop;
! # while (my
($aqbudgetid,$startdate,$enddate,$budgetamount,$branchcode) = $sth2->fetchrow) {
! while (my ($aqbudgetid,$startdate,$enddate,$budgetamount) =
$sth2->fetchrow) {
my %budgetrow_data;
$budgetrow_data{aqbudgetid} = $aqbudgetid;
***************
*** 229,233 ****
$budgetrow_data{enddate} = format_date($enddate);
$budgetrow_data{budgetamount} = $budgetamount;
! $budgetrow_data{branchcode} = $branchcode;
push @budget_loop,\%budgetrow_data;
}
--- 231,235 ----
$budgetrow_data{enddate} = format_date($enddate);
$budgetrow_data{budgetamount} = $budgetamount;
! # $budgetrow_data{branchcode} = $branchcode;
push @budget_loop,\%budgetrow_data;
}
Index: aqbudget.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/aqbudget.pl,v
retrieving revision 1.16.2.1
retrieving revision 1.16.2.2
diff -C2 -r1.16.2.1 -r1.16.2.2
*** aqbudget.pl 26 Aug 2005 12:21:49 -0000 1.16.2.1
--- aqbudget.pl 27 Sep 2005 18:03:39 -0000 1.16.2.2
***************
*** 104,108 ****
if ($aqbudgetid) {
my $dbh = C4::Context->dbh;
! my $sth=$dbh->prepare("select
aqbudgetid,bookfundname,aqbookfund.bookfundid,aqbookfund.branchcode as
bfbranch,startdate,enddate,budgetamount,aqbudget.branchcode from
aqbudget,aqbookfund where aqbudgetid=? and
aqbudget.bookfundid=aqbookfund.bookfundid");
$sth->execute($aqbudgetid);
$dataaqbudget=$sth->fetchrow_hashref;
--- 104,109 ----
if ($aqbudgetid) {
my $dbh = C4::Context->dbh;
! # my $sth=$dbh->prepare("select
aqbudgetid,bookfundname,aqbookfund.bookfundid,aqbookfund.branchcode as
bfbranch,startdate,enddate,budgetamount,aqbudget.branchcode from
aqbudget,aqbookfund where aqbudgetid=? and
aqbudget.bookfundid=aqbookfund.bookfundid");
! my $sth=$dbh->prepare("select
aqbudgetid,bookfundname,aqbookfund.bookfundid,aqbookfund.branchcode as
bfbranch,startdate,enddate,budgetamount from aqbudget,aqbookfund where
aqbudgetid=? and aqbudget.bookfundid=aqbookfund.bookfundid");
$sth->execute($aqbudgetid);
$dataaqbudget=$sth->fetchrow_hashref;
***************
*** 131,156 ****
adding => 1);
}
! my @select_branch;
! my %select_branches;
! if ($dataaqbookfund->{branchcode}){
! push @select_branch,$dataaqbookfund->{'branchcode'};
!
$select_branches{$dataaqbookfund->{'branchcode'}}=$dataaqbookfund->{'branchname'};
! }else {
! my @branches;
! my ($count2,@branches)=branches();
! push @select_branch,"";
! $select_branches{""}="";
! for (my $i=0;$i<$count2;$i++){
! push @select_branch, $branches[$i]->{'branchcode'};#
! $select_branches{$branches[$i]->{'branchcode'}} =
$branches[$i]->{'branchname'};
! }
! }
! my $CGIbranch=CGI::scrolling_list( -name => 'branchcode',
! -values => address@hidden,
! -labels => \%select_branches,
! -default =>
($dataaqbookfund->{branchcode}?$dataaqbookfund->{branchcode}:$dataaqbudget->{branchcode}),
! -size => 1,
! -multiple => 0 );
! $template->param(CGIbranch => $CGIbranch);
$template->param(dateformat => display_date_format(),
--- 132,157 ----
adding => 1);
}
! # my @select_branch;
! # my %select_branches;
! # if ($dataaqbookfund->{branchcode}){
! # push @select_branch,$dataaqbookfund->{'branchcode'};
! #
$select_branches{$dataaqbookfund->{'branchcode'}}=$dataaqbookfund->{'branchname'};
! # }else {
! # my @branches;
! # my ($count2,@branches)=branches();
! # push @select_branch,"";
! # $select_branches{""}="";
! # for (my $i=0;$i<$count2;$i++){
! # push @select_branch, $branches[$i]->{'branchcode'};#
! # $select_branches{$branches[$i]->{'branchcode'}} =
$branches[$i]->{'branchname'};
! # }
! # }
! # my $CGIbranch=CGI::scrolling_list( -name => 'branchcode',
! # -values => address@hidden,
! # -labels => \%select_branches,
! # -default =>
($dataaqbookfund->{branchcode}?$dataaqbookfund->{branchcode}:$dataaqbudget->{branchcode}),
! # -size => 1,
! # -multiple => 0 );
! # $template->param(CGIbranch => $CGIbranch);
$template->param(dateformat => display_date_format(),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/admin aqbookfund.pl,1.19.2.4,1.19.2.5 aqbudget.pl,1.16.2.1,1.16.2.2,
Henri-Damien LAURENT <=
- Prev by Date:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/reports acquisitions_stats.tmpl,1.4.2.1,1.4.2.2 borrowers_stats.tmpl,1.5.2.1,1.5.2.2
- Next by Date:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/parameters aqbudget.tmpl,1.25.2.1,1.25.2.2
- Previous by thread:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/reports acquisitions_stats.tmpl,1.4.2.1,1.4.2.2 borrowers_stats.tmpl,1.5.2.1,1.5.2.2
- Next by thread:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/parameters aqbudget.tmpl,1.25.2.1,1.25.2.2
- Index(es):