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: Kyle Hall
Subject: [Koha-cvs] koha/C4/Circulation Circ2.pm [dev_week]
Date: Fri, 18 May 2007 14:20:25 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         dev_week
Changes by:     Kyle Hall <kylemhall>   07/05/18 14:20:25

Modified files:
        C4/Circulation : Circ2.pm 

Log message:
        Recommitting last update, something went wrong.

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.31&r2=1.87.2.14.2.32

Patches:
Index: Circ2.pm
===================================================================
RCS file: /sources/koha/koha/C4/Circulation/Attic/Circ2.pm,v
retrieving revision 1.87.2.14.2.31
retrieving revision 1.87.2.14.2.32
diff -u -b -r1.87.2.14.2.31 -r1.87.2.14.2.32
--- Circ2.pm    17 May 2007 17:54:41 -0000      1.87.2.14.2.31
+++ Circ2.pm    18 May 2007 14:20:21 -0000      1.87.2.14.2.32
@@ -3,7 +3,7 @@
 
 package C4::Circulation::Circ2;
 
-# $Id: Circ2.pm,v 1.87.2.14.2.31 2007/05/17 17:54:41 kylemhall Exp $
+# $Id: Circ2.pm,v 1.87.2.14.2.32 2007/05/18 14:20:21 kylemhall Exp $
 
 #package to deal with Returns
 #written 3/11/99 by address@hidden
@@ -950,11 +950,10 @@
 #                   transferbook($tobrcd,$barcode, 1);
                     warn "transferbook";
                 }
-<<<<<<< Circ2.pm
             }
         }
         # Record in the database the fact that the book was issued.
-        my $sth=$dbh->prepare("insert into issues (borrowernumber, itemnumber, 
date_due, branchcode, issue_date ) values (?,?,?,?, CURRENT_DATE)");
+        my $sth=$dbh->prepare("insert into issues (borrowernumber, itemnumber, 
date_due, branchcode, issue_date) values (?,?,?,?, CURRENT_DATE)");
         my $loanlength = 
getLoanLength($borrower->{'categorycode'},$iteminformation->{'itemtype'},$calendar_branch);
         my @datearr = localtime();
         my $dateduef;
@@ -997,54 +996,6 @@
 # moo
     }
 }
-=======
-            }
-        }
-        # Record in the database the fact that the book was issued.
-        my $sth=$dbh->prepare("insert into issues (borrowernumber, itemnumber, 
date_due, branchcode) values (?,?,?,?)");
-        my $loanlength = 
getLoanLength($borrower->{'categorycode'},$iteminformation->{'itemtype'},$calendar_branch);
-        my @datearr = localtime();
-        my $dateduef;
-
-        # if a hard set date-due is pasted, then use it!
-        if ($date) { 
-            warn "--- hard-set due-date = $date";
-            $dateduef=$date;
-        } 
-        # else, calc date-due using loan-length and holidays.
-        else {    
-            $dateduef = (1900+$datearr[5])."-".($datearr[4]+1)."-".$datearr[3];
-            my $calendar = C4::Calendar->new(branchcode => $calendar_branch);
-            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 ReturnBeforeExpiry ON the datedue can't be after borrower expirydate
-#        if (C4::Context->preference('ReturnBeforeExpiry') && $dateduef gt 
$borrower->{expiry}) {
-#            $dateduef=$borrower->{expiry};
-#       }
-
-        $sth->execute($borrower->{'borrowernumber'}, 
$iteminformation->{'itemnumber'}, $dateduef, $env->{'branchcode'});
-        $sth->finish;
-        $iteminformation->{'issues'}++;
-        $sth=$dbh->prepare("update items set issues=? where itemnumber=?");
-        
$sth->execute($iteminformation->{'issues'},$iteminformation->{'itemnumber'});
-        $sth->finish;
-        &itemseen($iteminformation->{'itemnumber'});
-            itemborrowed($iteminformation->{'itemnumber'});
-        # If it costs to borrow this book, charge it to the patron's account.
-        my ($charge,$itemtype)=calc_charges($env, 
$iteminformation->{'itemnumber'}, $borrower->{'borrowernumber'});
-        if ($charge > 0) {
-            createcharge($env, $dbh, $iteminformation->{'itemnumber'}, 
$borrower->{'borrowernumber'}, $charge);
-            $iteminformation->{'charge'}=$charge;
-        }
-        # Record the fact that this book was issued.
-        
&UpdateStats($env,$env->{'branchcode'},'issue',$charge,'',$iteminformation->{'itemnumber'},$iteminformation->{'itemtype'},$borrower->{'borrowernumber'});
-# moo
-    }
-}
->>>>>>> 1.87.2.14.2.30
 
 
 =head2 getLoanLength




reply via email to

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