Bug 22873

Summary: C4::SIP::ILS::Transation::FeePayment->pay $disallow_overpayment does nothing
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: SIP2Assignee: Kyle M Hall <kyle>
Status: Pushed to oldstable --- QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: andrewfh, colin.campbell, fridolin.somers, katrin.fischer, kyle
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.05,22.11.11
Bug Depends on: 16899    
Bug Blocks:    
Attachments: Bug 22873: Add comment to explain what disallow_overpayment is for
Bug 22873: Add comment to explain what disallow_overpayment is for

Description Martin Renvoize 2019-05-09 10:05:13 UTC
The `disallow_overpayment` parameter that's expected to be passed to the pay method of FeePayment does nothing.. it should either be removed or implimented.
Comment 1 Katrin Fischer 2019-05-11 23:23:51 UTC
I am not sure that this does nothing, there is some code in FeePayment.pm that checks for it:

if ($disallow_overpayment) {
    return 0 if $account->balance < $amt;
}
Comment 2 Andrew Fuerste-Henry 2020-07-08 19:28:01 UTC
I'm looking at a couple patrons on a 19.11 install where payments were double-submitted. The first payment set the amountoutstanding on the fine to 0. The second payment posted to their account and tied to the fine via account_offsets, but with $0 applied. So the payment wasn't refused, but Koha knew enough not to make the fine have a negative amount due.
Comment 3 Kyle M Hall 2020-07-09 13:35:02 UTC
It is used in a SIP option. Take a look at etc/SIPconfig.xml in master.
Comment 4 Katrin Fischer 2023-09-23 16:51:40 UTC
(In reply to Kyle M Hall from comment #3)
> It is used in a SIP option. Take a look at etc/SIPconfig.xml in master.

So should this be closed?
Comment 5 Kyle M Hall 2023-09-25 13:59:22 UTC
(In reply to Katrin Fischer from comment #4)
> (In reply to Kyle M Hall from comment #3)
> > It is used in a SIP option. Take a look at etc/SIPconfig.xml in master.
> 
> So should this be closed?

Let's add a comment so future devs will know what it is there.
Comment 6 Kyle M Hall 2023-09-25 14:11:26 UTC
Created attachment 156168 [details] [review]
Bug 22873: Add comment to explain what disallow_overpayment is for
Comment 7 Kyle M Hall 2023-09-25 14:17:54 UTC
Created attachment 156169 [details] [review]
Bug 22873: Add comment to explain what disallow_overpayment is for

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Tomás Cohen Arazi 2023-10-04 13:33:22 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 9 Fridolin Somers 2023-10-05 20:22:23 UTC
Pushed to 23.05.x for 23.05.05
Comment 10 Matt Blenkinsop 2023-10-17 17:24:21 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x