Bug 25139 - POS explodes in error when trying to display older transactions
Summary: POS explodes in error when trying to display older transactions
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: Main
Hardware: All All
: P5 - low critical
Assignee: Martin Renvoize (ashimema)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 13985
  Show dependency treegraph
 
Reported: 2020-04-13 21:09 UTC by Katrin Fischer
Modified: 2020-11-30 21:48 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00
Circulation function:


Attachments
Bug 25139: Corrections to date picker handling (3.23 KB, patch)
2020-04-14 09:19 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 25139: Corrections to date picker handling (3.28 KB, patch)
2020-04-14 11:29 UTC, David Nind
Details | Diff | Splinter Review
Bug 25139: Corrections to date picker handling (3.34 KB, patch)
2020-04-14 21:29 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2020-04-13 21:09:17 UTC
When trying to display older transactions in the POS module, there is an error:

Template process failed: undef error - The given date (12.04.2020) does not match the date format (iso) at /home/vagrant/kohaclone/Koha/DateUtils.pm line 168.
 at /home/vagrant/kohaclone/C4/Templates.pm line 122

URL: http://localhost:8081/cgi-bin/koha/pos/register.pl?trange_f=07.04.2020&trange_t=12.04.2020&registerid=1

It looks like the dateformat is not handled correctly here.

Dateformat is set to DD.MM.YYYY
Comment 1 Martin Renvoize (ashimema) 2020-04-14 09:19:48 UTC
Created attachment 102913 [details] [review]
Bug 25139: Corrections to date picker handling

It would appear one has to format the dates in the controller rather
than in the template for input fields.. I wasn't aware of this caveat
until now.

Test plan
1/ Prior to applying patch attempt to look at previous transactions
ensuring you enter a 'to' date.
2/ Note a catastrophic failure
3/ Apply patch
4/ Look at the same date range and note you no longer get a failure but
are instead faced with the requested transactions.
5/ Signoff
Comment 2 David Nind 2020-04-14 11:29:47 UTC
Created attachment 102924 [details] [review]
Bug 25139: Corrections to date picker handling

It would appear one has to format the dates in the controller rather
than in the template for input fields. I wasn't aware of this caveat
until now.

Test plan
0/ Enable cash register and POS system, add a register, items and
some transactions.
1/ Prior to applying patch attempt to look at previous transactions
ensuring you enter a 'to' date.
2/ Note a catastrophic failure
3/ Apply patch
4/ Look at the same date range and note you no longer get a failure but
are instead faced with the requested transactions.
5/ Signoff

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Katrin Fischer 2020-04-14 21:29:13 UTC
Created attachment 102949 [details] [review]
Bug 25139: Corrections to date picker handling

It would appear one has to format the dates in the controller rather
than in the template for input fields.. I wasn't aware of this caveat
until now.

Test plan
1/ Prior to applying patch attempt to look at previous transactions
ensuring you enter a 'to' date.
2/ Note a catastrophic failure
3/ Apply patch
4/ Look at the same date range and note you no longer get a failure but
are instead faced with the requested transactions.
5/ Signoff

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Martin Renvoize (ashimema) 2020-04-15 07:36:01 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 5 Joy Nelson 2020-05-05 22:28:20 UTC
does not apply to 19.11.x - not backported