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 CiviMember (Moderator: Deepak Srivastava) »
  • Calculated dues payments?
Pages: [1]

Author Topic: Calculated dues payments?  (Read 1209 times)

epmcl

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
Calculated dues payments?
May 19, 2010, 11:23:40 am
I am trying to come up with the best way of handling calculated dues payments on the Member Dues/Renewal form.

By "calculated dues", I mean the total cost of membership being equal to a base price plus a variable amount. In my case, the variable amount is calculated by the number of employees in an organization multiplied by a fixed value, which I'll call "the multiplier".

Here's an example of member dues for an organization with 100 employees:

Base annual Dues: $150
Multiplier: 12.5%
Dues = $150 + (100 * .125) = $162.50

Setting the base dues is simple; it's just defined on the Membership Type. It's the variable part that is tricky. That needs to get calculated and plugged into the dues/renewal form from a value provided by the user at run time.

From what I've read, there doesn't appear to be any functionality in CiviMember (yet?) that will support calculated dues like this. If I'm wrong on that, please let me know (and point me to a reference, if you can).

I have thought that one way to do it would be to provide an additional contribution field, providing the user with instructions on how to calculate the variable amount and let them enter it there.

Another thought I had was to use custom data fields on the member type for the number of employees, with the variable vlaue field being processed with a PHP hook, but that's problematic for a number of reasons, technical and usability.

Another thought I had was using AJAX to do the calcutions and populate the additional contribution field from data the user entered in custom fields. Is that doable?

Your ideas on this are welcome.

Thanks!

Ed








mdavid

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 0
  • CiviCRM version: 4.2
  • CMS version: Drupal 7.15
  • MySQL version: 5.1.63
  • PHP version: 5.2.17
Re: Calculated dues payments?
November 27, 2010, 12:23:47 pm
Did you ever find a good way to handle calculated dues payments on the Member Dues/Renewal form?

I'm also looking for a way to calculate member dues. My case is a bit different from yours, but I'm guessing the place where the calculation is done might be similar.

I need to implement the following:

  • Base membership fee: $100, $75, or $50, depending on membership level
  • Subtract $15 if the individual is an additional member from the same employer as an existing member
  • Add a fee ($5, $10, or $15) depending on the answer selected in a custom field

I've looked at using hook_civicrm_membershipTypeValues but I don't see a way to do the calculating. It looks like I'd have to include values for every possible combination of the above.

I'd love to hear if you figured out a way to implement calculated dues for your project or if anyone else has done so and can share how it's done.

Thanks.

epmcl

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
Re: Calculated dues payments?
December 01, 2010, 03:18:29 pm
Quote from: mdavid on November 27, 2010, 12:23:47 pm
Did you ever find a good way to handle calculated dues payments on the Member Dues/Renewal form?

.......
I'd love to hear if you figured out a way to implement calculated dues for your project or if anyone else has done so and can share how it's done.

Thanks.

Hi, mdavid,

No I haven't come up with anything on this yet. I think we're going to work around it for now by providing a form process that handles it outside of CiviCRM. We'll update records manually.

If you come up with anything, please let me know.

Thanks,

Ed



mdavid

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 0
  • CiviCRM version: 4.2
  • CMS version: Drupal 7.15
  • MySQL version: 5.1.63
  • PHP version: 5.2.17
Re: Calculated dues payments?
December 02, 2010, 11:15:47 am
Hi Ed,

Thanks for letting me know; I'm sorry to hear there doesn't seem to be a solution for this yet.

Like you, the group I'm working with is updating membership records manually and I was hoping to offer them a more efficient process.

Thanks,
 Michael

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Calculated dues payments?

This forum was archived on 2017-11-26.