-
-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Count refunds when calculating amount due for an invoice #16506
Conversation
(Standard links)
|
Nice catch! |
Change makes sense - @magnolia61 can you test? |
yes I can do so tomorrow morning. Thanks for the continuing work on getting everything around payment create, partial payments, etcetera, work as planned and coded solid and sound :-) I was just thinking (should I open a gitlab issue for this?) that "the amount due" would be a very very welcome contribution token. Currently 'the amount due' is only available in the event context (event balance token). |
@magnolia61 you can open a gitlab - I don't see it happening in a hurry but maybe down the track |
@mattwire doesn't all this code replicate
|
8d32cc2
to
449b5e6
Compare
@eileenmcnaughton Well spotted - I've updated the PR and confirmed we can use those functions and remove a few more lines :-) |
Looks good to me - @magnolia61 if you can confirm this passes your testing we will merge |
I am testing now Of course first I had to also patch with #16480 |
@magnolia61 Your invoice seems to be missing the "Less amount paid + Amount due" section. I created an invoice by Viewing Contribution -> Print Invoice. Do you have that in your |
Thanks @magnolia61 for testing. Merging. @eileenmcnaughton may be worth looking at why pay_later is interfering with display of amount due/paid? |
yes - sigh |
I am working on the contribution invoice template. (see: #16569) So far I only did cosmetic / layout improvements but while I am at it I can take a look at the templates logic where it comes to te pay_later setting. I will report back here. |
Overview
Refunds are not being counted. So if you do something like this:
Contribution amount = £9.30.
You end up with an invoice that shows "Amount Due: £-10.00".
Before
If contribution payments include a refund, incorrect amount shown for "Amount Due":
After
If contribution payments include a refund, correct amount shown for "Amount Due":
Technical Details
Explained in overview - we need to count both "Completed" and "Refunded" as actual payments when doing the calculation.
Comments
@eileenmcnaughton @monishdeb