koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha/serials lateissues.pl serials-home.pl seri...


From: Tumer Garip
Subject: [Koha-cvs] koha/serials lateissues.pl serials-home.pl seri...
Date: Wed, 15 Nov 2006 01:38:47 +0000

CVSROOT:        /sources/koha
Module name:    koha
Changes by:     Tumer Garip <tgarip1957>        06/11/15 01:38:26

Modified files:
        serials        : lateissues.pl serials-home.pl 
                         serials-receive.pl subscription-add.pl 
                         subscription-detail.pl subscription-renew.pl 

Log message:
        Savannah seems out of synch.Code cleaning removal of Date::Manip

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/serials/lateissues.pl?cvsroot=koha&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/koha/serials/serials-home.pl?cvsroot=koha&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/koha/serials/serials-receive.pl?cvsroot=koha&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/koha/serials/subscription-add.pl?cvsroot=koha&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/koha/serials/subscription-detail.pl?cvsroot=koha&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/koha/serials/subscription-renew.pl?cvsroot=koha&r1=1.5&r2=1.6

Patches:
Index: lateissues.pl
===================================================================
RCS file: /sources/koha/koha/serials/lateissues.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- lateissues.pl       27 Sep 2006 21:19:22 -0000      1.10
+++ lateissues.pl       15 Nov 2006 01:38:26 -0000      1.11
@@ -17,7 +17,7 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
-# $Id: lateissues.pl,v 1.10 2006/09/27 21:19:22 tgarip1957 Exp $
+# $Id: lateissues.pl,v 1.11 2006/11/15 01:38:26 tgarip1957 Exp $
 
 =head1 NAME
 
@@ -56,8 +56,8 @@
 my %supplierlist = GetSuppliersWithLateIssues;
 my @select_supplier;
 push @select_supplier,"";
