koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/circ circulation.pl,1.23.2.7,1.23.2.8 selectbranchp


From: Steve Tonnesen
Subject: [Koha-cvs] CVS: koha/circ circulation.pl,1.23.2.7,1.23.2.8 selectbranchprinter.pl,1.3.2.2,1.3.2.3
Date: Thu, 24 Oct 2002 11:20:34 -0700

Update of /cvsroot/koha/koha/circ
In directory usw-pr-cvs1:/tmp/cvs-serv28289/circ

Modified Files:
      Tag: rel-1-2
        circulation.pl selectbranchprinter.pl 
Log Message:
Merging files from trunk and rel-1-2, hoping to find some fixes to reserve
problems in the trunk code.  Didn't find any.  :(


Index: circulation.pl
===================================================================
RCS file: /cvsroot/koha/koha/circ/circulation.pl,v
retrieving revision 1.23.2.7
retrieving revision 1.23.2.8
diff -C2 -r1.23.2.7 -r1.23.2.8
*** circulation.pl      23 Oct 2002 20:27:51 -0000      1.23.2.7
--- circulation.pl      24 Oct 2002 18:20:30 -0000      1.23.2.8
***************
*** 37,42 ****
  my %env;
  my $headerbackgroundcolor='#99cc33';
! my $circbackgroundcolor='#ffffcc';
! my $circbackgroundcolor='white';
  my $linecolor1='#ffffcc';
  my $linecolor2='white';
--- 37,42 ----
  my %env;
  my $headerbackgroundcolor='#99cc33';
! my $circbackgroundcolor='#ffffcc';    # FIXME - Never used
! my $circbackgroundcolor='white';      # FIXME - Never used
  my $linecolor1='#ffffcc';
  my $linecolor2='white';
***************
*** 73,78 ****
  
  my @datearr = localtime(time());
! my $tday = localtime(time());
! warn "today: $tday \n";
  my $todaysdate = (1900+$datearr[5]).sprintf ("%0.2d", 
($datearr[4]+1)).sprintf ("%0.2d", ($datearr[3]));
  #warn $todaysdate;
--- 73,79 ----
  
  my @datearr = localtime(time());
! my $tday = localtime(time());         # FIXME - Unused
! #warn "today: $tday \n";
! # FIXME - Could just use POSIX::strftime("%Y%m%d", localtime);
  my $todaysdate = (1900+$datearr[5]).sprintf ("%0.2d", 
($datearr[4]+1)).sprintf ("%0.2d", ($datearr[3]));
  #warn $todaysdate;
***************
*** 97,102 ****
  }
  
! my $borrowernumber = $query->param('borrnumber');    
! my $bornum = $query->param('borrnumber');    
  # check and see if we should print
  my $print=$query->param('print');
--- 98,103 ----
  }
  
! my $borrowernumber = $query->param('borrnumber');
! my $bornum = $query->param('borrnumber');
  # check and see if we should print
  my $print=$query->param('print');
***************
*** 106,117 ****
  }
  if ($print eq 'yes' && $borrowernumber ne ''){
!     printslip(\%env,$borrowernumber);    
      $query->param('borrnumber','');
      $borrowernumber='';
  }
-     
  
  
! # get the currently issued books......
  my $borrower;
  my $flags;
--- 107,118 ----
  }
  if ($print eq 'yes' && $borrowernumber ne ''){
!     printslip(\%env,$borrowernumber);
      $query->param('borrnumber','');
      $borrowernumber='';
  }
  
  
! 
! # get the borrower information.....
  my $borrower;
  my $flags;
***************
*** 132,136 ****
  
  
! # if the barcode is set
  my ($iteminformation, $duedate, $rejected, $question, $questionnumber, 
$defaultanswer);
  
--- 133,137 ----
  
  
! 
  my ($iteminformation, $duedate, $rejected, $question, $questionnumber, 
$defaultanswer);
  
***************
*** 139,158 ****
  my $day=$query->param('day');
  
! 
  if ($barcode) {
      $barcode = cuecatbarcodedecode($barcode);
      my ($datedue, $invalidduedate) = fixdate($year, $month, $day);
  
- 
      unless ($invalidduedate) {
        $env{'datedue'}=$datedue;
        my @time=localtime(time);
        my $date= (1900+$time[5])."-".($time[4]+1)."-".$time[3];
!       ($iteminformation, $duedate, $rejected, $question, $questionnumber, 
$defaultanswer, $message) 
                       = issuebook(\%env, $borrower, $barcode, \%responses, 
$date);
      }
  }
  
! 
  
  
--- 140,161 ----
  my $day=$query->param('day');
  
