koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/C4/Circulation Circ2.pm,1.92,1.93


From: Chris Cormack
Subject: [Koha-cvs] CVS: koha/C4/Circulation Circ2.pm,1.92,1.93
Date: Sat, 14 May 2005 21:34:11 -0700

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

Modified Files:
        Circ2.pm 
Log Message:
More little changes to remove warns


Index: Circ2.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Circulation/Circ2.pm,v
retrieving revision 1.92
retrieving revision 1.93
diff -C2 -r1.92 -r1.93
*** Circ2.pm    14 May 2005 22:26:07 -0000      1.92
--- Circ2.pm    15 May 2005 04:34:09 -0000      1.93
***************
*** 450,454 ****
        my $fbr = $iteminformation->{'holdingbranch'};
        # if is permanent...
!       if ($branches->{$hbr}->{'PE'}) {
                $messages->{'IsPermanent'} = $hbr;
        }
--- 450,454 ----
        my $fbr = $iteminformation->{'holdingbranch'};
        # if is permanent...
!       if ($hbr && $branches->{$hbr}->{'PE'}) {
                $messages->{'IsPermanent'} = $hbr;
        }
***************
*** 722,735 ****
                $issuingimpossible{UNKNOWN_BARCODE} = 1;
        }
!       if ($iteminformation->{'notforloan'} > 0) {
                $issuingimpossible{NOT_FOR_LOAN} = 1;
        }
!       if ($iteminformation->{'itemtype'} eq 'REF') {
                $issuingimpossible{NOT_FOR_LOAN} = 1;
        }
!       if ($iteminformation->{'wthdrawn'} == 1) {
                $issuingimpossible{WTHDRAWN} = 1;
        }
!       if ($iteminformation->{'restricted'} == 1) {
                $issuingimpossible{RESTRICTED} = 1;
        }
--- 722,735 ----
                $issuingimpossible{UNKNOWN_BARCODE} = 1;
        }
!       if ($iteminformation->{'notforloan'} && 
$iteminformation->{'notforloan'} > 0) {
                $issuingimpossible{NOT_FOR_LOAN} = 1;
        }
!       if ($iteminformation->{'itemtype'} &&$iteminformation->{'itemtype'} eq 
'REF') {
                $issuingimpossible{NOT_FOR_LOAN} = 1;
        }
!       if ($iteminformation->{'wthdrawn'} && $iteminformation->{'wthdrawn'} == 
1) {
                $issuingimpossible{WTHDRAWN} = 1;
        }
!       if ($iteminformation->{'restricted'} && 
$iteminformation->{'restricted'} == 1) {
                $issuingimpossible{RESTRICTED} = 1;
        }
***************
*** 741,745 ****
  #
        my ($currentborrower) = 
currentborrower($iteminformation->{'itemnumber'});
!       if ($currentborrower eq $borrower->{'borrowernumber'}) {
  # Already issued to current borrower. Ask whether the loan should
  # be renewed.
--- 741,745 ----
  #
        my ($currentborrower) = 
currentborrower($iteminformation->{'itemnumber'});
!       if ($currentborrower && $currentborrower eq 
$borrower->{'borrowernumber'}) {
  # Already issued to current borrower. Ask whether the loan should
  # be renewed.
***************
*** 1026,1030 ****
        my $hbr = $iteminformation->{'homebranch'};
        my $branches = getbranches();
!       if ($branches->{$hbr}->{'PE'}) {
                $messages->{'IsPermanent'} = $hbr;
        }
--- 1026,1030 ----
        my $hbr = $iteminformation->{'homebranch'};
        my $branches = getbranches();
!       if ($hbr && $branches->{$hbr}->{'PE'}) {
                $messages->{'IsPermanent'} = $hbr;
        }
***************
*** 1615,1619 ****
                        $renews = $data2->{'renewalsallowed'};
                }
!               if ($renews > $data1->{'renewals'}) {
                        $renewokay = 1;
                }
--- 1615,1619 ----
                        $renews = $data2->{'renewalsallowed'};
                }
!               if ($renews && $renews > $data1->{'renewals'}) {
                        $renewokay = 1;
                }
***************
*** 1852,1873 ****
      my $invalidduedate;
      my $date;
!     if (($year eq 0) && ($month eq 0) && ($year eq 0)) {
  #     $env{'datedue'}='';
-     } else {
-       if (($year eq 0) || ($month eq 0) || ($year eq 0)) {
-           $invalidduedate=1;
        } else {
!           if (($day>30) && (($month==4) || ($month==6) || ($month==9) || 
($month==11))) {
!               $invalidduedate = 1;
!           } elsif (($day > 29) && ($month == 2)) {
!               $invalidduedate=1;
!           } elsif (($month == 2) && ($day > 28) && (($year%4) && 
((!($year%100) || ($year%400))))) {
                $invalidduedate=1;
            } else {
                $date="$year-$month-$day";
            }
        }
      }
      return ($date, $invalidduedate);
  }
  
--- 1852,1879 ----
      my $invalidduedate;
      my $date;
!     if ($year && $month && $day){
!       if (($year eq 0 ) && ($month eq 0) && ($year eq 0)) {
  #     $env{'datedue'}='';
        } else {
!           if (($year eq 0) || ($month eq 0) || ($year eq 0)) {
                $invalidduedate=1;
            } else {
+               if (($day>30) && (($month==4) || ($month==6) || ($month==9) || 
($month==11))) {
+                   $invalidduedate = 1;
+               } 
+               elsif (($day > 29) && ($month == 2)) {
+                   $invalidduedate=1;
+               } 
+               elsif (($month == 2) && ($day > 28) && (($year%4) && 
((!($year%100) || ($year%400))))) {
+                   $invalidduedate=1;
+               } 
+               else {
                $date="$year-$month-$day";
+               }
            }
        }
      }
      return ($date, $invalidduedate);
+       
  }
  




reply via email to

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