[Bug 15906] New: Remove use of makepayment in paycollect
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 Bug ID: 15906 Summary: Remove use of makepayment in paycollect Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |15905 Assignee|gmcharlt@gmail.com |kyle@bywatersolutions.com Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15905 [Bug 15905] Remove use of makepayment -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Remove use of makepayment |Remove use of makepayment |in paycollect |in paycollect.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 48347 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48347&action=edit Bug 15906 - Remove use of makepayment in paycollect.pl Test plan: 1) Apply this patch 2) Make a payment in full using the "Pay" button 3) Note payment succeeds -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |15896 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15896 [Bug 15896] Use Koha::Account::pay internally for makepayment -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48347|0 |1 is obsolete| | --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 52135 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52135&action=edit Bug 15906 - Remove use of makepayment in paycollect.pl Test plan: 1) Apply this patch 2) Make a payment in full using the "Pay" button 3) Note payment succeeds -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #52135|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 52148 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52148&action=edit Bug 15906 - Remove use of makepayment in paycollect.pl Test plan: 1) Apply this patch 2) Make a payment in full using the "Pay" button 3) Note payment succeeds -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 Michael Kuhn <mik@adminkuhn.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mik@adminkuhn.ch --- Comment #4 from Michael Kuhn <mik@adminkuhn.ch> --- In a user account some reasons for payments were created. Then a click on "Make payment" shows these individual fines & charges. One ist selected, then the button "Pay" is clicked. The payment does not work. Instead the following message appears: Software error: Can't locate object method "new" via package "Koha::Account" at /home/koha/src/members/paycollect.pl line 114. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #52148|0 |1 is obsolete| | --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 54172 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54172&action=edit [SIGNED-OFF] Bug 15906 - Remove use of makepayment in paycollect.pl Test plan: 1) Apply this patch 2) Make a payment in full using the "Pay" button 3) Note payment succeeds Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 --- Comment #6 from Michael Kuhn <mik@adminkuhn.ch> --- In a user account some reasons for payments were created. In the leftside-tab "Details" I click on "Make payment" and the individual fines & charges are shown. One is selected, then the button "Pay" on the right is clicked. Now the system asks for confirmation but still the following error message does appear and nothing is paid: Software error: Can't locate object method "new" via package "Koha::Account" at /home/sandbox1/src/members/paycollect.pl line 114. The buttons "Pay amount" and "Pay selected" at the bottom work all right, though. But not the "Pay" button. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Michael Kuhn from comment #6)
In a user account some reasons for payments were created. In the leftside-tab "Details" I click on "Make payment" and the individual fines & charges are shown. One is selected, then the button "Pay" on the right is clicked. Now the system asks for confirmation but still the following error message does appear and nothing is paid:
Software error: Can't locate object method "new" via package "Koha::Account" at /home/sandbox1/src/members/paycollect.pl line 114.
The buttons "Pay amount" and "Pay selected" at the bottom work all right, though. But not the "Pay" button.
Cannot reproduce this error with the Pay button. Note various warnings like this in the log: [Fri Oct 28 08:34:25 2016] paycollect.pl: Argument "\\x{33}\\x{30}..." isn't numeric in sprintf at /usr/lib/perl5/Template/Filters.pm line 467 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- When paying partial amounts via Pay and via Pay amount, the amount is positive via Pay and negative via Pay amount: +-------------+-----------+-------------------+---------------+---------------------+ | accounttype | amount | amountoutstanding | lastincrement | timestamp | +-------------+-----------+-------------------+---------------+---------------------+ | F | 30.000000 | 14.000000 | NULL | 2016-10-28 08:38:42 | | Pay | 10.000000 | 0.000000 | NULL | 2016-10-28 08:34:25 | | Pay | -1.000000 | 0.000000 | NULL | 2016-10-28 08:37:04 | | Pay | 2.000000 | 0.000000 | NULL | 2016-10-28 08:38:15 | | Pay | -3.000000 | 0.000000 | NULL | 2016-10-28 08:38:42 | +-------------+-----------+-------------------+---------------+---------------------+ Does not look good to me. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 Michael Kuhn <mik@adminkuhn.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #9 from Michael Kuhn <mik@adminkuhn.ch> --- I succesfully applied patches 15896 and 15906. In a user account some reasons for payments were created. In the leftside-tab "Details" I click on "Make payment" and the individual fines & charges are shown. One is selected, then the button "Pay" on the right is clicked. Now the system asks for confirmation and the amount is paid. (So I can't reproduce the message "Software error: ..." from 2016-07-30 anymore and evyerything looks alright). I made another paymont via button "Pay amount" and this works also as I expect it. I then created a fee of 7, table "accountlines" looks as follows. mysql> select accounttype, amount, amountoutstanding, lastincrement, timestamp from accountlines; +-------------+------------+-------------------+---------------+---------------------+ | accounttype | amount | amountoutstanding | lastincrement | timestamp | +-------------+------------+-------------------+---------------+---------------------+ | N | 7.000000 | 7.000000 | NULL | 2016-10-29 12:33:03 | +-------------+------------+-------------------+---------------+---------------------+ Out of 7 I pay only 4. Now table "accountlines" looks as follows - the original line (N) changes in fields "amountoutstanding" and "timestamp" and another line (Pay) is added. This looks as I expect ist. +-------------+------------+-------------------+---------------+---------------------+ | accounttype | amount | amountoutstanding | lastincrement | timestamp | +-------------+------------+-------------------+---------------+---------------------+ | N | 7.000000 | 3.000000 | NULL | 2016-10-29 12:33:42 | | Pay | 4.000000 | 0.000000 | NULL | 2016-10-29 12:33:42 | +-------------+------------+-------------------+---------------+---------------------+ However, as already reported by M. de Rooy the logfile shows a lot of warnings like the following for every Pay action: [Sat Oct 29 12:33:43.008191 2016] [cgi:error] [pid 3382] [client 10.0.2.2:44132] AH01215: [Sat Oct 29 12:33:43 2016] paycollect.pl: Argument "7.00&descr..." isn't numeric in sprintf at /usr/lib/x86_64-linux-gnu/perl5/5.20/Template/Filters.pm line 467., referer: http://localhost:8081/cgi-bin/koha/members/paycollect.pl?borrowernumber=52&pay_individual=1&accounttype=N&amount=7.00&amountoutstanding=7.00%26description%3DN%26title%3D¬ify_id=1¬ify_level=0&accountlines_id=13&remote_user= -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Create manual invoice: 20 Pay button: 1 Pay amount button: 2 Results in the following records in accountlines (still a negative amount with Pay amount): | 1513 | NULL | 1 | 1 | NULL | 2016-11-04 | 20.000000 | F | NULL | F | 17.000000 | NULL | 2016-11-04 09:14:33 | 1 | 0 | test411 | 1 | | 1514 | NULL | 1 | 2 | NULL | 2016-11-04 | 1.000000 | | NULL | Pay | 0.000000 | NULL | 2016-11-04 09:13:45 | 0 | 0 | | 1 | | 1515 | NULL | 1 | 2 | NULL | 2016-11-04 | -2.000000 | | NULL | Pay | 0.000000 | NULL | 2016-11-04 09:14:33 | 0 | 0 | | 1 | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- OK Looking further: I must conclude that the actual error that I discover is in makepartialpayment, not included in this change. Adding a follow-up. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | Version|unspecified |master Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=15896 Depends on|15896 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15896 [Bug 15896] Use Koha::Account::pay internally for makepayment -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 57168 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57168&action=edit Bug 15906 - Remove use of makepayment in paycollect.pl Test plan: 1) Apply this patch 2) Make a payment in full using the "Pay" button 3) Note payment succeeds Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 57169 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57169&action=edit Bug 15906: [QA Follow-up] Correct a partial payment The amount in accountlines should be saved as a negative amount, but amount outstanding is correct. Note: This routine is actually used only once (in paycollect.pl). And is only cosmetically tested in Accounts.t. Test plan: [1] Create a manual invoice, Fine, say 20. [2] Click on the Pay button next to this fine, and pay 1. [3] Pay again, using 'Pay amount' button, and pay 2. [4] Pay again, using 'Pay' on the same line, the full remaining amount. [5] Verify that you see -1, -2 and -17 on the Accounts tab. [6] Run t/db_dependent/Accounts.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54172|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- QA: Still working here -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Remove use of makepayment |[ONLY PUSH TOGETHER WITH |in paycollect.pl |15896] Remove use of | |makepayment in | |paycollect.pl Status|Signed Off |Passed QA --- Comment #15 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- The simple test scenario works. But if we add another fine, the situation changes little bit: If I have fine1==20 and fine2==30, and I do individual payment on the second fine, the first fine will be paid first. Not really a big problem, but it is not what you expect. This is not caused by this patch set, but should be solved by bug 15896. So I am labeling this patch with "push together". Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=15898 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |15896 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15896 [Bug 15896] Use Koha::Account::pay internally for makepayment -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #16 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 17.05, thanks Marcel! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Status|Pushed to Master |RESOLVED Resolution|--- |FIXED --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This won't get backported to 16.11.x as it is an enhancement. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15906 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[ONLY PUSH TOGETHER WITH |Remove use of makepayment |15896] Remove use of |in paycollect.pl |makepayment in | |paycollect.pl | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org