Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
If someone wants to sum the total amounts of payments in an aggregated view, there is no way to do this as the payment amount is stored on a line item plugin which gets serialized in the database.
Proposed resolution
Add a total_amount
field to the payment entity which is updated on entity save.
Remaining tasks
Add new field in update hookAdd post update to save existing paymentsAdd views data
User interface changes
None
API changes
New field on payment entity
Data model changes
New field on payment entity
Comment | File | Size | Author |
---|---|---|---|
#3 | cannot_sum_payment-2838038-3.patch | 4.08 KB | yanniboi |
#2 | cannot_sum_payment-2838038-2.patch | 4.08 KB | yanniboi |
Comments
Comment #2
yanniboi CreditAttribution: yanniboi at FreelyGive commentedComment #3
yanniboi CreditAttribution: yanniboi at FreelyGive commentedUpdated total field to be decimal type for better precision in reporting.