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 (Moderator: Dave Greenberg) »
  • Trying to Find Offline Contributions
Pages: [1]

Author Topic: Trying to Find Offline Contributions  (Read 1139 times)

samw3

  • Guest
Trying to Find Offline Contributions
June 24, 2009, 10:25:29 am
Hi,

I'm running the following query :

select c.source as CODE_SOURCE, t.name as TYPE, count(*) as COUNT, sum(c.total_amount) as TOTAL, avg(total_amount) as AVERAGE
from civicrm_contribution c, civicrm_contribution_type t
where c.contribution_type_id = t.id  and receipt_date >= '2007-01-01' and receipt_date <= '2007-12-31'
group by c.source, t.name  order by source, t.name;

It only returns the online contributions but we need to display all (online/offline) contributions.  What am I missing?

Thanks,

Sam

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Trying to Find Offline Contributions
June 24, 2009, 10:34:58 am
That query works for me (finds any contribution that HAS a value for receipt_date in that range). Check if your offline contribs actually have a value in that column (might be NULL if the receipt date wasn't entered when contributions where recorded / imported).
Protect your investment in CiviCRM by  becoming a Member!

samw3

  • Guest
Re: Trying to Find Offline Contributions
June 25, 2009, 08:02:39 am
Thanks.  That's what it was.. I changed receipt_date to receive_date.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Trying to Find Offline Contributions

This forum was archived on 2017-11-26.