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.60,1.61


From: Chris Cormack
Subject: [Koha-cvs] CVS: koha/circ circulation.pl,1.60,1.61
Date: Thu, 16 Oct 2003 13:36:27 -0700

Update of /cvsroot/koha/koha/circ
In directory sc8-pr-cvs1:/tmp/cvs-serv3169/circ

Modified Files:
        circulation.pl 
Log Message:
Fix for bug 436, thanks to Pierre


Index: circulation.pl
===================================================================
RCS file: /cvsroot/koha/koha/circ/circulation.pl,v
retrieving revision 1.60
retrieving revision 1.61
diff -C2 -r1.60 -r1.61
*** circulation.pl      24 Jul 2003 08:33:35 -0000      1.60
--- circulation.pl      16 Oct 2003 20:36:25 -0000      1.61
***************
*** 297,300 ****
--- 297,301 ----
                firstname => $borrower->{'firstname'},
                surname => $borrower->{'surname'},
+               categorycode => $borrower->{'categorycode'},
                question => $question,
                barcode => $barcode,
***************
*** 309,317 ****
                CGIselectborrower => $CGIselectborrower,
  
-               patrontable => $patrontable,
-               flaginfotable => $flaginfotable,
-               CHARGES => $flags->{'CHARGES'},
                amountold => $amountold,
!               todayissues => address@hidden, 
                previssues => address@hidden
        );
--- 310,315 ----
                CGIselectborrower => $CGIselectborrower,
  
                amountold => $amountold,
!               todayissues => address@hidden,
                previssues => address@hidden
        );
***************
*** 367,425 ****
      my $flags = $borrower->{'flags'};
      my $flaginfotable='';
