CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Cannot edit contributions that come in online
Pages: [1]

Author Topic: Cannot edit contributions that come in online  (Read 1428 times)

Joshua Slocum

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: 3.3.3
  • CMS version: Joomla 1.5.23
  • MySQL version: 5.0.67
  • PHP version: 5.2.6
Cannot edit contributions that come in online
October 31, 2011, 11:15:59 am
Hi all,

First, I am not a programmer, so please pardon my ignorance if I ask very naive questions. We're using Civicrm 3.3.3.

We have a number of online contribution pages. When a donor gives via credit card, obviously it creates a record that shows that particular contribution page as the origination of the donation. But we also do a lot of manual, back-end entry of offline donations such as checks. For these, we use different contribution types and different "sources" --- the text-entry field into which you can type whatever you want.

Problem: We cannot edit completed contributions (those made online by the donor, not by our staff in the back-end), and it's messing up our accounting of our different fundraising campaigns.

Example:
Online contributions made by the donor come through the "Friends of FCA" campaign page. The source designated for that page is "Online contribution: Friends of FCA." But,  we recently did our first telephone pledge drive and we wish to track the resulting donations *separately*. That's fine when we enter checks manually in the back-end ---- we can simply type "Fall Telethon" in the source field. But donors who jump right onto our website to donate after we call them are all being categorized under our ordinary, everyday "Online contribution: Friends of FCA." The back-end will not let us change this, and it will not let us edit the "source" field. All of that is grayed out and inaccessible.

We really need to be able to manually re-assign these, and it seems like this would be common task that almost any organization would want the capability for. Any advice on how to accomplish this would be very greatly appreciated.

Thank you!

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Cannot edit contributions that come in online
October 31, 2011, 11:33:44 am
Hey there,

Have you thought about creating different contribution pages and directing people to those contribution pages as part of the donation sign up when you do you 'telephone pledge drive'?

Or how about creating some custom data which is attached to the contribution record and exposed on the contribution page which allows/requires the user to say how they arrived at the page ('word of mouth', 'telephone pledge drive', 'other' etc.)

I suppose making it compulsory might mean less donations, but having a single easy to choose select list might not be so onerous and do the job.

Did I understand what you were trying to do correctly? Is that helpful? Let me know if not.

Michael
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Joshua Slocum

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: 3.3.3
  • CMS version: Joomla 1.5.23
  • MySQL version: 5.0.67
  • PHP version: 5.2.6
Re: Cannot edit contributions that come in online
October 31, 2011, 12:37:56 pm
Hi Michael,

Thanks for that. Unfortunately it won't help retroactively, and we really do need the ability to manually edit these things. In addition, I like to keep our online contribution pages as simple and few as possible. From experience, I know that as they proliferate so do problems and user confusion/error (a lot of our donors are computer users, but not very skilled with them). Being able to clean up and relabel data is really an important ability for staff to have.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Cannot edit contributions that come in online
October 31, 2011, 03:07:41 pm

I suspect for now you might be able to remove some or all of the restrictions by implementing the hook_civicrm_buildForm

but you do need php skills to implement the above

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

pkeogan

  • I post frequently
  • ***
  • Posts: 130
  • Karma: 4
    • BackOffice Thinking
Re: Cannot edit contributions that come in online
November 15, 2011, 08:59:56 pm
On a completed contribution you can not edit the source field, but you can edit other fields.  If you add a custom data field to the contribution you can add the additional data there and you'll be able to have both pieces of information.  Hopefully I understood your question.

Marty

  • I post occasionally
  • **
  • Posts: 67
  • Karma: 14
    • Boulder County Arts Alliance
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.37
  • PHP version: 5.4.27
Re: Cannot edit contributions that come in online
November 18, 2011, 09:37:29 am
We have a similar situation in that we periodically need to change the contribution type for online contributions.  We have a number of different contribution forms for different contribution types, and sometimes users submit contributions using the wrong form.  When this happens, our back office staff needs to edit the contribution type but are unable to do so because the field is not editable.

I made a simple change to 'unfreeze' the Contribution Type field and it now allows me to edit the field without any known problems.  Could we consider changing the base to allow this?

The change I made was to remove the call to $element->freeze() in the function CRM_Contribute_Form::buildQuickForm( ) as shown here:

Code: [Select]
        $element = $this->add('select', 'contribution_type_id',
                               ts( 'Contribution Type' ),
                               array(''=>ts( '- select -' )) + CRM_Contribute_PseudoConstant::contributionType( ),
                               true, array('onChange' => "buildCustomData( 'Contribution', this.value );"));
        if ( $this->_online ) {
            //$element->freeze( );
        }

If there are no objections, I can open an issue and submit a patch.
« Last Edit: November 18, 2011, 11:04:25 am by Marty »

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Cannot edit contributions that come in online
November 24, 2011, 10:35:03 am
Hey there,

I think one of the reasons that is frozen is because changing a contribution type when there is custom data attached could lead to data integrity problems.  e.g. i have a donation with custom data attached to it which says what project this donation is for.  When I change it to a data type that doesn't have these fields, where does the data go (should it even be allowed to do so, etc.)?

I know that this problem has been solved in other places in the UI (such as changing contact types, changing which entity types custom data applies to, etc.).

It sounds like your patch works for your case, but I think to be part of core, you code would need to know what to do in this situation (and maybe others).

Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Marty

  • I post occasionally
  • **
  • Posts: 67
  • Karma: 14
    • Boulder County Arts Alliance
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.37
  • PHP version: 5.4.27
Re: Cannot edit contributions that come in online
November 25, 2011, 11:31:56 am
Thanks for your reply, Michael.  I concur with your concern about loosing track of custom data when the contribution type changes.  It wasn't clear to me why you are allowed to change the type for offline contributions, but not for online contributions, so it seems that the same restriction should be placed on online contributions.

Perhaps the best solution would be to delete the custom data associated with the old contribution when the type is changed and saved.  A warning message could popup to alert the user that changing the type will delete the old custom data.  Perhaps I'll investigate ths and submit a patch.

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Cannot edit contributions that come in online
January 03, 2012, 08:06:43 am
Sounds good Marty - good luck with that :)
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Cannot edit contributions that come in online

This forum was archived on 2017-11-26.