koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha/C4/Circulation Circ2.pm [dev_week]


From: Ryan Higgins
Subject: [Koha-cvs] koha/C4/Circulation Circ2.pm [dev_week]
Date: Thu, 25 Jan 2007 05:45:12 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         dev_week
Changes by:     Ryan Higgins <rych>     07/01/25 05:45:12

Modified files:
        C4/Circulation : Circ2.pm 

Log message:
        issuedate checking calendar

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Circulation/Circ2.pm?cvsroot=koha&only_with_tag=dev_week&r1=1.87.2.14.2.14&r2=1.87.2.14.2.15

Patches:
Index: Circ2.pm
===================================================================
RCS file: /sources/koha/koha/C4/Circulation/Circ2.pm,v
retrieving revision 1.87.2.14.2.14
retrieving revision 1.87.2.14.2.15
diff -u -b -r1.87.2.14.2.14 -r1.87.2.14.2.15
--- Circ2.pm    25 Jan 2007 04:14:43 -0000      1.87.2.14.2.14
+++ Circ2.pm    25 Jan 2007 05:45:12 -0000      1.87.2.14.2.15
@@ -3,7 +3,7 @@
 
 package C4::Circulation::Circ2;
 
-# $Id: Circ2.pm,v 1.87.2.14.2.14 2007/01/25 04:14:43 rych Exp $
+# $Id: Circ2.pm,v 1.87.2.14.2.15 2007/01/25 05:45:12 rych Exp $
 
 #package to deal with Returns
 #written 3/11/99 by address@hidden
@@ -36,6 +36,7 @@
 use C4::Koha;
 use C4::Biblio;
 use C4::Accounts;
+use C4::Calendar::Calendar;
 use Date::Calc qw(
 Today
 Today_and_Now
@@ -918,6 +919,13 @@
                my $datedue=time+($loanlength)*86400;
                my @datearr = localtime($datedue);
                my $dateduef = 
(1900+$datearr[5])."-".($datearr[4]+1)."-".$datearr[3];
+
+        # now calling addDate() from Calendar.pm 
+        my $calendar = C4::Calendar::Calendar->new(branchcode => 
$borrower->{'branchcode'});
+        my ($yeardue, $monthdue, $daydue) = split /-/, $dateduef;
+        ($daydue, $monthdue, $yeardue) = $calendar->addDate($daydue, 
$monthdue, $yeardue, $loanlength);
+        $dateduef = "$yeardue-".sprintf ("%0.2d", $monthdue)."-". 
sprintf("%0.2d",$daydue);
+
                if ($date) {
                        $dateduef=$date;
                }




reply via email to

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