From b783fa5b7bfd5cfcc8e06a71182cf661a8c08b76 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia 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 Works as intended. Signed-off-by: Simon Pouchol Signed-off-by: Marjorie Barry-Vila --- koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt | 2 +- members/printfeercpt.pl | 1 + members/printinvoice.pl | 2 +- 5 files changed, 5 insertions(+), 4 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 a6c5a3a..0954645 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt @@ -46,7 +46,7 @@ [% FOREACH account IN accounts %] - [% account.date | $KohaDates %] + [% account.timestamp | $KohaDates with_hours => 1 %] [% 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 151d945..39c4ccf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt @@ -46,7 +46,7 @@ [% FOREACH account IN accounts %] - [% account.date | $KohaDates%] + [% account.timestamp | $KohaDates with_hours => 1 %] [% 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 41985f0..fb8f6f0 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 %] [% END %] - [% ACCOUNT_LINE.date | $KohaDates %] + [% ACCOUNT_LINE.timestamp | $KohaDates with_hours => 1 %] [% SWITCH ACCOUNT_LINE.accounttype %] [% CASE 'Pay' %]Payment, thanks diff --git a/members/printfeercpt.pl b/members/printfeercpt.pl index c73f8f5..7eb68e1 100755 --- a/members/printfeercpt.pl +++ b/members/printfeercpt.pl @@ -96,6 +96,7 @@ my %row = ( 'accountno' => $accountline->{'accountno'}, accounttype => $accountline->{accounttype}, 'note' => $accountline->{'note'}, + 'timestamp' => $accountline->{'timestamp'}, ); diff --git a/members/printinvoice.pl b/members/printinvoice.pl index 5988325..f2fd0aa 100755 --- a/members/printinvoice.pl +++ b/members/printinvoice.pl @@ -68,7 +68,6 @@ if ( $total <= 0 ) { $totalcredit = 1; } - $accountline->{'amount'} += 0.00; if ( $accountline->{'amount'} <= 0 ) { $accountline->{'amountcredit'} = 1; @@ -80,6 +79,7 @@ if ( $accountline->{'amountoutstanding'} <= 0 ) { } my %row = ( + 'timestamp' => $accountline->{'timestamp'}, 'date' => dt_from_string( $accountline->{'date'} ), 'amountcredit' => $accountline->{'amountcredit'}, 'amountoutstandingcredit' => $accountline->{'amountoutstandingcredit'}, -- 2.1.4