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'
A workaround for paying single lines of fines is using the 'pay' button - but this needs to be fixed to pay multiple selected fines.
Created attachment 41612 [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. The code is still buggy and needs more work. Sponsored-by Vaara-kirjastot
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.
Created attachment 41647 [details] [review] Bug 14672 - Payment is not able to done, when the patron has credit balance This is fixed version of the yesterday's patch, the credit was calculated wrongly and now it's fixed.
Is this ready for testing?
Switching to needs signoff. Please undo if it's not ready to be tested.
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
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.
I think this issue might have been fixed as part of the Accounts work. Adding Martin to confirm.
Correct, I believe this is resolved as part of the accounts work. I'll dig out which bug and mark it as a duplicate
*** This bug has been marked as a duplicate of bug 18805 ***