Bug 24637 - Pay selected & Pay amount does not log branchcode in 19.05
Summary: Pay selected & Pay amount does not log branchcode in 19.05
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: 19.05
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-11 22:37 UTC by Lucas Gass
Modified: 2020-02-20 15:46 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
19.05.08


Attachments
Bug 24637: Add brancode in all pay circumstances (1.71 KB, patch)
2020-02-11 22:59 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 24637: Add brancode in all pay circumstances (1.77 KB, patch)
2020-02-19 21:08 UTC, Benjamin Daeuber
Details | Diff | Splinter Review
Bug 24637: Add brancode in all pay circumstances (1.83 KB, patch)
2020-02-19 21:49 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass 2020-02-11 22:37:44 UTC
When paying a fine (in 19.05.x) and lower branchcode is not properly logged. 

I believe this is fixed in 19.11.x by bz23321

To Recreate:
1. Have some fines. Pay them using the Pay Amount or Pay Selected buttons.
2. SELECT branchcode FROM accountlines where borrowernumber = '{borrowernumber}';
3. See that branchcode is NULL
Comment 1 Lucas Gass 2020-02-11 22:59:06 UTC
Created attachment 98734 [details] [review]
Bug 24637: Add brancode in all pay circumstances

To TEST:
1. Have some fines. Pay them using the Pay Amount or Pay Selected buttons.
2. SELECT branchcode FROM accountlines where borrowernumber = '{borrowernumber}';
3. See that branchcode is NULL
4. Apply patch and restart_all
5. Make a partial payment using both the Pay select and Pay amount buttons.
6. SELECT branchcode FROM accountlines where borrowernumber = '{borrowernumber}';
7. Now you should see the branchcodes in the table and no NULL values.
Comment 2 Kelly McElligott 2020-02-12 10:56:42 UTC
Lucas, I am getting this error:
Could not compile /kohadevbox/koha/members/paycollect.pl: Global symbol "@acc" requires explicit package name (did you forget to declare "my @acc"?) at /kohadevbox/koha/members/paycollect.pl line 214.
Global symbol "$select" requires explicit package name (did you forget to declare "my $select"?) at /kohadevbox/koha/members/paycollect.pl line 214.
Global symbol "$note" requires explicit package name (did you forget to declare "my $note"?) at /kohadevbox/koha/members/paycollect.pl line 215.
Global symbol "@lines" requires explicit package name (did you forget to declare "my @lines"?) at /kohadevbox/koha/members/paycollect.pl line 217.
Global symbol "$branch" requires explicit package name (did you forget to declare "my $branch"?) at /kohadevbox/koha/members/paycollect.pl line 234.
Global symbol "@lines" requires explicit package name (did you forget to declare "my @lines"?) at /kohadevbox/koha/members/paycollect.pl line 235.
Global symbol "$note" requires explicit package name (did you forget to declare "my $note"?) at /kohadevbox/koha/members/paycollect.pl line 236.
syntax error at /kohadevbox/koha/members/paycollect.pl line 241, near ">>"
Global symbol "$branch" requires explicit package name (did you forget to declare "my $branch"?) at /kohadevbox/koha/members/paycollect.pl line 251.
syntax error at /kohadevbox/koha/members/paycollect.pl line 271, near "if"
/kohadevbox/koha/members/paycollect.pl has too many errors.
 at /usr/share/perl5/CGI/Compile.pm line 132
Comment 3 Lucas Gass 2020-02-12 15:01:16 UTC
Kelly,

I think this is because this patch is intended for 19.05.x, and maybe you're attempting to apply it to master?
Comment 4 Benjamin Daeuber 2020-02-19 21:08:59 UTC
Created attachment 99279 [details] [review]
Bug 24637: Add brancode in all pay circumstances

Signed-off-by: Benjamin Daeuber <bdaeuber@fargolibrary.org>
Comment 5 Martin Renvoize 2020-02-19 21:49:40 UTC
Created attachment 99285 [details] [review]
Bug 24637: Add brancode in all pay circumstances

To TEST:
1. Have some fines. Pay them using the Pay Amount or Pay Selected buttons.
2. SELECT branchcode FROM accountlines where borrowernumber = '{borrowernumber}';
3. See that branchcode is NULL
4. Apply patch and restart_all
5. Make a partial payment using both the Pay select and Pay amount buttons.
6. SELECT branchcode FROM accountlines where borrowernumber = '{borrowernumber}';
7. Now you should see the branchcodes in the table and no NULL values.

Signed-off-by: Benjamin Daeuber <bdaeuber@fargolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2020-02-19 21:50:08 UTC
Works as expected.. Passing QA
Comment 7 Lucas Gass 2020-02-20 15:46:48 UTC
backported to 19.05.x for 19.05.08