Bug 30551: Make cash register report take branchcode from cash register
authorShi Yao Wang <shiyao@inlibro.com>
Fri, 15 Apr 2022 16:37:34 +0000 (12:37 -0400)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Thu, 14 Jul 2022 19:40:22 +0000 (21:40 +0200)
commitf617680867f2e6776563a01e7ecdd92033bbe504
treeafcb5f8ad7c0d5a088ce6e4b4fcb6478f5a98778
parenta8cbd7147c99f8da03c3d0ef83bec5a175801d1d
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>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 43299fe5cc1c8110112a76ba88e9ab03aaeda43c)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit bb8602c19045c40c283fdff07fae5ee4edcfc5bf)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
reports/cash_register_stats.pl