[Koha-cvs] CVS: koha/C4 Accounts2.pm,1.20,1.21

Paul POULAIN tipaul at users.sourceforge.net
Wed Apr 23 14:20:36 CEST 2003


Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1:/tmp/cvs-serv9032/C4

Modified Files:
	Accounts2.pm 
Log Message:
fix for #297 and some others bugs

Index: Accounts2.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Accounts2.pm,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** Accounts2.pm	13 Dec 2002 10:36:22 -0000	1.20
--- Accounts2.pm	23 Apr 2003 12:20:28 -0000	1.21
***************
*** 315,327 ****
    }
    if ($itemnum ne ''){
!     my $sth=$dbh->prepare("Select * from items where barcode='$itemnum'");
!     $sth->execute;
!     my $data=$sth->fetchrow_hashref;
!     $sth->finish;
      $desc.=" ".$itemnum;
      my $sth=$dbh->prepare("INSERT INTO	accountlines
  			(borrowernumber, accountno, date, amount, description, accounttype, amountoutstanding, itemnumber)
  	VALUES (?, ?, now(), ?,?, ?,?,?)");
!     $sth->execute($bornum, $accountno, $amount, $desc, $type, $amountleft, $data->{'itemnumber'});
    } else {
      $desc=$dbh->quote($desc);
--- 315,328 ----
    }
    if ($itemnum ne ''){
! #     my $sth=$dbh->prepare("Select * from items where barcode='$itemnum'");
! #     $sth->execute;
! #     my $data=$sth->fetchrow_hashref;
! #     $sth->finish;
      $desc.=" ".$itemnum;
      my $sth=$dbh->prepare("INSERT INTO	accountlines
  			(borrowernumber, accountno, date, amount, description, accounttype, amountoutstanding, itemnumber)
  	VALUES (?, ?, now(), ?,?, ?,?,?)");
! #     $sth->execute($bornum, $accountno, $amount, $desc, $type, $amountleft, $data->{'itemnumber'});
!      $sth->execute($bornum, $accountno, $amount, $desc, $type, $amountleft, $itemnum);
    } else {
      $desc=$dbh->quote($desc);





More information about the Koha-cvs mailing list