Partial fix for Bug 5745, Overdues with fines report not showing titles

- Adding title, subtitle, and author to output
- Reworking display of shelving location selection

Patch does not address the contents of 'overdue status' and 'notified by'

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 50c0ae09a1)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
This commit is contained in:
Owen Leonard 2011-02-11 22:22:16 -05:00 committed by Chris Nighswonger
parent 44038d38fd
commit 49f8964bb2
3 changed files with 17 additions and 21 deletions

View File

@ -1176,12 +1176,14 @@ sub GetOverduesForBranch {
borrowers.phone,
borrowers.email,
biblio.title,
biblio.author,
biblio.biblionumber,
issues.date_due,
issues.returndate,
issues.branchcode,
branches.branchname,
items.barcode,
items.homebranch,
items.itemcallnumber,
items.location,
items.itemnumber,

View File

@ -27,6 +27,7 @@ use C4::Overdues; # AddNotifyLine
use C4::Biblio;
use C4::Koha;
use C4::Debug;
use C4::Branch;
=head1 branchoverdues.pl
@ -103,21 +104,27 @@ my ($tag,$subfield) = GetMarcFromKohaField('items.location','');
my $tagslib = &GetMarcStructure(1,'');
if ($tagslib->{$tag}->{$subfield}->{authorised_value}) {
my $values= GetAuthorisedValues($tagslib->{$tag}->{$subfield}->{authorised_value});
for (@$values) { $_->{selected} = 1 if $location eq $_->{authorised_value} }
$template->param(locationsloop => $values);
}
# now display infos
foreach my $num (@getoverdues) {
my %overdueforbranch;
my $record = GetMarcBiblio($num->{biblionumber});
if ($record){
$overdueforbranch{'subtitle'} = GetRecordValue('subtitle',$record,'')->[0]->{subfield};
}
$overdueforbranch{'date_due'} = format_date( $num->{'date_due'} );
$overdueforbranch{'title'} = $num->{'title'};
$overdueforbranch{'description'} = $num->{'description'};
$overdueforbranch{'barcode'} = $num->{'barcode'};
$overdueforbranch{'biblionumber'} = $num->{'biblionumber'};
$overdueforbranch{'author'} = $num->{'author'};
$overdueforbranch{'borrowersurname'} = $num->{'surname'};
$overdueforbranch{'borrowerfirstname'} = $num->{'firstname'};
$overdueforbranch{'borrowerphone'} = $num->{'phone'};
$overdueforbranch{'borroweremail'} = $num->{'email'};
$overdueforbranch{'homebranch'} = GetBranchName($num->{'homebranch'});
$overdueforbranch{'itemcallnumber'} = $num->{'itemcallnumber'};
$overdueforbranch{'borrowernumber'} = $num->{'borrowernumber'};
$overdueforbranch{'itemnumber'} = $num->{'itemnumber'};

View File

@ -17,29 +17,16 @@
<h1>Circulation: Overdues at <!-- TMPL_VAR NAME="LoginBranchname" --></h1>
<!-- selector of location -->
<!-- TMPL_IF NAME="location" -->
<h4>Location selected</h4>
<form name="changelocation" action="branchoverdues.pl">
<ul>
<li>
You are working actually on the overdues for the location : <b><!-- TMPL_VAR NAME="location" --></b>
<input type="submit" name="changelocation" class="submit" value="change location" />
</li>
</ul>
</form>
<!-- TMPL_ELSE -->
<form name="selectlocation" action="branchoverdues.pl" method="post">
<label for="location">Select a location: </label><select id="location" name="location">
<option value="">All locations</option>
<label for="location">Shelving location selected: </label><select id="location" name="location">
<option value="">All shelving locations</option>
<!-- TMPL_LOOP NAME="locationsloop" -->
<option value="<!-- TMPL_VAR NAME="authorised_value" -->"><!-- TMPL_VAR NAME="lib" --></option>
<!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="authorised_value" -->" selected="selected"><!-- TMPL_VAR NAME="lib" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR NAME="authorised_value" -->"><!-- TMPL_VAR NAME="lib" --></option><!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
<input type="submit" name="location" class="submit" value="OK" />
</form>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="overduesloop" -->
<table style="width:100%;">
<tr>
@ -56,12 +43,12 @@
<!-- TMPL_VAR NAME="date_due" -->
</td>
<td>
<!-- TMPL_INCLUDE NAME="biblio-default-view.inc" -->
&nbsp; (<b><!-- TMPL_VAR NAME="description" --></b>)
<!-- TMPL_INCLUDE NAME="biblio-default-view.inc" --><!-- TMPL_VAR NAME="title" escape="html" --> <!-- TMPL_IF NAME="subtitle" --><!-- TMPL_VAR NAME="subtitle" --><!-- /TMPL_IF --></a> <!-- TMPL_IF NAME="author" --> by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF -->
<br />Barcode : <!-- TMPL_VAR NAME="barcode" -->
</td>
<td>
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!--TMPL_VAR Name="borrowernumber"-->"><!-- TMPL_VAR NAME="borrowersurname" --> &nbsp; <!-- TMPL_VAR NAME="borrowerfirstname" --></a><br /><!-- TMPL_VAR NAME="borrowerphone" --><br />
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!--TMPL_VAR Name="borrowernumber"-->"><!-- TMPL_VAR NAME="borrowersurname" -->, <!-- TMPL_VAR NAME="borrowerfirstname" --></a><br /><!-- TMPL_VAR NAME="borrowerphone" --><br />
<!-- TMPL_IF NAME="borroweremail" --><a href="mailto:<!-- TMPL_VAR NAME="borroweremail" -->?subject=Overdue: <!-- TMPL_VAR NAME="title" ESCAPE="html" -->">
<!-- TMPL_VAR NAME="borroweremail" --></a><!--/TMPL_IF-->
</td>
@ -109,7 +96,7 @@
<!-- /TMPL_LOOP -->
</table>
<!-- TMPL_ELSE -->
<div class="dialog message">There are no overdues for today.</div>
<div class="dialog message">There are no overdues for today<!-- TMPL_IF NAME="location" --> at the selected location<!-- /TMPL_IF -->.</div>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="todayoverduesloop" -->
<div id="branch_odues_today_odues">