! # if the barcode is set
  if ($barcode) {
      $barcode = cuecatbarcodedecode($barcode);
      my ($datedue, $invalidduedate) = fixdate($year, $month, $day);
  
      unless ($invalidduedate) {
        $env{'datedue'}=$datedue;
        my @time=localtime(time);
        my $date= (1900+$time[5])."-".($time[4]+1)."-".$time[3];
!       ($iteminformation, $duedate, $rejected, $question, $questionnumber, 
$defaultanswer, $message)
                       = issuebook(\%env, $borrower, $barcode, \%responses, 
$date);
      }
  }
  
! # reload the borrower info for the sake of reseting the flags.....
! if ($borrowernumber) {
!     ($borrower, $flags) = getpatroninformation(\%env,$borrowernumber,0);
! }
  
  
***************
*** 209,213 ****
  </td></tr></table>
  <FONT SIZE=6><em>Circulation: Issues</em></FONT><br>
! <b>Branch:</b> $branches->{$branch}->{'branchname'} &nbsp 
  <b>Printer:</b> $printers->{$printer}->{'printername'} <br>
  <a href=selectbranchprinter.pl>Change Settings</a></td>
--- 212,216 ----
  </td></tr></table>
  <FONT SIZE=6><em>Circulation: Issues</em></FONT><br>
! <b>Branch:</b> $branches->{$branch}->{'branchname'} &nbsp
  <b>Printer:</b> $printers->{$printer}->{'printername'} <br>
  <a href=selectbranchprinter.pl>Change Settings</a></td>
***************
*** 224,228 ****
  </td></tr></table>
  <FONT SIZE=6><em>Circulation: Issues</em></FONT><br>
! <b>Branch:</b> $branches->{$branch}->{'branchname'} &nbsp 
  <b>Printer:</b> $printers->{$printer}->{'printername'} <br>
  <a href=selectbranchprinter.pl>Change Settings</a></td>
--- 227,231 ----
  </td></tr></table>
  <FONT SIZE=6><em>Circulation: Issues</em></FONT><br>
! <b>Branch:</b> $branches->{$branch}->{'branchname'} &nbsp
  <b>Printer:</b> $printers->{$printer}->{'printername'} <br>
  <a href=selectbranchprinter.pl>Change Settings</a></td>
***************
*** 256,262 ****
  <table border=1 cellpadding=5 cellspacing=0 bgcolor="#dddddd">
  <tr><th bgcolor=$headerbackgroundcolor background=$backgroundimage>
! <font color=black><b>Issuing Question</b></font></th></tr>
! <tr><td><table border=0 cellpadding=10><tr><td> 
! Attempting to issue $iteminformation->{'title'} 
  by $iteminformation->{'author'} to $borrower->{'firstname'} 
$borrower->{'surname'}.
  <p>
--- 259,265 ----
  <table border=1 cellpadding=5 cellspacing=0 bgcolor="#dddddd">
  <tr><th bgcolor=$headerbackgroundcolor background=$backgroundimage>
! <font size=+2 color=red><b>Issuing Question</b></font></th></tr>
! <tr><td><table border=0 cellpadding=10><tr><td>
! Attempting to issue $iteminformation->{'title'}
  by $iteminformation->{'author'} to $borrower->{'firstname'} 
$borrower->{'surname'}.
  <p>
***************
*** 389,393 ****
  <tr><td> $message </td></tr></table>
  EOF
- 
  }
  
--- 392,395 ----
***************
*** 416,420 ****
        my $datedue = $book->{'date_due'};
        #convert to nz style dates
!       #this should be set with some kinda config variable         
        my @tempdate=split(/-/,$dd);
        $dd="$tempdate[2]/$tempdate[1]/$tempdate[0]";
--- 418,422 ----
        my $datedue = $book->{'date_due'};
        #convert to nz style dates
!       #this should be set with some kinda config variable
        my @tempdate=split(/-/,$dd);
        $dd="$tempdate[2]/$tempdate[1]/$tempdate[0]";
***************
*** 432,441 ****
  <td bgcolor=$tcolor align=center>$book->{'dewey'} 
$book->{'subclass'}</td></tr>
  EOF
