Bug 14672

Summary: Payment is not able to done, when the patron has credit balance
Product: Koha Reporter: Deepak KV <deepakkv10>
Component: Fines and feesAssignee: Joonas Kylmälä <joonas.kylmala>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: abl, aleisha, cgdavis, gmcharlt, jonathan.field, joonas.kylmala, kyle.m.hall, martin.renvoize, mirko, sally.healey
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Error message
Bug 14672 - Payment is not able to done, when the patron has credit balance
Bug 14672 - Payment is not able to done, when the patron has credit balance
Bug 14672 - Payment is not able to done, when the patron has credit balance

Description Deepak KV 2015-08-11 13:05:08 UTC
Created attachment 41446 [details]
Error message

I am not able to pay the patron fine from their credit amount.

First I selected the fine from the 'Pay fine' tab(fine amount = 5, Credit amount = -600 , Total due = -595)

then I clicked 'Pay selected' (It shows :  Total amount outstanding = 5 and Collect from patron = 5)

When I clicked 'Confirm' It shows an error 'You must pay a value less than or equal to -595.00'
Comment 1 Katrin Fischer 2015-08-11 21:38:46 UTC
A workaround for paying single lines of fines is using the 'pay' button - but this needs to be fixed to pay multiple selected fines.
Comment 2 Joonas Kylmälä 2015-08-18 15:14:12 UTC Comment hidden (obsolete)
Comment 3 Joonas Kylmälä 2015-08-18 15:23:44 UTC
You can try the above patch I just made, it works like that that you have first few invoice and credit entries in the patron's account you're testing, and then after that go and pay all the fines/invoices at once, and it should work. I think that the result of it wasn't consistent all the time, but it might have been... I will look into testing this tomorrow and hope that some of you will also! :)

Is the implementation way I used good? I think we need to implement the same kind of code also in recordpayment_selectaccts, makepartialpayment, makepayment, etc.
Comment 4 Joonas Kylmälä 2015-08-19 05:52:00 UTC Comment hidden (obsolete)
Comment 5 Aleisha Amohia 2016-01-26 01:32:06 UTC
Is this ready for testing?
Comment 6 Mirko Tietgen 2016-02-10 10:57:29 UTC
Switching to needs signoff. Please undo if it's not ready to be tested.
Comment 7 Aleisha Amohia 2016-02-10 19:18:45 UTC
I don't think this works - says Total amount outstanding is now 0.00 in the Pay Fines tab even though there is a credit amount when I try to pay back the credit amount. Then says You must pay a value less than or equal to 0.00 with any amount I try to put in.

Also there is a merge conflict in C4/Members.pm
Comment 8 Marc Véron 2016-02-10 19:44:01 UTC
Created attachment 47877 [details] [review]
Bug 14672 - Payment is not able to done, when the patron has credit balance

Enables paying with credit, at least when using C4::Accounts::recordpayment
function.

Sponsored-by Vaara-kirjastot

Amended to make patch apply.
Comment 9 Katrin Fischer 2019-03-07 22:24:41 UTC
I think this issue might have been fixed as part of the Accounts work. Adding Martin to confirm.
Comment 10 Martin Renvoize (ashimema) 2019-03-08 09:03:56 UTC
Correct, I believe this is resolved as part of the accounts work.  I'll dig out which bug and mark it as a duplicate
Comment 11 Martin Renvoize (ashimema) 2019-03-08 09:05:32 UTC

*** This bug has been marked as a duplicate of bug 18805 ***