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) »
  • Complex financial entities
Pages: 1 [2]

Author Topic: Complex financial entities  (Read 2201 times)

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Complex financial entities
January 17, 2014, 02:53:38 pm
Thanks Joe that makes sense. I didn't see in your example a way of creating multiple line items for one participant (e.g. from a price set), but I'm sure there's some syntax that would make sense.
Ok so some more questions about this:
  • How to avoid a repeat of the the "Location" api (our last mega-api that collapsed under its own weight)?
  • I've seen an example for Create, what about update and delete?
  • Update is of course the stickiest and could potentially encompass crazy stuff like partial refunds, so we need to be careful about scope creep (not that I'm against partial refunds I think they would be great, just need to make sure the scope is doable for this project).
  • Esp with regard to update I have some questions about the thick vs. thin approach. When updating a participant it doesn't make sense for the caller to be responsible for manually updating related line items, but neither does it make sense to make them go through a mega api to do the update. Would a happy medium be to keep the api's modular, but make them all a little smarter so that they all know how to keep their related entities in sync?
Try asking your question on the new CiviCRM help site.

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
Re: Complex financial entities
April 02, 2015, 07:55:17 am
http://wiki.civicrm.org/confluence/display/CRM/Invoice+API
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
Re: Complex financial entities
April 03, 2015, 11:41:23 am
I'm renaming Invoice API to Order API to try to clear up confusion a bit.

What do people think of limiting the scope of the Order API to specifying and changing the things that are being 'purchased' or 'ordered'. Anything to do with money being received either online or offline or refunded would be handled by a new Payment API on a virtual object of payments.

The intent is to try to clarify processing, and hopefully lead to smaller, more understandable and easily maintained functions.
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Complex financial entities
April 03, 2015, 04:52:49 pm
Yes, I agree that separating orders & payments is a good idea.

As I've mentioned before,  I feel that CiviCRM breaks orders into processing paths depending on when they are paid for and it leads to a lot of complexity in the code & makes it hard to change things - e.g it's going to take a lot of work to be able to do back-office off-site credit card payments because they are just not allowed for in the way the order is created. Also, I'm trying to alter a payment by hook & depending on the form it might, or might not, have been saved to the database by the time the hook is invoked.
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 [2]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Complex financial entities

This forum was archived on 2017-11-26.