-foreach my $supplierid (keys %supplierlist){
-    push @select_supplier, $supplierid
+foreach my $supplier (keys %supplierlist){
+    push @select_supplier, $supplier
 }
 my $CGIsupplier=CGI::scrolling_list(
             -name     => 'supplierid',
@@ -67,9 +67,8 @@
             -size     => 1,
             -multiple => 0 );
 
-my @lateissues;
address@hidden = GetLateIssues($supplierid) if $supplierid;
-
+my ($count,@lateissues);
+($count,@lateissues) = GetLateIssues($supplierid) ;
 my @supplierinfo=GetBookSeller($supplierid) if $supplierid;
 
 my ($template, $loggedinuser, $cookie)

Index: serials-home.pl
===================================================================
RCS file: /sources/koha/koha/serials/serials-home.pl,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- serials-home.pl     27 Sep 2006 21:19:22 -0000      1.8
+++ serials-home.pl     15 Nov 2006 01:38:26 -0000      1.9
@@ -17,7 +17,7 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
-# $Id: serials-home.pl,v 1.8 2006/09/27 21:19:22 tgarip1957 Exp $
+# $Id: serials-home.pl,v 1.9 2006/11/15 01:38:26 tgarip1957 Exp $
 
 =head1 NAME
 
@@ -52,6 +52,7 @@
 my $query = new CGI;
 my $title = $query->param('title');
 my $ISSN = $query->param('ISSN');
+my $supplierid = $query->param('supplierid');
 my $routing = $query->param('routing');
 my $searched = $query->param('searched');
 my $biblionumber = $query->param('biblionumber');
@@ -59,7 +60,7 @@
 if(C4::Context->preference("RoutingSerials")){
     $alt_links = 0;
 }
-my @subscriptions = GetSubscriptions($title,$ISSN,$biblionumber);
+my @subscriptions = GetSubscriptions($title,$ISSN,$biblionumber,$supplierid);
 my ($template, $loggedinuser, $cookie)
 = get_template_and_user({template_name => "serials/serials-home.tmpl",
                                query => $query,

Index: serials-receive.pl
===================================================================
RCS file: /sources/koha/koha/serials/serials-receive.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- serials-receive.pl  27 Sep 2006 21:19:22 -0000      1.3
+++ serials-receive.pl  15 Nov 2006 01:38:26 -0000      1.4
@@ -17,7 +17,7 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
-# $Id: serials-receive.pl,v 1.3 2006/09/27 21:19:22 tgarip1957 Exp $
+# $Id: serials-receive.pl,v 1.4 2006/11/15 01:38:26 tgarip1957 Exp $
 
 =head1 NAME
 
@@ -122,11 +122,10 @@
        my $sth = $dbh->prepare("select status from serial where serialid=?");
        for (my $i=0;$i<=$#serialids;$i++) {
                $sth->execute($serialids[$i]);
-               
+               my $today=get_today();
                my ($oldstatus) = $sth->fetchrow;
                if ($serialids[$i]) {
-
-        my $planneddate = 
($planneddates[$i]?format_date_in_iso($planneddates[$i]):format_date_in_iso("today"))
 if ($status[$i]==2);
+        my $planneddate = 
($planneddates[$i]?format_date_in_iso($planneddates[$i]):$today) if 
($status[$i]==2);
                        
ModSerialStatus($serialids[$i],$serialseqs[$i],format_date_in_iso($publisheddates[$i]),format_date_in_iso($planneddates[$i]),$status[$i],$notes[$i],$itemnumbers[$i])
 unless ($hassubscriptionexpired && $oldstatus ==1 );
                        if (($status[$i]==2) && $itemnumbers[$i]){
                                my %info;
@@ -149,9 +148,9 @@
                                
$sth2->execute($holdingbranches[$i],$subscriptionid);
                                $sth2->finish;
                                # remove from missing list if item being 
checked in is on it
-#                              if ($status2 ==1){
+                              
                                    
removeMissingIssue($serialseqs[$i],$subscriptionid);
-#                              }
+                              
                        }
 
                }

Index: subscription-add.pl
===================================================================
RCS file: /sources/koha/koha/serials/subscription-add.pl,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- subscription-add.pl 27 Sep 2006 21:19:22 -0000      1.9
+++ subscription-add.pl 15 Nov 2006 01:38:26 -0000      1.10
@@ -17,7 +17,7 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
-# $Id: subscription-add.pl,v 1.9 2006/09/27 21:19:22 tgarip1957 Exp $
+# $Id: subscription-add.pl,v 1.10 2006/11/15 01:38:26 tgarip1957 Exp $
 
 =head1 NAME
 
@@ -55,8 +55,7 @@
 use C4::Context;
 use C4::Letters;
 use C4::Members;
-use Date::Manip;
-
+use DateTime;
 my $query = new CGI;
 my $op = $query->param('op');
 my $dbh = C4::Context->dbh;
@@ -80,17 +79,20 @@
 
 my $weekarrayjs='';
 my $count = 0;
-my ($year, $month, $day) = UnixDate("today", "%Y", "%m", "%d");
-my $firstday = Date_DayOfYear($month,$day,$year);
-my $wkno = Date_WeekOfYear($month,$day,$year,1); # week starting monday
+my $today=get_today();
+ my $dateobj=DATE_obj($today);
+  my $year=$dateobj->year;
+  my $month=$dateobj->month;
+  my $day=$dateobj->day_of_month;
+my $firstday = $dateobj->day_of_year;
+my $wkno = $dateobj->week_number;
 my $weekno = $wkno;
 for(my $i=$firstday;$i<($firstday+365);$i=$i+7){
         $count = $i;
         if($wkno > 52){$year++; $wkno=1;}
         if($count>365){$count=$i-365;}    
-        my ($y,$m,$d) = Date_NthDayOfYear($year,$count);
-        my $output = "$y-$m-$d";
-        $weekarrayjs .= "'Wk $wkno: ".format_date($output)."',";
+     my $newdate=DateTime->from_day_of_year(year=>$year,day_of_year=>$count);
+        $weekarrayjs .= "'Wk $wkno: ".format_date($newdate->ymd)."',";
         $wkno++;    
 }
 chop($weekarrayjs);

Index: subscription-detail.pl
===================================================================
RCS file: /sources/koha/koha/serials/subscription-detail.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- subscription-detail.pl      6 Sep 2006 16:21:04 -0000       1.4
+++ subscription-detail.pl      15 Nov 2006 01:38:26 -0000      1.5
@@ -9,7 +9,7 @@
 use C4::Output;
 use C4::Interface::CGI::Output;
 use C4::Context;
-use Date::Manip;
+use DateTime;
 
 my $query = new CGI;
 my $op = $query->param('op');
@@ -54,19 +54,22 @@
 
 my $weekarrayjs='';
 my $count = 0;
-my ($year, $month, $day) = UnixDate("today", "%Y", "%m", "%d");
-my $firstday = Date_DayOfYear($month,$day,$year);
-my $wkno = Date_WeekOfYear($month,$day,$year,1); # week starting monday
+my $today=get_today();
+ my $dateobj=DATE_obj($today);
+  my $year=$dateobj->year;
+  my $month=$dateobj->month;
+  my $day=$dateobj->day_of_month;
+my $firstday = $dateobj->day_of_year;
+my $wkno = $dateobj->week_number;
 my $weekno = $wkno;
 for(my $i=$firstday;$i<($firstday+365);$i=$i+7){
             $count = $i;
             if($wkno > 52){$year++; $wkno=1;}
             if($count>365){$count=$i-365;}
-            my ($y,$m,$d) = Date_NthDayOfYear($year,$count);
-            my $output = "$y-$m-$d";
-            $weekarrayjs .= "'Wk $wkno: ".format_date($output)."',";
+     my $newdate=DateTime->from_day_of_year(year=>$year,day_of_year=>$count);
+        $weekarrayjs .= "'Wk $wkno: ".format_date($newdate->ymd)."',";
             $wkno++;
-    }
+}
 chop($weekarrayjs);
 
 $template->param(

Index: subscription-renew.pl
===================================================================
RCS file: /sources/koha/koha/serials/subscription-renew.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- subscription-renew.pl       27 Sep 2006 21:19:22 -0000      1.5
+++ subscription-renew.pl       15 Nov 2006 01:38:26 -0000      1.6
@@ -18,7 +18,7 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
-# $Id: subscription-renew.pl,v 1.5 2006/09/27 21:19:22 tgarip1957 Exp $
+# $Id: subscription-renew.pl,v 1.6 2006/11/15 01:38:26 tgarip1957 Exp $
 
 =head1 NAME
 
@@ -55,7 +55,6 @@
 use C4::Context;
 use C4::Search;
 use C4::Auth;
-use C4::Output;
 use C4::Interface::CGI::Output;
 use C4::Serials;
 




reply via email to

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