Bug 26469 - Register_id saves incorrect value in accountlines
Summary: Register_id saves incorrect value in accountlines
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Martin Renvoize (ashimema)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 24786
  Show dependency treegraph
 
Reported: 2020-09-15 18:29 UTC by Andrew Fuerste-Henry
Modified: 2022-12-12 21:25 UTC (History)
5 users (show)

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


Attachments
Bug 26269: Fix variable name mismatch for cash_register in paycollect (5.09 KB, patch)
2020-09-16 10:06 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26269: Fix variable name mismatch for cash_register in paycollect (5.11 KB, patch)
2020-09-16 11:39 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 26269: Fix variable name mismatch for cash_register in paycollect (5.17 KB, patch)
2020-09-16 12:06 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 26269: Fix variable name mismatch for cash_register in paycollect (5.22 KB, patch)
2020-09-16 19:50 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 Andrew Fuerste-Henry 2020-09-15 18:29:36 UTC
To recreate:
- turn on cash registers in sysprefs
- define at least 2 cash registers in Admin
- create a manual invoice on a patron
- pay off half of your fee, selecting the first register
- pay off the remaining fee, selecting the second register
- query accountlines.register_id for your two payments
- see that they both show the first register

confirmed in master and 19.11.
Comment 1 Andrew Fuerste-Henry 2020-09-15 18:34:35 UTC
Verified that the register is recorded incorrectly regardless of which pay button one uses (Pay, Pay Selected, or Pay Amount)
Comment 2 Eric Swenson 2020-09-15 21:29:55 UTC
I can also confirm that paying a total line from a different register, other than ID=1, did not log that in the table.
Comment 3 Eric Swenson 2020-09-15 21:32:01 UTC
We are very new to community koha (just migrated this past weekend) and this is one of those features that excites us the most since we see the potential to make reporting "End of Day" totals a breeze. We currently have 2 primary locations that take payments that stay separate from each other and it would very helpful to group those locations using these register_id rather than our previous method of searching for all the possible manager_ids that might be taking payments at that location.
Comment 4 Katrin Fischer 2020-09-15 22:08:54 UTC
Hi Eric, thx for adding more details to this bug report and welcome to the Koha community!
Comment 5 Martin Renvoize (ashimema) 2020-09-16 07:48:15 UTC
Welcome to the Commmunity Eric.

I developed the cash management handling in Koha and we're still refining it with the key stakeholders here so watch this space for further enhancements which may be of interest to you.

Thanks for reporting the bug Andrew; I'm on the case now.. if feels like a regression since the original push as I'm confident we tested this functionality back then :(.
Comment 6 Martin Renvoize (ashimema) 2020-09-16 10:06:03 UTC
Created attachment 110160 [details] [review]
Bug 26269: Fix variable name mismatch for cash_register in paycollect

It appears that through various rebases the variable names in the form
and the controller script have become mismatched.  This patch corrects
the situation and clarifies their intended use.

Test plan:
1/ Turn on cash registers in sysprefs
2/ Define at least 2 cash registers in Admin
3/ Create a manual invoice on a patron
4/ Pay off half of your fee, selecting the first register
5/ Pay off the remaining fee, selecting the second register
6/ Query accountlines.register_id for your two payments
8/ Confirm the two accountlines.register_id's do not match (thus the
passed variable was used)
Comment 7 Martin Renvoize (ashimema) 2020-09-16 10:29:34 UTC
Also rebased bug 24786 atop this.. might be a nice enhancement to test once this one is done.
Comment 8 Andrew Fuerste-Henry 2020-09-16 11:39:07 UTC
Created attachment 110173 [details] [review]
Bug 26269: Fix variable name mismatch for cash_register in paycollect

It appears that through various rebases the variable names in the form
and the controller script have become mismatched.  This patch corrects
the situation and clarifies their intended use.

Test plan:
1/ Turn on cash registers in sysprefs
2/ Define at least 2 cash registers in Admin
3/ Create a manual invoice on a patron
4/ Pay off half of your fee, selecting the first register
5/ Pay off the remaining fee, selecting the second register
6/ Query accountlines.register_id for your two payments
8/ Confirm the two accountlines.register_id's do not match (thus the
passed variable was used)
Comment 9 ByWater Sandboxes 2020-09-16 12:06:22 UTC
Created attachment 110182 [details] [review]
Bug 26269: Fix variable name mismatch for cash_register in paycollect

It appears that through various rebases the variable names in the form
and the controller script have become mismatched.  This patch corrects
the situation and clarifies their intended use.

Test plan:
1/ Turn on cash registers in sysprefs
2/ Define at least 2 cash registers in Admin
3/ Create a manual invoice on a patron
4/ Pay off half of your fee, selecting the first register
5/ Pay off the remaining fee, selecting the second register
6/ Query accountlines.register_id for your two payments
8/ Confirm the two accountlines.register_id's do not match (thus the
passed variable was used)

https://bugs.koha-community.org/show_bug.cgi?id=26469

Signed-off-by: Jessie Zairo <jzairo@bywatersolutions.com>
Comment 10 Katrin Fischer 2020-09-16 19:50:17 UTC
Created attachment 110230 [details] [review]
Bug 26269: Fix variable name mismatch for cash_register in paycollect

It appears that through various rebases the variable names in the form
and the controller script have become mismatched.  This patch corrects
the situation and clarifies their intended use.

Test plan:
1/ Turn on cash registers in sysprefs
2/ Define at least 2 cash registers in Admin
3/ Create a manual invoice on a patron
4/ Pay off half of your fee, selecting the first register
5/ Pay off the remaining fee, selecting the second register
6/ Query accountlines.register_id for your two payments
8/ Confirm the two accountlines.register_id's do not match (thus the
passed variable was used)

https://bugs.koha-community.org/show_bug.cgi?id=26469

Signed-off-by: Jessie Zairo <jzairo@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Jonathan Druart 2020-09-18 09:55:44 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 12 Jonathan Druart 2020-09-18 09:56:02 UTC
Wrong bug number in commit message, caught too late.
Comment 13 Katrin Fischer 2020-09-18 10:34:03 UTC
That will require manual editing of the release notes!(In reply to Jonathan Druart from comment #12)
> Wrong bug number in commit message, caught too late.

Note to RMaints: this will require manual editing of the release notes so this fix shows up and not the wrong one!