koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha circ/circulation.pl koha-tmpl/intranet-tmp... [rel_3_0]


From: LAURIN arnaud
Subject: [Koha-cvs] koha circ/circulation.pl koha-tmpl/intranet-tmp... [rel_3_0]
Date: Wed, 06 Dec 2006 17:05:20 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         rel_3_0
Changes by:     LAURIN arnaud <alaurin> 06/12/06 17:05:20

Modified files:
        circ           : circulation.pl 
        koha-tmpl/intranet-tmpl/prog/en/circ: circulation.tmpl 

Log message:
        bugfixing : sanop : #79
        
                the count of issues, is now corretly implemented,
        
                for more visibility, now, we display waiting reserves on the 
first view ...

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/circ/circulation.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.97.2.13&r2=1.97.2.14
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/circ/circulation.tmpl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.6.2.16&r2=1.6.2.17

Patches:
Index: circ/circulation.pl
===================================================================
RCS file: /sources/koha/koha/circ/circulation.pl,v
retrieving revision 1.97.2.13
retrieving revision 1.97.2.14
diff -u -b -r1.97.2.13 -r1.97.2.14
--- circ/circulation.pl 6 Dec 2006 11:10:00 -0000       1.97.2.13
+++ circ/circulation.pl 6 Dec 2006 17:05:20 -0000       1.97.2.14
@@ -169,6 +169,7 @@
 my $borrower;
 my $picture;
 my @lines;
+
 if ($borrowernumber) {
     $borrower = getpatroninformation( \%env, $borrowernumber, 0 );
     my ( $od, $issue, $fines ) = borrdata2( \%env, $borrowernumber );
@@ -213,6 +214,12 @@
     if ($issueconfirmed) {
         issuebook( \%env, $borrower, $barcode, $datedue, $cancelreserve );
         $inprocess = 1;
+        
+# FIXME If the issue is confirmed, we launch another time borrdata2, now 
display the issue count after issue 
+        my ( $od, $issue, $fines ) = borrdata2( \%env, $borrowernumber );
+        $template->param(
+        issuecount   => $issue,
+       );
     }
     else {
         my ( $error, $question ) =
@@ -264,8 +271,11 @@
     # now we show the status of the borrower's reservations
     my @borrowerreserv = GetReservations( 0, $borrowernumber );
     my @reservloop;
+    my @WaitingReserveLoop;
+    
     foreach my $num_res (@borrowerreserv) {
         my %getreserv;
+        my %getWaitingReserveInfo;
         my %env;
         my $getiteminfo  = getiteminformation( $num_res->{'itemnumber'} );
         my $itemtypeinfo = getitemtypeinfo( $getiteminfo->{'itemtype'} );
@@ -284,12 +294,20 @@
         $getreserv{barcodereserv}  = $getiteminfo->{'barcode'};
         $getreserv{itemcallnumber} = $getiteminfo->{'itemcallnumber'};
 
-        #              check if we have a waitin status for reservations
+        #              check if we have a waiting status for reservations
         if ( $num_res->{'found'} eq 'W' ) {
             $getreserv{color}   = 'reserved';
             $getreserv{waiting} = 1;
+#      genarate information displaying only waiting reserves
+               $getWaitingReserveInfo{title}           = 
$getiteminfo->{'title'};
+               $getWaitingReserveInfo{itemtype}        = 
$itemtypeinfo->{'description'};
+               $getWaitingReserveInfo{author}          = 
$getiteminfo->{'author'};
+               $getWaitingReserveInfo{reservedate}     = format_date( 
$num_res->{'reservedate'} );
+               if ($getiteminfo->{'holdingbranch'} ne $num_res->{'branchcode'} 
) {
+               $getWaitingReserveInfo{waitingat}       = getbranchname( 
$num_res->{'branchcode'} );
         }
 
+        }
         #              check transfers with the itemnumber foud in th 
reservation loop
         if ($transfertwhen) {
             $getreserv{color}      = 'transfered';
@@ -319,14 +337,20 @@
             $getreserv{itemcallnumber}  = '----------';
 
         }
-
         push( @reservloop, \%getreserv );
+
+#         if we have a reserve waiting, initiate waitingreserveloop
+        if ($getreserv{waiting} eq 1) {
+        push (@WaitingReserveLoop, \%getWaitingReserveInfo)
+        }
+      
     }
 
     # return result to the template
     $template->param( 
         countreserv => scalar @reservloop,
-        reservloop  => address@hidden 
+        reservloop  => address@hidden ,
+        WaitingReserveLoop  => address@hidden,
     );
 }
 

Index: koha-tmpl/intranet-tmpl/prog/en/circ/circulation.tmpl
===================================================================
RCS file: 
/sources/koha/koha/koha-tmpl/intranet-tmpl/prog/en/circ/circulation.tmpl,v
retrieving revision 1.6.2.16
retrieving revision 1.6.2.17
diff -u -b -r1.6.2.16 -r1.6.2.17
--- koha-tmpl/intranet-tmpl/prog/en/circ/circulation.tmpl       6 Dec 2006 
11:10:00 -0000       1.6.2.16
+++ koha-tmpl/intranet-tmpl/prog/en/circ/circulation.tmpl       6 Dec 2006 
17:05:20 -0000       1.6.2.17
@@ -607,6 +607,25 @@
   </fieldset>
 </form>
 
+<!-- TMPL_IF NAME="WaitingReserveLoop" -->     
+<fieldset id="circ_circulation_issue">
+    <legend class="problem">Waiting reserves</legend>
+       This borrower had a waiting reservation : 
+       <!-- TMPL_LOOP NAME="WaitingReserveLoop" -->
+       <p>
+               <ul> 
+                       <li> <!-- TMPL_VAR NAME="title"--> (<!-- TMPL_VAR 
NAME="itemtype"-->), author : <!-- TMPL_VAR NAME="author"-->, reserved the : 
<!-- TMPL_VAR NAME="reservedate"--> 
+                       <!-- TMPL_IF NAME="waitingat" -->
+                               document waiting at : <!-- TMPL_VAR 
NAME="waitingat" -->        
+                       <!-- /TMPL_IF -->
+                       </li>
+               </ul>
+       </p>
+    <!-- /TMPL_LOOP -->
+ </fieldset>
+ 
+<!-- /TMPL_IF -->
+
 <div id="tabs">
     <p><!-- TMPL_VAR NAME="firstname"--> <!-- TMPL_VAR NAME="surname"--> (<!-- 
TMPL_VAR NAME="cardnumber"-->) has</p>
     <!-- TMPL_IF NAME="countreserv"-->




reply via email to

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