[Koha-cvs] CVS: koha/C4 Reserves2.pm,1.5.2.11,1.5.2.12

Steve Tonnesen tonnesen at users.sourceforge.net
Wed Nov 6 00:26:27 CET 2002


Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv22800/C4

Modified Files:
      Tag: rel-1-2
	Reserves2.pm 
Log Message:
Added support for setting a required_date and an expiry_date on reserves.
Note that reserves system doesn't pay any attention to these dates, and the
librarian interface doesn't support setting these dates yet.


Index: Reserves2.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Reserves2.pm,v
retrieving revision 1.5.2.11
retrieving revision 1.5.2.12
diff -C2 -r1.5.2.11 -r1.5.2.12
*** Reserves2.pm	15 Oct 2002 04:42:16 -0000	1.5.2.11
--- Reserves2.pm	5 Nov 2002 23:26:25 -0000	1.5.2.12
***************
*** 303,313 ****
  }
  
! sub CreateReserve {                                                           
    my
! ($env,$branch,$borrnum,$biblionumber,$constraint,$bibitems,$priority,$notes,$title)= @_;   
    my $fee=CalcReserveFee($env,$borrnum,$biblionumber,$constraint,$bibitems);
!   my $dbh = &C4Connect;       
!   my $const = lc substr($constraint,0,1);       
!   my @datearr = localtime(time);                                
    my $resdate =(1900+$datearr[5])."-".($datearr[4]+1)."-".$datearr[3];                   
    #eval {                                                           
--- 303,313 ----
  }
  
! sub CreateReserve {
    my
! ($env,$branch,$borrnum,$biblionumber,$constraint,$bibitems,$priority,$notes,$title,$required_date, $expires_date)= @_;
    my $fee=CalcReserveFee($env,$borrnum,$biblionumber,$constraint,$bibitems);
!   my $dbh = &C4Connect;
!   my $const = lc substr($constraint,0,1);
!   my @datearr = localtime(time);
    my $resdate =(1900+$datearr[5])."-".($datearr[4]+1)."-".$datearr[3];                   
    #eval {                                                           
***************
*** 326,334 ****
    #if ($const eq 'a'){
      my $query="insert into reserves
!    (borrowernumber,biblionumber,reservedate,branchcode,constrainttype,priority,reservenotes)
      values
! ('$borrnum','$biblionumber','$resdate','$branch','$const','$priority','$notes')";   
      my $sth = $dbh->prepare($query);                        
!     $sth->execute();                
      $sth->finish;
    #}
--- 326,342 ----
    #if ($const eq 'a'){
      my $query="insert into reserves
!    (borrowernumber,biblionumber,reservedate,branchcode,constrainttype,priority,reservenotes,required_date,expires_date)
      values
! (?, ?, ?, ?, ?, ?, ?, ?, ?)";   
      my $sth = $dbh->prepare($query);                        
!     $sth->execute($borrnum,
!     		  $biblionumber,
! 		  $resdate,
! 		  $branch,
! 		  $const,
! 		  $priority,
! 		  $notes,
! 		  $required_date,
! 		  $expires_date);
      $sth->finish;
    #}





More information about the Koha-cvs mailing list