Bug 30551 - Cash register report shows wrong library when paying fees in two different libraries
Summary: Cash register report shows wrong library when paying fees in two different li...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Shi Yao Wang
QA Contact: Testopia
URL:
Keywords:
: 30197 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-04-14 21:37 UTC by Shi Yao Wang
Modified: 2022-07-14 00:48 UTC (History)
5 users (show)

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


Attachments
Bug 30551: Make cash register report take branchcode from cash register (2.02 KB, patch)
2022-04-15 16:49 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 30551: Make cash register report take branchcode from cash register (2.07 KB, patch)
2022-05-02 01:09 UTC, David Nind
Details | Diff | Splinter Review
Bug 30551: Make cash register report take branchcode from cash register (2.12 KB, patch)
2022-05-06 08:48 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 Shi Yao Wang 2022-04-14 21:37:56 UTC
Cash register report shows wrong transaction library when paying fees in different libraries using the same account.

Test plan to reproduce the bug:
1- Use cash registers (administration > system preferences > UseCashRegisters)
2- Create another library if you only have one (administration > libraries > new library)
3- Create a cash register in each library if they don't already have one (administration > cash registers > new cash register)
4- Create a fee on your own account and pay it right after in both libraries.
5- Go to reports > cash register and generate the statistics.
6- Notice "transaction library" in both rows are the same even though the fees were paid in two different libraries and two different cash registers.
Comment 1 Shi Yao Wang 2022-04-15 16:49:51 UTC
Created attachment 133362 [details] [review]
Bug 30551: Make cash register report take branchcode from cash register

This patch makes it so cash register reports puts branchcode from the
cash register where the payment was made into "Transaction library"
column instead of taking the branchcode of the manager.

Test plan:
1- Use cash registers (administration > system preferences > UseCashRegisters)
2- Create another library if you only have one (administration > libraries > new library)
3- Create a cash register in each library if they don't already have one (administration > cash registers > new cash register)
4- Create a fee on your own account and pay it right after in both libraries.
5- Go to reports > cash register and generate the statistics.
6- Notice "transaction library" in both rows are the same even though the fees were paid in two different libraries and two different cash registers.
7- Apply the patch and click submit to re-generate statistics
8- Notice it now shows the correct library where the transactions were done
Comment 2 David Nind 2022-05-02 01:09:42 UTC
Created attachment 134448 [details] [review]
Bug 30551: Make cash register report take branchcode from cash register

This patch makes it so cash register reports puts branchcode from the
cash register where the payment was made into "Transaction library"
column instead of taking the branchcode of the manager.

Test plan:
1- Use cash registers (administration > system preferences > UseCashRegisters)
2- Create another library if you only have one (administration > libraries > new library)
3- Create a cash register in each library if they don't already have one (administration > cash registers > new cash register)
4- Create a fee on your own account and pay it right after in both libraries.
5- Go to reports > cash register and generate the statistics.
6- Notice "transaction library" in both rows are the same even though the fees were paid in two different libraries and two different cash registers.
7- Apply the patch and click submit to re-generate statistics
8- Notice it now shows the correct library where the transactions were done

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Katrin Fischer 2022-05-06 08:39:10 UTC
Looking here...
Comment 4 Katrin Fischer 2022-05-06 08:48:00 UTC
Created attachment 134710 [details] [review]
Bug 30551: Make cash register report take branchcode from cash register

This patch makes it so cash register reports puts branchcode from the
cash register where the payment was made into "Transaction library"
column instead of taking the branchcode of the manager.

Test plan:
1- Use cash registers (administration > system preferences > UseCashRegisters)
2- Create another library if you only have one (administration > libraries > new library)
3- Create a cash register in each library if they don't already have one (administration > cash registers > new cash register)
4- Create a fee on your own account and pay it right after in both libraries.
5- Go to reports > cash register and generate the statistics.
6- Notice "transaction library" in both rows are the same even though the fees were paid in two different libraries and two different cash registers.
7- Apply the patch and click submit to re-generate statistics
8- Notice it now shows the correct library where the transactions were done

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

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 5 Katrin Fischer 2022-05-06 08:48:41 UTC
This is actually a very nasty bug as libraries use these tools to report to their accounting departments. I have updated the severity.
Comment 6 Fridolin Somers 2022-05-06 20:34:35 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 7 Katrin Fischer 2022-06-25 16:41:23 UTC
Can this please be backported? 

The bug goes back until 20.11, I have backported and tested the patch there locally.
Comment 8 Katrin Fischer 2022-06-25 16:42:28 UTC
*** Bug 30197 has been marked as a duplicate of this bug. ***
Comment 9 Victor Grousset/tuxayo 2022-07-14 00:30:44 UTC
Note: was backported to 21.11
Comment 10 Victor Grousset/tuxayo 2022-07-14 00:48:00 UTC
Backported: Pushed to 21.05.x branch for 21.05.17
Nothing to document, marking resolved.