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) »
  • How to regenerate an invoice?
Pages: [1]

Author Topic: How to regenerate an invoice?  (Read 1001 times)

michaellenahan

  • I post occasionally
  • **
  • Posts: 30
  • Karma: 0
    • mick.appspot.com
How to regenerate an invoice?
November 25, 2011, 09:26:53 am
Hello, everyone. When an online membership signup occurs, the user has an option to pay later.

The HTML contained in the 'Memberships - Receipt (on-line)' template is used to create the outgoing email, and create the pdf attachment.

http://drupal.demo.civicrm.org/civicrm/admin/messageTemplates/add?action=update&id=31&reset=1

The way it works is that if the person selected pay later, then this becomes an invoice. Otherwise it is a receipt because they have paid on-line.

It's the same template, with logic that knows whether $is_pay_later is set, or not.

My question is about re-generating an invoice at a later date.

CiviCRM seems to allow us to re-generate a receipt at a later date, but not an invoice.

If we go to Contributions > Find Contributions and do a search ...

... we find some with status 'Completed' (these are online payments that have a receipt)

... and we find some with status 'Pending (Pay Later)' (these are for people who chose pay later and have received an invoice)

If we check one with status 'Completed' we are able to select 'Print or Email Contribution Receipts' to re-generate the pdf.

However, if we check one with status 'Pending (Pay Later)' we can't regenerate the pdf.

We get the error: 'Please select only online contributions with Completed status'.

I'm wondering ... since the same template is used to create both invoices and receipts, how is it that we can only regenerate the receipts. My client would like to regenerate invoices, too.

How can we work around this and allow the recreation of invoice pdf documents.

Thanks for any help.

Michael

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: How to regenerate an invoice?
November 25, 2011, 11:16:58 am

1. The error is coming due to a code check which is easily fixable here: CRM/Contribute/Form/Task/PDF.php (line 85 or so)

2. However i'm not sure if the right smarty variables are set for the rest of the code in that file to work properly (i suspect not). U'll need to trace and figure out what else might need to be tweaked to enable "invoices" to be generated

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

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: How to regenerate an invoice?
November 25, 2011, 11:18:37 am
just tying this to other posts that i think are related.
This is the most useful i think http://forum.civicrm.org/index.php/topic,21371.msg89579.html#msg89579
But also http://forum.civicrm.org/index.php/topic,20622.msg86231.html#msg86231 and
http://forum.civicrm.org/index.php/topic,13041.msg56825
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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • How to regenerate an invoice?

This forum was archived on 2017-11-26.