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 determine pending contributions on a (past) date (Accounts Receivable)
Pages: [1]

Author Topic: How to determine pending contributions on a (past) date (Accounts Receivable)  (Read 380 times)

fen

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 13
    • CivicActions
  • CiviCRM version: 3.3-4.3
  • CMS version: Drupal 6/7
  • MySQL version: 5.1/5.5
  • PHP version: 5.3/5.4
How to determine pending contributions on a (past) date (Accounts Receivable)
March 06, 2014, 08:55:03 am
I have a client that is being audited and needs to know what their Accounts Receivable was at close of their year end books. Is all transaction data (when created, payment made, completed) kept in the activity table (where I am looking now) as the contribution table itself doesn't seem complete in this regard.  I'll post what I find, but am looking for pointers along the way.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: How to determine pending contributions on a (past) date (Accounts Receivable)
March 06, 2014, 04:38:58 pm
Wouldn't the actual payment show in the entity_financial_transaction or financial_trxn table?
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

fen

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 13
    • CivicActions
  • CiviCRM version: 3.3-4.3
  • CMS version: Drupal 6/7
  • MySQL version: 5.1/5.5
  • PHP version: 5.3/5.4
Re: How to determine pending contributions on a (past) date (Accounts Receivable)
March 06, 2014, 09:06:45 pm
Thanks for the reply, but would those catch even manually entered transactions? (Have to admit I'm not completely sure how/where/when those tables are updated.)

The following query - simple as it is - may do the trick. It generates a report of all contributions that began before one second into the day of 2013-07-01 and were completed after that time. (thankyou_date is locally used as invoice_date - coded before my time.)

Code: [Select]
mysql -B example_civicrm -e "SELECT i.invoice_id,
       i.contact_id     AS cid,
       c.display_name   AS name,
       i.total_amount,
       t.name           AS type,
       i.source,
       i.receive_date,
       i.thankyou_date  AS invoice_date,
       i.receipt_date,
       o.name           AS status
     FROM civicrm_contribution      i
LEFT JOIN civicrm_contact           c ON i.contact_id = c.id
LEFT JOIN civicrm_contribution_type t ON i.contribution_type_id = t.id
LEFT JOIN civicrm_option_value      o ON (i.contribution_status_id = o.value AND o.option_group_id = 11)
    WHERE i.cancel_date is NULL
      AND (i.thankyou_date <= '2013-07-01 00:00:01' OR i.receive_date <= '2013-07-01 00:00:01')
      AND i.receipt_date >  '2013-07-01 00:00:01'" > pending.csv

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • How to determine pending contributions on a (past) date (Accounts Receivable)

This forum was archived on 2017-11-26.