From 8b951c2fc13b12017eeb5402afc55e0b7e0f0a04 Mon Sep 17 00:00:00 2001
From: Aleisha Amohia <aleishaamohia@hotmail.com>
Date: Tue, 5 Sep 2017 02:39:03 +0000
Subject: [PATCH] Bug 16486: [FOLLOW-UP] Adding timestamp to date in other
 places

As suggested in Comment 7.
The timestamp has also been added to printfeercpt.tt, printinvoice.tt,
and opac-account.tt

To test:
1) In Staff side, go to member account, go to Fines, go to Account tab
2) Click the Print button next to a payment
3) Confirm timestamp shows on print slip
4) Create a manual invoice
5) Go back to the Account tab
6) Click the Print button next to the invoice
7) Confirm timestamp shows on print slip
8) Log into OPAC
9) Go to your fines
10) Confirm timestamp shows

Ready to test
---
 koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt | 2 +-
 koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt | 3 ++-
 koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt        | 2 +-
 members/printfeercpt.pl                                         | 2 +-
 members/printinvoice.pl                                         | 2 +-
 5 files changed, 6 insertions(+), 5 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 a61d507..467700a 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt
@@ -43,7 +43,7 @@
 
   [% FOREACH account IN accounts %]
 <tr class="highlight">
-      <td>[% account.date | $KohaDates %]</td>
+      <td>[% account.timestamp | $KohaDates with_hours => 1 %]</td>
       <td>
         [% SWITCH account.accounttype %]
           [% CASE 'Pay' %]Payment, thanks
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt
index 7004214..d89e204 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt
@@ -1,4 +1,5 @@
 [% USE Koha %]
+[% USE KohaDates %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Print receipt for [% cardnumber %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
@@ -43,7 +44,7 @@
 
   [% FOREACH account IN accounts %]
 <tr class="highlight">
-      <td>[% account.date %]</td>
+      <td>[% account.timestamp | $KohaDates with_hours => 1 %]</td>
        <td>
         [% SWITCH account.accounttype %]
           [% CASE 'Pay' %]Payment, thanks
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt
index a868d0f..9bb769a 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt
@@ -102,7 +102,7 @@
                                                 [% END %]
                                             </td>
                                         [% END %]
-                                        <td>[% ACCOUNT_LINE.date | $KohaDates %]</td>
+                                        <td>[% ACCOUNT_LINE.timestamp | $KohaDates with_hours => 1 %]</td>
                                         <td>
                                             [% SWITCH ACCOUNT_LINE.accounttype %]
                                             [% CASE 'Pay' %]Payment, thanks
diff --git a/members/printfeercpt.pl b/members/printfeercpt.pl
index f5933f1..f4a6df7 100755
--- a/members/printfeercpt.pl
+++ b/members/printfeercpt.pl
@@ -97,7 +97,7 @@ for (my $i=0;$i<$numaccts;$i++){
         $accts->[$i]{'amountoutstandingcredit'} = 1;
     }
 
-    my %row = ( 'date'         => dt_from_string( $accts->[$i]{'date'} ),
+    my %row = ( 'timestamp' => $accts->[$i]{'timestamp'},
                 'amountcredit' => $accts->[$i]{'amountcredit'},
                 'amountoutstandingcredit' => $accts->[$i]{'amountoutstandingcredit'},
                 'toggle' => $accts->[$i]{'toggle'},
diff --git a/members/printinvoice.pl b/members/printinvoice.pl
index ff2c0d1..7f705d8 100755
--- a/members/printinvoice.pl
+++ b/members/printinvoice.pl
@@ -97,7 +97,7 @@ for ( my $i = 0 ; $i < $numaccts ; $i++ ) {
     }
 
     my %row = (
-        'date'                    => output_pref({ dt => dt_from_string( $accts->[$i]{'date'} ), dateonly => 1 }),
+        'timestamp'               => $accts->[$i]{'timestamp'},
         'amountcredit'            => $accts->[$i]{'amountcredit'},
         'amountoutstandingcredit' => $accts->[$i]{'amountoutstandingcredit'},
         'toggle'                  => $accts->[$i]{'toggle'},
-- 
2.1.4