!     } 
!     foreach my $book (sort {$a->{'due_date'} <=> $b->{'due_date'}} 
@previousissues){
        my $dd = $book->{'date_due'};
        my $datedue = $book->{'date_due'};
        #convert to nz style dates
!       #this should be set with some kinda config variable         
        my @tempdate=split(/-/,$dd);
        $dd="$tempdate[2]/$tempdate[1]/$tempdate[0]";
--- 434,447 ----
  <td bgcolor=$tcolor align=center>$book->{'dewey'} 
$book->{'subclass'}</td></tr>
  EOF
!     }
!     # FIXME - For small and private libraries, it'd be nice if this
!     # table included a "Return" link next to each book, so that you
!     # don't have to remember the book's bar code and type it in on the
!     # "Returns" page.
!     foreach my $book (sort {$a->{'date_due'} cmp $b->{'date_due'}} 
@previousissues){
        my $dd = $book->{'date_due'};
        my $datedue = $book->{'date_due'};
        #convert to nz style dates
!       #this should be set with some kinda config variable
        my @tempdate=split(/-/,$dd);
        $dd="$tempdate[2]/$tempdate[1]/$tempdate[0]";
***************
*** 559,564 ****
      } else {
        return $barcode;
!     } 
! } 
  
  sub fixdate {
--- 565,570 ----
      } else {
        return $barcode;
!     }
! }
  
  sub fixdate {
***************
*** 624,628 ****
                        my ($iteminformation) = getiteminformation(\%env, 
$item->{'itemnumber'}, 0);
                        $itemswaiting.="<tr><td><font 
color=red>$iteminformation->{'date_due'}</font></td><td bgcolor=$color><a 
href=/cgi-bin/koha/detail.pl?bib=$iteminformation->{'biblionumber'}&type=intra 
onClick=\"openWindow(this, 'Item', 480, 
640)\">$iteminformation->{'barcode'}</a></td><td>$iteminformation->{'title'}</td></tr>\n";
!                   }               
                }
                $itemswaiting.="</table>\n";
--- 630,634 ----
                        my ($iteminformation) = getiteminformation(\%env, 
$item->{'itemnumber'}, 0);
                        $itemswaiting.="<tr><td><font 
color=red>$iteminformation->{'date_due'}</font></td><td bgcolor=$color><a 
href=/cgi-bin/koha/detail.pl?bib=$iteminformation->{'biblionumber'}&type=intra 
onClick=\"openWindow(this, 'Item', 480, 
640)\">$iteminformation->{'barcode'}</a></td><td>$iteminformation->{'title'}</td></tr>\n";
!                   }
                }
                $itemswaiting.="</table>\n";
***************
*** 630,634 ****
                  $flaginfotext.="<tr><td 
valign=top>$flag</td><td>$flags->{$flag}->{'message'}, See below</td></tr>\n";
                } else {
!                 $flaginfotext.="<tr><td 
valign=top>$flag</td><td>$flags->{$flag}->{'message'}</td></tr>\n"; 
                }
            } else {
--- 636,640 ----
                  $flaginfotext.="<tr><td 
valign=top>$flag</td><td>$flags->{$flag}->{'message'}, See below</td></tr>\n";
                } else {
!                 $flaginfotext.="<tr><td 
valign=top>$flag</td><td>$flags->{$flag}->{'message'}</td></tr>\n";
                }
            } else {
***************
*** 650,654 ****
  
  
! 
  sub printslip {
      my ($env,$borrowernumber)address@hidden;
--- 656,660 ----
  
  
! # FIXME - This clashes with &C4::Print::printslip
  sub printslip {
      my ($env,$borrowernumber)address@hidden;
***************
*** 662,668 ****
      my $i=0;
      my @issues;
!     foreach (sort keys %$borrowerissues) {
        $issues[$i]=$borrowerissues->{$_};
        my $dd=$issues[$i]->{'date_due'};
        #convert to nz style dates
        #this should be set with some kinda config variable
--- 668,675 ----
      my $i=0;
      my @issues;
!     foreach (sort {$a <=> $b} keys %$borrowerissues) {
        $issues[$i]=$borrowerissues->{$_};
        my $dd=$issues[$i]->{'date_due'};
+ #     warn $_,$dd;
        #convert to nz style dates
        #this should be set with some kinda config variable
***************
*** 671,677 ****
        $i++;
      }
!     foreach (sort keys %$borroweriss2) {
        $issues[$i]=$borroweriss2->{$_};
        my $dd=$issues[$i]->{'date_due'};
        #convert to nz style dates
        #this should be set with some kinda config variable
--- 678,685 ----
        $i++;
      }
!     foreach (sort {$a <=> $b} keys %$borroweriss2) {
        $issues[$i]=$borroweriss2->{$_};
        my $dd=$issues[$i]->{'date_due'};
+ #     warn $_,$dd;
        #convert to nz style dates
        #this should be set with some kinda config variable

Index: selectbranchprinter.pl
===================================================================
RCS file: /cvsroot/koha/koha/circ/selectbranchprinter.pl,v
retrieving revision 1.3.2.2
retrieving revision 1.3.2.3
diff -C2 -r1.3.2.2 -r1.3.2.3
*** selectbranchprinter.pl      23 Oct 2002 20:27:52 -0000      1.3.2.2
--- selectbranchprinter.pl      24 Oct 2002 18:20:31 -0000      1.3.2.3
***************
*** 27,31 ****
  
  
! # this is a reorganisation of circulationold.pl 
  # dividing it up into three scripts......
  # this will be the first one that chooses branch and printer settings....
--- 27,31 ----
  
  
! # this is a reorganisation of circulationold.pl
  # dividing it up into three scripts......
  # this will be the first one that chooses branch and printer settings....




reply via email to

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