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) »
  • Invoice ID in confirmation email
Pages: 1 [2]

Author Topic: Invoice ID in confirmation email  (Read 3433 times)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Invoice ID in confirmation email
February 04, 2011, 02:26:42 am
I think some table ids are specifically exposed. Note that there is quite a bit of discussion about having a sequential numbering system implemented that meets audit standards and if that is something you would put towards it would be worth indicating it as an organization is currently considering putting up some money to help implement this amongst other things (part payments) but more community contribution would probably influence them
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

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Invoice ID in confirmation email
February 04, 2011, 08:46:48 am
RJB My suggestion was backing up Eileen's ie she told you what to use, I told you where to put it in case that wasn't obvious. Sorry for not making that clearer
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

rjb

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 2
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6
  • MySQL version: 5.1.44
  • PHP version: 5.3.1
Re: Invoice ID in confirmation email
February 09, 2011, 06:01:08 am
Not at all, Pete - thanks for your help! Much appreciated. I think I'll do my very best to persuade everyone to settle for the contribution ID - it's going to be a much easier solution.

Thanks again and karma clicks to both of you,

RJB

hailu

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6, 7
  • MySQL version: 5.1.54
  • PHP version: 5.2
Re: Invoice ID in confirmation email
May 11, 2011, 10:21:49 pm
Hey, i solved this issue by populating the field with a default with a 32 char invoice id using  a snippet from an older post http://forum.civicrm.org/index.php/topic,1735.msg7541.html#msg7541 in a similar vein.  This works for our use case.
in hook_buildForm():
  // if the offline form's invoice id field is there
  if ($formName == 'CRM_Contribute_Form_Contribution' && $form->elementExists('invoice_id')) {
    // generate and set an invoiceID for this transaction                                                               
    $invoiceID = $form->getElementValue( 'invoice_id' );
    if ( ! $invoiceID ) {
      $invoiceID = md5(uniqid(rand(), true));
    }       
    $defaults['invoice_id'] = $invoiceID;
    $form->setDefaults($defaults);
  }

barto

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: 4.2.7
  • CMS version: WordPress 3.5.1
  • MySQL version: 5.5.29
  • PHP version: 5.3.19
Re: Invoice ID in confirmation email
February 27, 2013, 02:19:00 pm
Excuse me, but... in wich file did you add this code to pre-populate the field?

Thank you

Pages: 1 [2]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Invoice ID in confirmation email

This forum was archived on 2017-11-26.