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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Making Date Received editable in contributions that were submitted by CC
Pages: [1]

Author Topic: Making Date Received editable in contributions that were submitted by CC  (Read 909 times)

VRAZER

  • I post occasionally
  • **
  • Posts: 49
  • Karma: 1
Making Date Received editable in contributions that were submitted by CC
May 04, 2009, 05:04:22 pm
In CRM/Contribute/Form/Contribution.php I see lines of code (below) where the Date Received field is added to the form, but it is not editable for CC contributions.  For tax reasons, my clients need to be able to edit this field.  How can I modify this field so that it is editable?

Lines from code

        // add various dates
        $element =& $this->add('date', 'receive_date', ts('Received'), CRM_Core_SelectValues::date('activityDate'), false );         
        $this->addRule('receive_date', ts('Select a valid date.'), 'qfDate');

Thanks in advance for your help.

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Making Date Received editable in contributions that were submitted by CC
May 05, 2009, 08:10:13 am
A little later in that file, around lines 648, I think if you comment out:

Code: [Select]
if ( $this->_online ) {
            $this->assign("hideCalender" , true );
        }

That should free the field. I didn't actually test this -- but I'm pretty sure that's where it's locked.

I'm not sure if that's a good course of action from an operational standpoint, though. The timestamp from the payment processor is locked down because it's a "firm" value -- the actual date the transaction took place. If you need a secondary date for tax reasons, you might consider adding a custom field to contributions.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

VRAZER

  • I post occasionally
  • **
  • Posts: 49
  • Karma: 1
Re: Making Date Received editable in contributions that were submitted by CC
May 09, 2009, 01:22:11 pm
That did it... thanks!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Making Date Received editable in contributions that were submitted by CC

This forum was archived on 2017-11-26.