Conversation
…istory One invoice can pay several unrelated donations at once (a gift package with a gift and a fund, one bank transfer for both). The history showed one row per invoice with its full total under the label of only one of them, so a birthday gift and a fund donation paid together looked like a single larger birthday gift. Each invoice is now split into its donations, each with its own amount. The fund part of a sponsorship stays with its sponsorship. Gift rows show the translated gift type instead of the gift name, which carried the sponsor and child references.
Contributor
|
This comment has been minimized.
This comment has been minimized.
…r rows - A gift given to several children is listed once per child, as each child got their own amount. - Row amounts are rounded to the currency precision instead of being truncated to whole units, so the rows of an invoice add up to its total. Cents are only shown when there are some. - Rows for products outside the sponsorship, gift and fund categories show the product name instead of an empty description.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
T2705 — Payments get mixed together in the MyCompassion donation history
Summary
Sponsors who paid several donations together saw them merged into one line in their donation history. Example from the ticket: 50.- for Maria's birthday and 50.- for the Christmas fund showed as "100.- for Maria's birthday", which confused the sponsor.
Root cause
The history (
my_compassion.my2_donations_history_content, fed by_get_paid_invoices_subsetinmy_compassion/controllers/my2_donations.py) rendered one row per paid invoice:invoice.amount_totalinvoice.invoice_category, which picks a single category per invoice with the priority sponsorship > gift > fund (sponsorship_compassion/models/account_move.py,_compute_invoice_category)So an invoice with a gift line and a fund line was labelled as the gift only, but with the combined total. A sponsorship invoice that also carried a gift showed only "(Sponsorship)".
Separate payments on the same day were never the problem (each one has its own invoice, so its own row). The problem is one invoice paying several donations:
Before / after (real invoices on
stage18_neutralized)How to test
/my2/donationsand look at the donations history.