Bug 19551 - Cash register report has bad erroneous results from wrong order of operations
Summary: Cash register report has bad erroneous results from wrong order of operations
Status: Pushed to Master
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Marcel de Rooy
URL:
Whiteboard:
Keywords:
Depends on: 6934
Blocks:
  Show dependency treegraph
 
Reported: 2017-10-31 13:17 UTC by Nick Clemens
Modified: 2017-12-07 14:24 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 19551 - Fix wrong order of operations iun cash register report (1.31 KB, patch)
2017-10-31 13:20 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19551 - Fix wrong order of operations in cash register report (1.36 KB, patch)
2017-11-01 03:06 UTC, M. Tompsett
Details | Diff | Splinter Review
Bug 19551 - Fix wrong order of operations in cash register report (1.45 KB, patch)
2017-11-27 12:12 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2017-10-31 13:17:16 UTC
in reports/cash_register_stats.pl
$whereTType = q{ AND accounttype = 'FOR' OR accounttype = 'W' };
needs parens to combine the OR, better yet:
$whereTType = q{ AND accounttype IN ('FOR','W') };
Comment 1 Nick Clemens 2017-10-31 13:20:17 UTC
Created attachment 68857 [details] [review]
Bug 19551 - Fix wrong order of operations iun cash register report

To test:
1 - Find or create a fine for a patron
2 - Write it off
3 - Run the cash register report for current date, see your write off
4 - Run the cash register report for previous dates, still see your
write off
5 - Apply patch
6 - Run cash register for current date, writee off shows (good)
7 - Run cash register report for previous dates, write off does not show
(good)
8 - Sign off
Comment 2 M. Tompsett 2017-11-01 03:06:15 UTC
Created attachment 68876 [details] [review]
Bug 19551 - Fix wrong order of operations in cash register report

To test:
1 - Find or create a fine for a patron
2 - Write it off
3 - Home -> Reports -> Cash register
4 - Fill in current date and transaction type 'Write off'
5 - Click Submit
-- see your write off
6 - Fill in previous dates and transaction type 'Write off'
7 - Click Submit
-- see your write off (bad)
8 - Apply patch
9 - Rerun steps 3-7
-- write only visible for current date.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 3 Marcel de Rooy 2017-11-27 12:12:11 UTC
Created attachment 69371 [details] [review]
Bug 19551 - Fix wrong order of operations in cash register report

To test:
1 - Find or create a fine for a patron
2 - Write it off
3 - Home -> Reports -> Cash register
4 - Fill in current date and transaction type 'Write off'
5 - Click Submit
-- see your write off
6 - Fill in previous dates and transaction type 'Write off'
7 - Click Submit
-- see your write off (bad)
8 - Apply patch
9 - Rerun steps 3-7
-- write only visible for current date.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Jonathan Druart 2017-12-07 14:24:58 UTC
Pushed to master for 18.05, thanks to everybody involved!