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) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • API Access to FinancialAccount, EntityFinancialAccount, etc.
Pages: [1]

Author Topic: API Access to FinancialAccount, EntityFinancialAccount, etc.  (Read 450 times)

adixon

  • I post frequently
  • ***
  • Posts: 314
  • Karma: 19
    • Blackfly Solutions
API Access to FinancialAccount, EntityFinancialAccount, etc.
May 14, 2014, 05:59:11 am
In a migration I'm working on, using Eileen's excellent civimigrate module, I have a need to lookup financial account information so I can appropriately categorize my imported contributions (my imported contributions are categorized by GL account, so I use this information to figure out which financial type it should be assigned. I see there's no such thing in the API, so I wrote some simple wrappers (I only needed the get function, but did a full work up for completeness).

If anyone sees this as generally useful, I can contribute them in.

I can see that most of the time these are entities that should only be touched indirectly via a contribution, and maybe these should only have a get option.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: API Access to FinancialAccount, EntityFinancialAccount, etc.
May 15, 2014, 05:51:22 pm
This has been worked on a few times - including https://issues.civicrm.org/jira/browse/CRM-12764

I think both Lola & later I did write somewhat complex api for that - but I can't find the code either of us wrote. I think Lola's didn't get merged & then a less featured version was added whereas I think I basically threw mine away once the tests started failing on an ongoing basis about 4 months ago on https://test.civicrm.org/ - I took a look & can't find it anywhere. I'm pretty sure it allowed you to retrieve accounting code on contribution get etc
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

adixon

  • I post frequently
  • ***
  • Posts: 314
  • Karma: 19
    • Blackfly Solutions
Re: API Access to FinancialAccount, EntityFinancialAccount, etc.
May 16, 2014, 11:17:13 am
Sounds like you were trying to do something more ambitious within the api. I just wrote the obvious api wrappers that use the DAO interface, and then let my code do the complicated relationship stuff.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: API Access to FinancialAccount, EntityFinancialAccount, etc.
May 16, 2014, 12:58:41 pm
well that's a start! but I feel like it should be possible to retrieve accounting_code without understanding all the under-the-hood complexity
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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • API Access to FinancialAccount, EntityFinancialAccount, etc.

This forum was archived on 2017-11-26.