From de8076157ef0bac30e01e8ea8b723ce439663221 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 9 Oct 2015 09:25:30 +0100 Subject: [PATCH] Bug 14926: Format the date according to the dateformat syspref Signed-off-by: Hector Castro Works as advertised. Tested with the three values from dateformat syspref Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- .../intranet-tmpl/prog/en/modules/members/printfeercpt.tt | 3 ++- members/printfeercpt.pl | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt index 13a02e8398..d99c1a9055 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt @@ -1,4 +1,5 @@ [% USE Koha %] +[% USE KohaDates %] [% INCLUDE 'doc-head-open.inc' %] Print Receipt for [% cardnumber %] @@ -42,7 +43,7 @@ [% FOREACH account IN accounts %] - [% account.date %] + [% account.date | $KohaDates %] [% SWITCH account.accounttype %] [% CASE 'Pay' %]Payment, thanks diff --git a/members/printfeercpt.pl b/members/printfeercpt.pl index 6d4d75a62d..26d40575d7 100755 --- a/members/printfeercpt.pl +++ b/members/printfeercpt.pl @@ -89,7 +89,8 @@ for (my $i=0;$i<$numaccts;$i++){ if($accts->[$i]{'amountoutstanding'} <= 0){ $accts->[$i]{'amountoutstandingcredit'} = 1; } - my %row = ( 'date' => output_pref({ dt => dt_from_string( $accts->[$i]{'date'} ), dateformat => 'iso', dateonly => 1 }), + + my %row = ( 'date' => dt_from_string( $accts->[$i]{'date'} ), 'amountcredit' => $accts->[$i]{'amountcredit'}, 'amountoutstandingcredit' => $accts->[$i]{'amountoutstandingcredit'}, 'toggle' => $accts->[$i]{'toggle'}, -- 2.39.5