CRM-14080 default to now
authorEileen McNaughton <eileen@fuzion.co.nz>
Wed, 15 Jan 2014 22:43:25 +0000 (11:43 +1300)
committerEileen McNaughton <eileen@fuzion.co.nz>
Wed, 15 Jan 2014 22:44:11 +0000 (11:44 +1300)
----------------------------------------
* CRM-14080: Have noticed there is no default on received_date on contribution.create - should default to now
  http://issues.civicrm.org/jira/browse/CRM-14080

api/v3/Contribution.php

index 370f8135a7c34ab4d6107be55310f53eda05d682..63322f70e66126088d46e252ebca65e672fae37f 100644 (file)
@@ -83,6 +83,7 @@ function _civicrm_api3_contribution_create_spec(&$params) {
   $params['contact_id']['api.required'] = 1;
   $params['total_amount']['api.required'] = 1;
   $params['payment_instrument_id']['api.aliases'] = array('payment_instrument');
+  $params['receive_date']['api.default'] = 'now';
   $params['payment_processor'] = array(
     'name' => 'payment_processor',
     'title' => 'Payment Processor ID',