From 79d3bba876744ba875deb3d590cb26bd254d79d6 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Wed, 17 Jan 2018 08:32:56 +0000 Subject: [PATCH] Bug 16486: Adding timestamp column to cash register statistics To test: 1) Go to Reports -> Cash Register 2) Fill in some fields and submit the report 3) Confirm the timestamp (updated) column is correct 4) Confirm there are no warns Signed-off-by: Marjorie Barry-Vila --- .../intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt | 4 +++- reports/cash_register_stats.pl | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt index f3db10b..7807cbc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt @@ -178,7 +178,8 @@ Patron card number Patron name Transaction branch - Transaction date + Transaction original date + Transaction updated Transaction type Notes Amount @@ -194,6 +195,7 @@ [% loopresul.bfirstname %] [% loopresul.bsurname %] [% loopresul.branchname %] [% loopresul.date | $KohaDates %] + [% loopresul.timestamp | $KohaDates with_hours => 1 %] [% IF loopresul.accounttype == "ACT" %] All payments to the library diff --git a/reports/cash_register_stats.pl b/reports/cash_register_stats.pl index 0a1ff54..6a93ace 100755 --- a/reports/cash_register_stats.pl +++ b/reports/cash_register_stats.pl @@ -61,9 +61,9 @@ my $manualinv_types = $sth_manualinv->fetchall_arrayref({}); if ($do_it) { - $fromDate = output_pref({ dt => eval { dt_from_string($input->param("from")) } || dt_from_string, + $fromDate = output_pref({ dt => eval { dt_from_string(scalar $input->param("from")) } || dt_from_string, dateformat => 'sql', dateonly => 1 }); #for sql query - $toDate = output_pref({ dt => eval { dt_from_string($input->param("to")) } || dt_from_string, + $toDate = output_pref({ dt => eval { dt_from_string(scalar $input->param("to")) } || dt_from_string, dateformat => 'sql', dateonly => 1 }); #for sql query my $whereTType = q{}; @@ -93,7 +93,7 @@ if ($do_it) { SELECT round(amount,2) AS amount, description, bo.surname AS bsurname, bo.firstname AS bfirstname, m.surname AS msurname, m.firstname AS mfirstname, bo.cardnumber, br.branchname, bo.borrowernumber, - al.borrowernumber, DATE(al.date) as date, al.accounttype, al.amountoutstanding, al.note, + al.borrowernumber, DATE(al.date) as date, al.timestamp, al.accounttype, al.amountoutstanding, al.note, bi.title, bi.biblionumber, i.barcode, i.itype FROM accountlines al LEFT JOIN borrowers bo ON (al.borrowernumber = bo.borrowernumber) -- 2.1.4