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) »
  • Trying to find a way to make "received_date" required when adding Contribution
Pages: [1]

Author Topic: Trying to find a way to make "received_date" required when adding Contribution  (Read 1077 times)

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Trying to find a way to make "received_date" required when adding Contribution
November 19, 2010, 04:47:02 pm
I've tried looking at:

templates/Contribute/Form/Contribution.tpl
CRM/Contribute/Form/Contribution.php

Maybe I'm missing the code, but those files don't seem to be controlling which fields are required.

Can't find a way to make the Received Date a required field when adding/editing a Contribution record. (see attached).

Any "gotchas" you can anticipate with making this customization?

Some point me in the right file please?  Thanks!

« Last Edit: November 19, 2010, 04:49:57 pm by Stoob »
Try CiviTeacher: the online video tutorial CiviCRM learning library.

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: Trying to find a way to make "received_date" required when adding Contribution
November 19, 2010, 08:06:33 pm
I'm pretty sure it is required. If you clear it or leave it blank, it just prepopulates with the current date.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Trying to find a way to make "received_date" required when adding Contribution
November 20, 2010, 10:31:07 am
It's true that it's prepopulated.  However if you clear it and save, there is NULL date.  It appears instead in the Contribution as:

Received date: (pending)
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Trying to find a way to make "received_date" required when adding Contribution
November 20, 2010, 10:35:57 am
Stood,

Are you able to replicate this on demo?

Kurund
Found this reply helpful? Support CiviCRM

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Trying to find a way to make "received_date" required when adding Contribution
November 20, 2010, 10:41:20 am
Yes, I created a $1 transaction here with no received date:
http://drupal.demo.civicrm.org/civicrm/contact/view?reset=1&cid=34

By clicking the "clear" link next to received date.

I'm not entirely sure this is a bug, but it is a strange behavior.  I suppose an easy workaround would be to simply hide the "clear" link using CSS, and then it would not be possible to save a Contribution with no received_date. 

There might be some organizations that want to create Contributions out there with NULL received_dates, I suppose.
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Trying to find a way to make "received_date" required when adding Contribution
November 20, 2010, 02:07:53 pm
I think if the status is completed then it should be a required field. I can't think of a valid use case for not wanting a date there on a completed transaction and I think trying to cater to it could cause other complexities when we start looking at part-payments etc
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Trying to find a way to make "received_date" required when adding Contribution

This forum was archived on 2017-11-26.