Answers.Body: <p>Resolved the problem by using a combination of the tokens for Contact ID and Todays Date (in raw format). This gives a unique number that can be inserted into the Receipt when a payment is lodged in the system.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-25T22:13:49.073Z
Answers.LastActivityDate: 2021-08-25T22:13:49.073Z
Answers.UserDisplayName: Grant Watt
Body: <p>Currently we issue invoice / receipt numbers for sponsorship and donation payments constructed from using the Current Year and the Contacts ID. A reminder notice is sent out for Annual Sponsorships with an invoice number inserted. E.G. 20201234
  A problem arises when there are 2 or more sponsorship payments from the contact during the year. The same invoice / receipt number is created. This can have implications for when contacts claim tax deductions.</p>
  <p>So my query is does an invoice / receipt number generator exist in CiviMember. It would need to work within Scheduled Reminders as that is where our renewal notices are constructed and despatched.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-21T20:58:08.013Z
Comments.Text: i don't know of a receipt number generator. Could you use MembershipID (assuming someone with multiple payments has more than one). Otherwise am wondering if using 'memberships' is actually helping in your scenario or adding complexity
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-21T20:58:57.773Z
Comments.Text: in general i would expect the ContributionID to be most likely to be what is used for receipting.
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-22T05:46:59.720Z
Comments.Text: The Membership ID token available refers to the "Latest Membership ID", similarly the Contribution ID available is " Latest Recur Contribution ID".  I will try these using a test contact and see how it works out.
Comments.UserDisplayName: Grant Watt
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-22T06:01:02.960Z
Comments.Text: To clarify - many of our Contacts are Volunteers, Annual Sponsors and also Members. We used "membership" to setup the various Annual Sponsorships - these are based on the date they were setup, whereas the Members are based on a fixed renewal date.  A contact could have more than 1 annual sponsorship, and they could all have the same renewal date. If there is a token available for EACH membership that would be the best solution.
Comments.UserDisplayName: Grant Watt
Tags: <civicontribute><civimember>
Title: Invoice Number Generator
ThreadText: # Invoice Number Generator
  
  (Asked by: username_0 on 2021-08-21)
  
  Currently we issue invoice / receipt numbers for sponsorship and donation payments constructed from using the Current Year and the Contacts ID. A reminder notice is sent out for Annual Sponsorships with an invoice number inserted. E.G. 20201234
  A problem arises when there are 2 or more sponsorship payments from the contact during the year. The same invoice / receipt number is created. This can have implications for when contacts claim tax deductions.
  
  So my query is does an invoice / receipt number generator exist in CiviMember. It would need to work within Scheduled Reminders as that is where our renewal notices are constructed and despatched.
  
  **Tags:** civicontribute, civimember
  
  > **Comments:**
  > **username_1**: i don't know of a receipt number generator. Could you use MembershipID (assuming someone with multiple payments has more than one). Otherwise am wondering if using 'memberships' is actually helping in your scenario or adding complexity  
  > **username_1**: in general i would expect the ContributionID to be most likely to be what is used for receipting.  
  > **username_0**: The Membership ID token available refers to the "Latest Membership ID", similarly the Contribution ID available is " Latest Recur Contribution ID".  I will try these using a test contact and see how it works out.  
  > **username_0**: To clarify - many of our Contacts are Volunteers, Annual Sponsors and also Members. We used "membership" to setup the various Annual Sponsorships - these are based on the date they were setup, whereas the Members are based on a fixed renewal date.  A contact could have more than 1 annual sponsorship, and they could all have the same renewal date. If there is a token available for EACH membership that would be the best solution.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2021-08-25. Score: 4
  
  Resolved the problem by using a combination of the tokens for Contact ID and Todays Date (in raw format). This gives a unique number that can be inserted into the Receipt when a payment is lodged in the system.
  
  
  ---
  
  