Adding replacement price to issues loop and a totalprice variable which totals the cost of all items on issue
This commit is contained in:
parent
1d73b5a010
commit
8b3dfc9870
|
|
@ -113,6 +113,7 @@
|
|||
<th>Due</th>
|
||||
<th>Itemtype</th>
|
||||
<!-- <th>Charge</th> -->
|
||||
<th>Price</th>
|
||||
<th>Renew</th>
|
||||
<th>Return</th>
|
||||
</tr>
|
||||
|
|
@ -128,6 +129,7 @@
|
|||
<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>
|
||||
|
|
@ -138,6 +140,7 @@
|
|||
<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"> </td></tr></tfoot>
|
||||
</table></div><p><input type="submit" class="submit" value="Renew Checked Items" /></p>
|
||||
</form>
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue