Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-20363

Invoice Id generation needs an extension mechanism

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.7.16, 4.6.26
    • Fix Version/s: None
    • Component/s: CiviContribute
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      A customised invoice_id cannot be generated in an extension. A more extensive description can is found at http://civicrm.stackexchange.com/questions/16871/how-do-i-generate-a-custom-invoice-id .

      The update is done in CRM_Contribute_Form_Task_Invoice on line 546 with the following line:

      CRM_Core_DAO::setFieldValue('CRM_Contribute_DAO_Contribution', $contribution->id, 'invoice_id', $invoiceId);
      

      Remark:
      At the moment the invoice is derived from the contribution id. So it does not matter if the invoice code is recalculated or red directly from the database. But if a different calculation is used a new invoice id is generated every time a invoice is printed.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              keikelboom Klaas Eikelboom
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: