[Koha-cvs] CVS: koha/admin categorie.pl,1.15,1.16 issuingrules.pl,1.2,1.3 itemtypes.pl,1.13,1.14 marc_subfields_structure.pl,1.28,1.29 systempreferences.pl,1.21,1.22

Paul POULAIN tipaul at users.sourceforge.net
Wed Aug 18 18:05:17 CEST 2004


Update of /cvsroot/koha/koha/admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10878/admin

Modified Files:
	categorie.pl issuingrules.pl itemtypes.pl 
	marc_subfields_structure.pl systempreferences.pl 
Log Message:
various bugfixes

Index: categorie.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/categorie.pl,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** categorie.pl	24 Mar 2004 10:42:35 -0000	1.15
--- categorie.pl	18 Aug 2004 16:05:14 -0000	1.16
***************
*** 113,118 ****
  	$template->param(add_validate => 1);
  	my $dbh = C4::Context->dbh;
! 	my $sth=$dbh->prepare("replace categories (categorycode,description,enrolmentperiod,upperagelimit,dateofbirthrequired,enrolmentfee,issuelimit,reservefee,overduenoticerequired) values (?,?,?,?,?,?,?,?,?)");
! 	$sth->execute(map { $input->param($_) } ('categorycode','description','enrolmentperiod','upperagelimit','dateofbirthrequired','enrolmentfee','issuelimit','reservefee','overduenoticerequired'));
  	$sth->finish;
  													# END $OP eq ADD_VALIDATE
--- 113,118 ----
  	$template->param(add_validate => 1);
  	my $dbh = C4::Context->dbh;
! 	my $sth=$dbh->prepare("replace categories (categorycode,description,enrolmentperiod,upperagelimit,dateofbirthrequired,enrolmentfee,reservefee,overduenoticerequired) values (?,?,?,?,?,?,?,?)");
! 	$sth->execute(map { $input->param($_) } ('categorycode','description','enrolmentperiod','upperagelimit','dateofbirthrequired','enrolmentfee','reservefee','overduenoticerequired'));
  	$sth->finish;
  													# END $OP eq ADD_VALIDATE

Index: issuingrules.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/issuingrules.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** issuingrules.pl	24 May 2004 12:16:19 -0000	1.2
--- issuingrules.pl	18 Aug 2004 16:05:14 -0000	1.3
***************
*** 67,71 ****
  			my $data=$input->param($key);
  			my ($issuelength,$maxissueqty)=split(',',$data);
! 			if ($maxissueqty >0) {
  				$sth_search->execute($br,$bor,$cat);
  				my $res = $sth_search->fetchrow_hashref();
--- 67,71 ----
  			my $data=$input->param($key);
  			my ($issuelength,$maxissueqty)=split(',',$data);
! # 			if ($maxissueqty >0) {
  				$sth_search->execute($br,$bor,$cat);
  				my $res = $sth_search->fetchrow_hashref();
***************
*** 75,81 ****
  					$sth_Iinsert->execute($br,$bor,$cat,$maxissueqty,$issuelength);
  				}
! 			} else {
! 				$sth_Idelete->execute($br,$bor,$cat);
! 			}
  		}
  		# FINES
--- 75,81 ----
  					$sth_Iinsert->execute($br,$bor,$cat,$maxissueqty,$issuelength);
  				}
! # 			} else {
! # 				$sth_Idelete->execute($br,$bor,$cat);
! # 			}
  		}
  		# FINES
***************
*** 86,90 ****
  			my $data=$input->param($key);
  			my ($fine,$firstremind,$chargeperiod)=split(',',$data);
! 			if ($fine >0) {
  				$sth_search->execute($br,$bor,$cat);
  				my $res = $sth_search->fetchrow_hashref();
--- 86,90 ----
  			my $data=$input->param($key);
  			my ($fine,$firstremind,$chargeperiod)=split(',',$data);
! # 			if ($fine >0) {
  				$sth_search->execute($br,$bor,$cat);
  				my $res = $sth_search->fetchrow_hashref();
***************
*** 94,100 ****
  					$sth_Finsert->execute($br,$bor,$cat,$fine,$firstremind,$chargeperiod);
  				}
! 			} else {
! 				$sth_Fdelete->execute($br,$bor,$cat);
! 			}
  		}
  	}
--- 94,100 ----
  					$sth_Finsert->execute($br,$bor,$cat,$fine,$firstremind,$chargeperiod);
  				}
! # 			} else {
! # 				$sth_Fdelete->execute($br,$bor,$cat);
! # 			}
  		}
  	}
***************
*** 160,172 ****
  		my $issuelength = $dat->{'issuelength'}+0;
  		my $finesvalue;
! 		$finesvalue= "$fine,$dat->{'firstremind'},$dat->{'chargeperiod'}" if $fine>0;
  		my $issuingvalue;
