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.16,1.17


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha/C4 Bull.pm,1.16,1.17
Date: Thu, 27 Oct 2005 05:08:46 -0700

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

Modified Files:
        Bull.pm 
Log Message:
new features for serial module :
- the last 5 issues are now shown, and their status can be changed (but not 
reverted to "waited", as there can be only one "waited")
- the library can create a "distribution list". this paper contains a list of 
borrowers (selected from the borrower list, or manually entered), and print it 
for a given issue. once printed, the sheet can be put on the issue and 
distributed to every reader on the list (one by one).

Index: Bull.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Bull.pm,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** Bull.pm     26 Oct 2005 09:12:33 -0000      1.16
--- Bull.pm     27 Oct 2005 12:08:44 -0000      1.17
***************
*** 51,57 ****
                        &modsubscriptionhistory &newissue
                        &getserials &getlatestserials &serialchangestatus
!                       &Find_Next_Date, &Get_Next_Seq
                        &hassubscriptionexpired &subscriptionexpirationdate 
&subscriptionrenew
!                       &getSupplierListWithLateIssues &GetLateIssues 
&serialdelete &getlatestserials);
  
  sub getSupplierListWithLateIssues {
--- 51,58 ----
                        &modsubscriptionhistory &newissue
                        &getserials &getlatestserials &serialchangestatus
!                       &Find_Next_Date &Get_Next_Seq
                        &hassubscriptionexpired &subscriptionexpirationdate 
&subscriptionrenew
!                       &getSupplierListWithLateIssues &GetLateIssues 
&serialdelete &getlatestserials
!                       );
  
  sub getSupplierListWithLateIssues {
***************
*** 345,348 ****
--- 346,350 ----
        
$sth->execute($histstartdate,$enddate,$recievedlist,$missinglist,$opacnote,$librariannote,$subscriptionid);
  }
+ 
  # get every serial not arrived for a given subscription
  # as well as the number of issues registered in the database (all types)
***************
*** 351,358 ****
        my ($subscriptionid) = @_;
        my $dbh = C4::Context->dbh;
!       # status = 2 is "arrived"
!       my $sth=$dbh->prepare("select serialid,serialseq, status, 
planneddate,notes from serial where subscriptionid = ? and status <>2 and 
status <>4 and status <>5");
        $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
--- 353,371 ----
        my ($subscriptionid) = @_;
        my $dbh = C4::Context->dbh;
!       # OK, now add the last 5 issues arrives/missing
!       my $sth=$dbh->prepare("select serialid,serialseq, status, 
planneddate,notes from serial where subscriptionid = ? and (status in (2,4,5)) 
order by serialid desc");
        $sth->execute($subscriptionid);
+       my $counter=0;
        my @serials;
+       while((my $line = $sth->fetchrow_hashref) && $counter <5) {
+               $counter++;
+               $line->{"status".$line->{status}} = 1; # fills a "statusX" 
value, used for template status select list
+               $line->{"planneddate"} = format_date($line->{"planneddate"});
+               push @serials,$line;
+       }
+       
+       # status = 2 is "arrived"
+       $sth=$dbh->prepare("select serialid,serialseq, status, 
planneddate,notes from serial where subscriptionid = ? and status <>2 and 
status <>4 and status <>5");
+       $sth->execute($subscriptionid);
        while(my $line = $sth->fetchrow_hashref) {
                $line->{"status".$line->{status}} = 1; # fills a "statusX" 
value, used for template status select list




reply via email to

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