[Bug 41385] New: Exception and error thrown from add_credit method is wrong
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41385 Bug ID: 41385 Summary: Exception and error thrown from add_credit method is wrong Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Fines and fees Assignee: koha-bugs@lists.koha-community.org Reporter: emmi.takkinen@koha-suomi.fi QA Contact: testopia@bugs.koha-community.org If credit amount passed to the Koha::Account->add_credit is not negative, Koha throws exception called Koha::Exceptions::Account::AmountNotPositive with error message "Debit amount passed is not positive". This is same error thrown with method add_debit. We should at least change error message as e.g. "Credit amount passed is not negative" and probably create a new exception called Koha::Exceptions::Account::AmountNotNegative to avoid confusion. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41385 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41385 --- Comment #1 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- On same note, sub add_credit in Koha::REST::V1::Patrons::Account checks id amount passed is positive:
unless ( $amount > 0 )
Shouldn't this too check if amount is negative? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org