palewire / django-calaccess-campaign-browser

A Django app to refine, review and republish campaign finance data drawn from the California Secretary of State’s CAL-ACCESS database
http://django-calaccess-campaign-browser.californiacivicdata.org
MIT License
17 stars 12 forks source link

Figure how to handle "forgiven loan" contributions from Form 497 filings in managers and calculations #118

Open palewire opened 10 years ago

palewire commented 10 years ago

The source of this issue can be found in the tran_type field of the RcptCd model in the raw database. There, a "transcation type" is recorded that can be one of three values (that we know of).

They are:

While we do not typically roll up line-item contributions to calculate overall totals, there are many cases where we extract the line-item data for graphics, searches and other apps. In those cases, the forgiven and returned contributions need to be properly distinguished so that they are treated as negative values.

The first step in accomplishing that is properly coding then in our "clean" Contribution model in this application, followed by a cascading series of changes on all of our underlying views and templates where line-item contributions are display or exported.