Needs review
Project:
Simple Payments
Version:
6.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Jul 2010 at 01:27 UTC
Updated:
27 May 2011 at 15:46 UTC
Jump to comment: Most recent file
Comments
Comment #1
adamdicarlo commentedHere's the patch.
Comment #2
jbrown commentedNice!
Can we have a patch that works with the current db schema?
It would be cool to have default views that add tabs to node and user pages.
Comment #3
seanberto commentedYo, anything I can do to help this along? I'm about to roll out views integration for Simple Donations but my integrations are contingent on this patch. JBrown, it looks like you're about to approve JHedstrom's per email schema changes. We close here?
Thanks - and again, let me know what you all need on this.
-s
Comment #4
seanberto commentedIt looks like the Views integration does not account for the fact that Amount is stored as an integer that has been multiplied by 100 (ie, $1 is stored as 100 cents in the DB), as a result, the View's handler is off in this patch. You can obviously theme this issue away - but that doesn't work with certain display types, such as Views Bonus Export, which provides an excel dump of the data.
So, either the patch needs to be rerolled, or better yet, we should consider storing amount as a float...
Comment #5
adamdicarlo commentedI've rerolled this patch to work with the latest version of http://drupal.org/node/839952 (which changes payer_email to payer_reference, and adds payee_refererence).
I have not yet accounted for amounts being stored as cents in the database.
@seanberto, yes, I think the module should be refactored to store amounts as DECIMAL or NUMERIC fields. We'd need an upgrade script to convert the old values. Would you be up to doing that refactoring?
Comment #6
seanberto commented@Adam, did you see the patch that I wrote to convert the amount to a decimal - #960616: Store amount as a decimal?
I've tested my decimal patch against your previous views integration patch and it "works" - though decimal places are not fixed. $1.50 displays as $1.5, etc.
Comment #7
seanberto commentedOh, and my patch does update values in the DB. It will likely break any one-off views display customizations that have been written for other projects that try to correct for the current storage in SP. For example, not sure if this will break some displays for Donor Rally...
Comment #8
adamdicarlo commented@Sean, great, hadn't seen that.
@jbrown, some feedback?
Comment #9
jbrown commentedCan I get a re-roll?
Also, it should go in simple_payments.views.inc - http://drupalcontrib.org/api/function/hook_views_data/6
Comment #10
seanberto commentedAdam, do you want to take the first crack at this or me?
Comment #11
adamdicarlo commentedSean, if you want to get to it before Thursday, go ahead... or I'll tackle it then.
Comment #12
adamdicarlo commentedHere's a new patch rolled off the current version from git. This puts the hook_views_data() function simple_payments.views.inc.
Comment #13
adamdicarlo commentedLet's try that again....
Comment #14
jhedstromChanging status.
Comment #15
adamdicarlo commented@jbrown, have you had a chance to try out the latest patch?
Comment #16
adamdicarlo commentedHmmm... might be time to get this module marked unmaintained/abandoned.
Comment #17
seanberto commentedAgreed. I'd love to see this module get cleaned up!