!     my $flaginfotext='';
      my $flag;
      my $color='';
      foreach $flag (sort keys %$flags) {
        ($color eq $linecolor1) ? ($color=$linecolor2) : ($color=$linecolor1);
        $flags->{$flag}->{'message'}=~s/\n/<br>/g;
        if ($flags->{$flag}->{'noissues'}) {
!           if ($flag eq 'CHARGES') {
!               $flaginfotext.="<tr><td valign=top><font 
color=red>$flag</font></td><td 
bgcolor=$color><b>$flags->{$flag}->{'message'}</b> <a 
href=/cgi-bin/koha/pay.pl?bornum=$borrower->{'borrowernumber'} 
onClick=\"openWindow(this, 'Payment', 480,640)\">Payment</a></td></tr>\n";
!           } else {
!               $flaginfotext.="<tr><td valign=top><font 
color=red>$flag</font></td><td 
bgcolor=$color>$flags->{$flag}->{'message'}</td></tr>\n";
!           }
        } else {
!           if ($flag eq 'CHARGES') {
!               $flaginfotext.="<tr><td valign=top>$flag</td><td> 
$flags->{$flag}->{'message'} <a 
href=/cgi-bin/koha/pay.pl?bornum=$borrower->{'borrowernumber'} 
onClick=\"openWindow(this, 'Payment', 480,640)\">Payment</a></td></tr>\n";
!           } elsif ($flag eq 'WAITING') {
!               my $itemswaiting='';
!               my $items=$flags->{$flag}->{'itemlist'};
!               foreach my $item (@$items) {
!                   my ($iteminformation) = getiteminformation(\%env, 
$item->{'itemnumber'}, 0);
!                   $itemswaiting.="<a 
href=/cgi-bin/koha/detail.pl?bib=$iteminformation->{'biblionumber'}&type=intra 
onClick=\"openWindow(this, 'Item', 480, 
640)\">$iteminformation->{'barcode'}</a> $iteminformation->{'title'} 
($branches->{$iteminformation->{'holdingbranch'}}->{'branchname'})<br>\n";
                }
!               $flaginfotext.="<tr><td 
valign=top>$flag</td><td>$itemswaiting</td></tr>\n";
!           } elsif ($flag eq 'ODUES') {
!               my $items=$flags->{$flag}->{'itemlist'};
!               my $itemswaiting="<table border=1 cellspacing=0 
cellpadding=2>\n";
!               my $currentcolor=$color;
!               {
!                   my $color=$currentcolor;
!                   foreach my $item (@$items) {
!                       ($color eq $linecolor1) ? ($color=$linecolor2) : 
($color=$linecolor1);
                        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";
!               if ($query->param('module') ne 'returns'){
!                 $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 {
-               $flaginfotext.="<tr><td 
valign=top>$flag</td><td>$flags->{$flag}->{'message'}</td></tr>\n";
-           }
        }
      }
-     ($flaginfotext) && ($flaginfotext="<tr><td  
colspan=2><b>Flags</b></td></tr>$flaginfotext\n");
-     $flaginfotext.="</table>";
-     my $patrontable= << "EOF";
- <br><p>
-     <table border=1 cellpadding=5 cellspacing=0 align=right>
-     <tr><td colspan=2><font color=black><b>Patron 
Information</b></font></td></tr>
-     <tr><td colspan=2>
-     <a href=/cgi-bin/koha/moremember.pl?bornum=$borrower->{'borrowernumber'} 
onClick="openWindow(this,'Member', 480, 640)">$borrower->{'cardnumber'}</a> 
$borrower->{'surname'}, $borrower->{'title'} 
$borrower->{'firstname'}<br>$borrower->{'streetaddress'} $borrower->{'city'} 
Cat: $borrower->{'categorycode'} </td></tr>
- EOF
      return($patrontable, $flaginfotext);
  }
--- 365,436 ----
      my $flags = $borrower->{'flags'};
      my $flaginfotable='';
!     my $flaginfotext;
!     #my $flaginfotext='';
      my $flag;
      my $color='';
      foreach $flag (sort keys %$flags) {
+       warn $flag;
+       my @itemswaiting='';
        ($color eq $linecolor1) ? ($color=$linecolor2) : ($color=$linecolor1);
        $flags->{$flag}->{'message'}=~s/\n/<br>/g;
        if ($flags->{$flag}->{'noissues'}) {
!               $template->param(
!                       noissues => 'true',
!                       color => $color,
!                        );
!               if ($flag eq 'CHARGES') {
!                       $template->param(
!                               charges => 'true',
!                               chargesmsg => $flags->{'CHARGES'}->{'message'}
!                                );
!               }
        } else {
!                if ($flag eq 'CHARGES') {
!                       $template->param(
!                               charges => 'true',
!                               chargesmsg => $flags->{'CHARGES'}->{'message'}
!                        );
                }
!               if ($flag eq 'WAITING') {
!                       my $items=$flags->{$flag}->{'itemlist'};
!                       foreach my $item (@$items) {
                        my ($iteminformation) = getiteminformation(\%env, 
$item->{'itemnumber'}, 0);
!                       $iteminformation->{'branchname'} = 
$branches->{$iteminformation->{'holdingbranch'}}->{'branchname'};
!                       push @itemswaiting, $iteminformation;
!                       }
!                       $template->param(
!                               waiting => 'true',
!                               waitingmsg => $flags->{'WAITING'}->{'message'},
!                               itemswaiting => address@hidden,
!                                );
                }
!               if ($flag eq 'ODUES') {
!                       $template->param(
!                               odues => 'true',
!                               oduesmsg => $flags->{'ODUES'}->{'message'}
!                                );
! 
!                       my $items=$flags->{$flag}->{'itemlist'};
!                       my $currentcolor=$color;
!                       {
!                       my $color=$currentcolor;
!                       foreach my $item (@$items) {
!                               ($color eq $linecolor1) ? ($color=$linecolor2) 
: ($color=$linecolor1);
!                               my ($iteminformation) = 
getiteminformation(\%env, $item->{'itemnumber'}, 0);
!                               push @itemswaiting, $iteminformation;
!                       }
!                       }
!                       if ($query->param('module') ne 'returns'){
!                               $template->param( nonreturns => 'true' );
!                       }
!               }
!               if ($flag eq 'NOTES') {
!                       $template->param(
!                               notes => 'true',
!                               notesmsg => $flags->{'NOTES'}->{'message'}
!                                );
                }
        }
      }
      return($patrontable, $flaginfotext);
  }




reply via email to

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