Bug 16899: Add ability to disallow overpayments
authorKyle M Hall <kyle@bywatersolutions.com>
Mon, 11 Jul 2016 15:36:54 +0000 (15:36 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 27 Oct 2017 17:10:29 +0000 (14:10 -0300)
commit22249e4ceda925792a62c203b16bac3c4e35a1af
tree32cb821818d515ac7aaea576f8f2fa4276437a2a
parent377c9f15896e2ee4515f8b31a6424d5ec9d89f17
Bug 16899: Add ability to disallow overpayments

Some SIP services ( such as Comprise ) require that an attempt at
over-paying a patron's account via SIP2 should fail, rather than create
a credit on the account. We should make this a configurable option on a
per-login basis in the SIP2 config file.

Test Plan:
1) Apply this patch
2) Enable the new parameter
   disallow_overpayment="1"
   for the login to be used in this test.
3) Restart your SIP server
4) Create or find a patron with fines
5) Attempt to send a payment via SIP for more than what the
   patron's balance is
6) Note the response indicates a payment failure
7) Attempt to send a payment via SIP for the account balance or
   less
8) Note the response indicates the payment has succeeded
9) Verify in Koha that the payment was processed

Signed-off-by: Rhonda Kuiper <kuiper@roundrocktexas.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/SIP/ILS.pm
C4/SIP/ILS/Transaction/FeePayment.pm
C4/SIP/Sip/MsgType.pm
etc/SIPconfig.xml