! 		if ($maxissueqty>0) {
! 		    $issuingvalue = "$issuelength,$maxissueqty" ;
! 		}
! 		else {		
! 		    $issuingvalue = "$issuelength, 5";
! 		    $maxissueqty = 5;
! 		}
  		my %row = (finesname=> "F-$branch-$trow3[$i].$$data->{'itemtype'}",
  					finesvalue => $finesvalue,
--- 160,172 ----
  		my $issuelength = $dat->{'issuelength'}+0;
  		my $finesvalue;
! 		$finesvalue= "$fine,$dat->{'firstremind'},$dat->{'chargeperiod'}" if $fine+$dat->{'firstremind'}+$dat->{'chargeperiod'}>0;
  		my $issuingvalue;
! # 		if ($maxissueqty>0) {
! 		    $issuingvalue = "$issuelength,$maxissueqty" if $issuelength+$maxissueqty>0;
! # 		}
! # 		else {		
! # 		    $issuingvalue = "$issuelength, 5";
! # 		    $maxissueqty = 5;
! # 		}
  		my %row = (finesname=> "F-$branch-$trow3[$i].$$data->{'itemtype'}",
  					finesvalue => $finesvalue,

Index: itemtypes.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/itemtypes.pl,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** itemtypes.pl	4 May 2004 16:17:35 -0000	1.13
--- itemtypes.pl	18 Aug 2004 16:05:14 -0000	1.14
***************
*** 97,101 ****
  	if ($itemtype) {
  		my $dbh = C4::Context->dbh;
! 		my $sth=$dbh->prepare("select itemtype,description,loanlength,renewalsallowed,rentalcharge,notforloan from itemtypes where itemtype=?");
  		$sth->execute($itemtype);
  		$data=$sth->fetchrow_hashref;
--- 97,101 ----
  	if ($itemtype) {
  		my $dbh = C4::Context->dbh;
! 		my $sth=$dbh->prepare("select itemtype,description,renewalsallowed,rentalcharge,notforloan from itemtypes where itemtype=?");
  		$sth->execute($itemtype);
  		$data=$sth->fetchrow_hashref;
***************
*** 104,108 ****
  	$template->param(itemtype => $itemtype,
  							description => $data->{'description'},
- 							loanlength => $data->{'loanlength'},
  							renewalsallowed => $data->{'renewalsallowed'},
  							rentalcharge => $data->{'rentalcharge'},
--- 104,107 ----
***************
*** 115,122 ****
  } elsif ($op eq 'add_validate') {
  	my $dbh = C4::Context->dbh;
! 	my $query = "replace itemtypes (itemtype,description,loanlength,renewalsallowed,rentalcharge,notforloan) values (";
  	$query.= $dbh->quote($input->param('itemtype')).",";
  	$query.= $dbh->quote($input->param('description')).",";
- 	$query.= $dbh->quote($input->param('loanlength')).",";
  	if ($input->param('renewalsallowed') ne 1) {
  		$query.= "0,";
--- 114,120 ----
  } elsif ($op eq 'add_validate') {
  	my $dbh = C4::Context->dbh;
! 	my $query = "replace itemtypes (itemtype,description,renewalsallowed,rentalcharge,notforloan) values (";
  	$query.= $dbh->quote($input->param('itemtype')).",";
  	$query.= $dbh->quote($input->param('description')).",";
  	if ($input->param('renewalsallowed') ne 1) {
  		$query.= "0,";
***************
*** 151,155 ****
  	}
  
! 	my $sth=$dbh->prepare("select itemtype,description,loanlength,renewalsallowed,rentalcharge from itemtypes where itemtype=?");
  	$sth->execute($itemtype);
  	my $data=$sth->fetchrow_hashref;
--- 149,153 ----
  	}
  
! 	my $sth=$dbh->prepare("select itemtype,description,renewalsallowed,rentalcharge from itemtypes where itemtype=?");
  	$sth->execute($itemtype);
  	my $data=$sth->fetchrow_hashref;
***************
*** 158,162 ****
  	$template->param(itemtype => $itemtype,
  							description => $data->{'description'},
- 							loanlength => $data->{'loanlength'},
  							renewalsallowed => $data->{'renewalsallowed'},
  							rentalcharge => $data->{'rentalcharge'},
--- 156,159 ----
***************
*** 190,194 ****
  		$row_data{itemtype} = $results->[$i]{'itemtype'};
  		$row_data{description} = $results->[$i]{'description'};
- 		$row_data{loanlength} = $results->[$i]{'loanlength'};
  		$row_data{renewalsallowed} = $results->[$i]{'renewalsallowed'};
  		$row_data{rentalcharge} = $results->[$i]{'rentalcharge'};
--- 187,190 ----

Index: marc_subfields_structure.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/marc_subfields_structure.pl,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** marc_subfields_structure.pl	30 Jul 2004 13:55:58 -0000	1.28
--- marc_subfields_structure.pl	18 Aug 2004 16:05:14 -0000	1.29
***************
*** 165,169 ****
  					-multiple=>0,
  					);
- 		warn "ATTENTION ---+--- $data->{'link'}";
  		$row_data{tagsubfield} =$data->{'tagsubfield'}."<input type='hidden' name='tagsubfield' value='".$data->{'tagsubfield'}."'>";
  		$row_data{liblibrarian} = CGI::escapeHTML($data->{'liblibrarian'});
--- 165,168 ----

Index: systempreferences.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/systempreferences.pl,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** systempreferences.pl	17 Jun 2004 08:18:43 -0000	1.21
--- systempreferences.pl	18 Aug 2004 16:05:14 -0000	1.22
***************
*** 42,45 ****
--- 42,46 ----
  use C4::Auth;
  use C4::Context;
+ use C4::Koha;
  use C4::Output;
  use C4::Interface::CGI::Output;





More information about the Koha-cvs mailing list