Adding replacement price to issues loop and a totalprice variable which totals the...
authoroleonard <oleonard>
Fri, 29 Oct 2004 14:41:32 +0000 (14:41 +0000)
committeroleonard <oleonard>
Fri, 29 Oct 2004 14:41:32 +0000 (14:41 +0000)
koha-tmpl/intranet-tmpl/npl/en/members/moremember.tmpl
members/moremember.pl

index 021621b..b05f812 100644 (file)
                <th>Due</th>
                <th>Itemtype</th>
 <!--           <th>Charge</th> -->
+               <th>Price</th>
                <th>Renew</th>
                <th>Return</th>
        </tr>
                <td><!-- TMPL_VAR NAME="date_due" --></td>
                <td><!-- TMPL_VAR NAME="itemtype" --></td>
                <!-- <td><!-- TMPL_VAR NAME="charge" --></td> -->
+               <td><!-- TMPL_VAR NAME="replacementprice" --></td>
                <td>
                <!-- TMPL_IF name="norenew" -->
                        <a href="/cgi-bin/koha/request.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->">Reserved</a>
                <td><a href="/cgi-bin/koha/circ/returns.pl?barcode=<!-- TMPL_VAR NAME="barcode" -->">Return</a></td>
        </tr>
        <!-- /tmpl_loop -->
+       <tfoot><tr><td colspan="3">Total Replacement Cost:</td><td><!-- TMPL_VAR NAME="totalprice" --></td><td colspan="2">&nbsp;</td></tr></tfoot>
        </table></div><p><input type="submit" class="submit" value="Renew Checked Items" /></p>
 </form>
 
index 02491bf..6c997bf 100755 (executable)
@@ -127,10 +127,13 @@ my ($numaccts,$accts,$total)=getboracctrecord('',\%bor);
 my ($count,$issue)=borrissues($bornum);
 my $today=ParseDate('today');
 my @issuedata;
+my $totalprice = 0;
 for (my $i=0;$i<$count;$i++){
        my $datedue=ParseDate($issue->[$i]{'date_due'});
        $issue->[$i]{'date_due'} = format_date($issue->[$i]{'date_due'});
        my %row = %{$issue->[$i]};
+       $totalprice += $issue->[$i]{'replacementprice'};
+       $row{'replacementprice'}=$issue->[$i]{'replacementprice'};
        if ($datedue < $today){
                $row{'red'}=1; #print "<font color=red>";
        }
@@ -176,6 +179,7 @@ foreach my $reserveline (@$reserves) {
 $template->param($data);
 $template->param(
                 bornum          => $bornum,
+                totalprice =>$totalprice,
                 totaldue =>$total,
                 issueloop       => \@issuedata,
                 reserveloop     => \@reservedata);