Bug 27636: (QA follow-up) Fix tests and validate
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 28 Apr 2021 09:21:14 +0000 (10:21 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 30 Apr 2021 15:07:31 +0000 (17:07 +0200)
commit7c88df82893521d9fad106f39c9c39db9cfd68c7
treea2e2ec6f9120bb12d40a738cb9a0b485dbbeb001
parent80c13cfb31efd9aea67508c1203f1fe0bff9c8c0
Bug 27636: (QA follow-up) Fix tests and validate

This patch fixes the tests for when a negative amount is passed to the
pay method.  Prior to now, a negative amount would have been passed
through and recorded. This was inconsistent with all other accounts
methods and has been deprecated to ensure consistent amounts handling.

This patch also introduces basic validation to prevent negatives being
entered into the UI.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Account.pm
koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt
t/db_dependent/Accounts.t
t/db_dependent/Koha/Account.t