From 8a81ce1155500a683704f4b5b63e26d20abfdfb7 Mon Sep 17 00:00:00 2001 From: Reed Wade <reed@catalyst.net.nz> Date: Tue, 5 Apr 2011 11:59:22 +1200 Subject: [PATCH] bug 5841 Catalyst WR77407 showing pub and recd dates on routing slips Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> --- C4/Serials.pm | 3 ++- .../en/modules/serials/routing-preview-slip.tmpl | 3 ++- .../prog/en/modules/serials/routing.tmpl | 5 ++++- .../en/modules/serials/serials-collection.tmpl | 2 +- serials/routing.pl | 1 + 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index 32c9bcb..8135663 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -754,7 +754,7 @@ sub GetLatestSerials { my $dbh = C4::Context->dbh; # status = 2 is "arrived" - my $strsth = "SELECT serialid,serialseq, status, planneddate, notes + my $strsth = "SELECT serialid,serialseq, status, planneddate, notes, publisheddate FROM serial WHERE subscriptionid = ? AND (status =2 or status=4) @@ -766,6 +766,7 @@ sub GetLatestSerials { while ( my $line = $sth->fetchrow_hashref ) { $line->{ "status" . $line->{status} } = 1; # fills a "statusX" value, used for template status select list $line->{"planneddate"} = format_date( $line->{"planneddate"} ); + $line->{"publisheddate"} = format_date( $line->{"publisheddate"} ); push @serials, $line; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview-slip.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview-slip.tmpl index 3180337..345c4dd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview-slip.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview-slip.tmpl @@ -26,7 +26,8 @@ <td> </td></tr> <!-- /TMPL_LOOP --> </table> -<p><b>Notes:</b> Please return this item promptly as others are waiting for it. +<p><b>Notes:</b> Please return this item promptly +<br />as others are waiting for it. <br /><!-- TMPL_VAR NAME="routingnotes" --></p> <div id="slip-block-links" class="noprint"> <a class="button" href="javascript:window.print();self.close()">Print</a> <a class="button" href="javascript:self.close()">Close</a> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tmpl index 4e9dd11..238d575 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tmpl @@ -43,7 +43,10 @@ function search_member(subscriptionid){ <li><label for="date_selected">Issue: </label> <select name="date_selected" id="date_selected"> <!-- TMPL_LOOP NAME="dates" --> -<!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="serialseq" --> (<!-- TMPL_VAR NAME="planneddate" -->)" selected="selected"><!-- TMPL_VAR NAME="serialseq" --> (<!-- TMPL_VAR NAME="planneddate" -->)</option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR NAME="serialseq" --> (<!-- TMPL_VAR NAME="planneddate" -->)"><!-- TMPL_VAR NAME="serialseq" --> (<!-- TMPL_VAR NAME="planneddate" -->)</option><!-- /TMPL_IF --> +<!-- TMPL_IF NAME="selected" --> +<option value="<!-- TMPL_VAR NAME="serialseq" --> (<!-- TMPL_VAR Name="publisheddate" ESCAPE="HTML" -->) (Rec'd: <!-- TMPL_VAR NAME="planneddate" -->)" selected="selected"><!-- TMPL_VAR NAME="serialseq" --> (<!-- TMPL_VAR Name="publisheddate" ESCAPE="HTML" -->) (Rec'd: <!-- TMPL_VAR Name="planneddate" ESCAPE="HTML" -->)</option> +<!-- TMPL_ELSE --><option value="<!-- TMPL_VAR NAME="serialseq" --> (<!-- TMPL_VAR NAME="planneddate" -->)"><!-- TMPL_VAR NAME="serialseq" --> (<!-- TMPL_VAR Name="publisheddate" ESCAPE="HTML" -->) (Rec'd: <!-- TMPL_VAR Name="planneddate" ESCAPE="HTML" -->)</option> +<!-- /TMPL_IF --> <!-- /TMPL_LOOP --> </select> <!-- TMPL_VAR NAME="issue" --></li> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tmpl index b5c9d84..a5e00d0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tmpl @@ -226,7 +226,7 @@ $(document).ready(function() { <!-- TMPL_VAR Name="branchcode" --> </td> <td> - <a href="" onclick="print_slip(<!-- TMPL_VAR NAME="subscriptionid" ESCAPE="HTML" -->, '<!-- TMPL_VAR NAME="serialseq" ESCAPE="HTML" -->'); return false" >Print list</a> + <a href="" onclick="print_slip(<!-- TMPL_VAR NAME="subscriptionid" ESCAPE="HTML" -->, '<!-- TMPL_VAR NAME="serialseq" ESCAPE="HTML" --> (<!-- TMPL_VAR Name="publisheddate" ESCAPE="HTML" -->) (Rec\'d: <!-- TMPL_VAR Name="planneddate" ESCAPE="HTML" -->)'); return false" >Print list</a> </td> <td> <!--TMPL_IF Name="cannotedit"--> diff --git a/serials/routing.pl b/serials/routing.pl index 2bd7d69..9792a96 100755 --- a/serials/routing.pl +++ b/serials/routing.pl @@ -74,6 +74,7 @@ my $serialdates = GetLatestSerials($subscriptionid,$count); my $dates = []; foreach my $dateseq (@{$serialdates}) { my $d = {}; + $d->{publisheddate} = $dateseq->{publisheddate}; $d->{planneddate} = $dateseq->{planneddate}; $d->{serialseq} = $dateseq->{serialseq}; $d->{serialid} = $dateseq->{serialid}; -- 1.7.1