Bug 7402 : Fixing the date formatting so links to the invoice page work
authorChris Cormack <chrisc@catalyst.net.nz>
Wed, 4 Jan 2012 19:54:43 +0000 (08:54 +1300)
committerPaul Poulain <paul.poulain@biblibre.com>
Mon, 23 Jan 2012 16:52:19 +0000 (17:52 +0100)
This depends on bug 929

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Uses the new TT plugin to display the date, while using iso format
to build a correct URL to the invoice page.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
C4/Acquisition.pm
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt

index bae7c07..0a96a02 100644 (file)
@@ -1678,8 +1678,6 @@ sub GetHistory {
         $line->{count} = $cnt++;
         $line->{toggle} = 1 if $cnt % 2;
         push @order_loop, $line;
-        $line->{creationdate} = format_date( $line->{creationdate} );
-        $line->{datereceived} = format_date( $line->{datereceived} );
         $total_qty         += $line->{'quantity'};
         $total_qtyreceived += $line->{'quantityreceived'};
         $total_price       += $line->{'quantity'} * $line->{'ecost'};
index 9321cf9..3385fb3 100644 (file)
@@ -1,3 +1,4 @@
+[% USE KohaDates %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( suggestions_loop ) %]Orders search &rsaquo; Search Results[% ELSE %]Order search[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
@@ -86,8 +87,8 @@
                                        <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% suggestions_loo.biblionumber %]">[% suggestions_loo.title |html %]</a>
                         <br />[% suggestions_loo.author %] <br /> [% suggestions_loo.isbn %]</td>
                                        <td><a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% suggestions_loo.id %]">[% suggestions_loo.name %]</a></td>
-                                       <td>[% suggestions_loo.creationdate %]</td>
-                                       <td>[% suggestions_loo.datereceived %]</td>
+                                       <td>[% suggestions_loo.creationdate | $KohaDates %]</td>
+                                       <td>[% suggestions_loo.datereceived | $KohaDates %]</td>
                                        <td>[% suggestions_loo.quantity %]</td>
                                        <td>[% suggestions_loo.ecost %]</td>
                                </tr>