Bug 12001: (QA follow-up) Fix printinvoice page
authorJosef Moravec <josef.moravec@gmail.com>
Mon, 19 Feb 2018 20:49:02 +0000 (20:49 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 23 Feb 2018 13:57:30 +0000 (10:57 -0300)
Test plan:
Try to print a fee
--> without patch it explodes
--> with patch it works and the date is formatted according to
system wide date format setting

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt
members/printinvoice.pl

index 62fb69d..151d945 100644 (file)
@@ -1,5 +1,6 @@
 [% USE Koha %]
 [% USE Branches %]
+[% USE KohaDates %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Print receipt for [% patron.cardnumber %]</title>
@@ -45,7 +46,7 @@
 
   [% FOREACH account IN accounts %]
 <tr class="highlight">
-      <td>[% account.date %]</td>
+      <td>[% account.date | $KohaDates%]</td>
        <td>
         [% SWITCH account.accounttype %]
           [% CASE 'Pay' %]Payment, thanks
index a75b0a6..5988325 100755 (executable)
@@ -80,7 +80,7 @@ if ( $accountline->{'amountoutstanding'} <= 0 ) {
 }
 
 my %row = (
-    'date'                    => dt_from_string( $accountline->{'date'}, dateonly => 1 ),
+    'date'                    => dt_from_string( $accountline->{'date'} ),
     'amountcredit'            => $accountline->{'amountcredit'},
     'amountoutstandingcredit' => $accountline->{'amountoutstandingcredit'},
     'description'             => $accountline->{'description'},