koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/C4 Bull.pm,1.10,1.11


From: Henri-Damien LAURENT
Subject: [Koha-cvs] CVS: koha/C4 Bull.pm,1.10,1.11
Date: Fri, 17 Jun 2005 06:44:27 -0700

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

Modified Files:
        Bull.pm 
Log Message:
Detailing the three latest issues on OPAC for serials

Index: Bull.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Bull.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** Bull.pm     16 Jun 2005 19:10:10 -0000      1.10
--- Bull.pm     17 Jun 2005 13:44:25 -0000      1.11
***************
*** 51,55 ****
                        &Find_Next_Date, &Get_Next_Seq
                        &hassubscriptionexpired &subscriptionexpirationdate 
&subscriptionrenew
!                       &getSupplierListWithLateIssues &GetLateIssues 
&serialdelete);
  
  sub getSupplierListWithLateIssues {
--- 51,55 ----
                        &Find_Next_Date, &Get_Next_Seq
                        &hassubscriptionexpired &subscriptionexpirationdate 
&subscriptionrenew
!                       &getSupplierListWithLateIssues &GetLateIssues 
&serialdelete &getlatestserials);
  
  sub getSupplierListWithLateIssues {
***************
*** 288,291 ****
--- 288,306 ----
        return ($totalissues,@serials);
  }
+ sub getlatestserials{
+       my ($subscriptionid,$limit) address@hidden;
+       my $dbh = C4::Context->dbh;
+       # status = 2 is "arrived"
+       my $strsth="select serialid,serialseq, status, planneddate from serial 
where subscriptionid = ? and (status =2 or status=4) order by planneddate DESC 
LIMIT 0,$limit";
+       my $sth=$dbh->prepare($strsth);
+       $sth->execute($subscriptionid);
+       my @serials;
+       while(my $line = $sth->fetchrow_hashref) {
+               $line->{"status".$line->{status}} = 1; # fills a "statusX" 
value, used for template status select list
+               $line->{"planneddate"} = format_date($line->{"planneddate"});
+               push @serials,$line;
+       }
+       return address@hidden;
+ }
  
  sub serialdelete {
***************
*** 317,321 ****
        # change status & update subscriptionhistory
        if ($status eq 6){
!               delissue($serialseq, $subscriptionid) 
        }else{
                $sth = $dbh->prepare("update serial set 
serialseq=?,planneddate=?,status=? where serialid = ?");
--- 332,336 ----
        # change status & update subscriptionhistory
        if ($status eq 6){
!               delissue($serialseq, $subscriptionid); 
        }else{
                $sth = $dbh->prepare("update serial set 
serialseq=?,planneddate=?,status=? where serialid = ?");




reply via email to

[Prev in Thread] Current Thread [Next in Thread]