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) »
  • Discussion »
  • Extensions (Moderators: mathieu, totten, kasiawaka) »
  • CiviCRM Tax Extensions - Common Core infrastructure planning
Pages: 1 [2] 3

Author Topic: CiviCRM Tax Extensions - Common Core infrastructure planning  (Read 9852 times)

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
Re: CiviCRM Tax Extensions - Common Core infrastructure planning
June 14, 2013, 02:24:25 pm
I just had another thought about the need of adding a column to the civicrm_contribution table or civicrm_line_item table and I wonder if it is necessary at all or even a good idea. It hinges on whether I am correct in my understanding about whether when a transaction is made the related entries will be recorded in the civicrm_financial_item table.

At the moment on my test site it only appears that the entry for the account that holds the "Income Account is..." relationship is recorded in the civicrm_financial_item table but if all related account transactions are recorded in this table we don't need to duplicate the data elsewhere; we just need to join on the recorded tax data when we pull the report.

The benefit I see of this is that the report can dynamically add tax columns based on the number of tax types it returns in the query whereas if we decide to add a tax column to the civicrm_contribution table every new tax added will have to alter the table.

Any thoughts?
My CiviCRM Extension Workshop: https://github.com/awasson

lolas

  • I post frequently
  • ***
  • Posts: 134
  • Karma: 9
    • Freeform Solutions
  • CiviCRM version: Several
  • CMS version: Drupal
  • MySQL version: 5.1+
  • PHP version: Several
Re: CiviCRM Tax Extensions - Common Core infrastructure planning
June 19, 2013, 06:55:14 am
In the proposal I am pretty sure the tax column added to the core tables was to be a single column summary of the taxes. Of course it would be terrible if every tax had to add a new column.

I see from comments added to the wiki that we have three votes against adding the columns. I tend to agree with those votes because that will keep the database more normalized. It may just be best to show the summary on the contribution page and in reports.
Freeform Solutions provides technology and management consulting, website and database development, and managed internet hosting solutions for not-for-profit organizations (NFPs).

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
Re: CiviCRM Tax Extensions - Common Core infrastructure planning
July 02, 2013, 04:58:53 pm
Ok, so I guess what is holding us up is the lack of a Tax Rules mechanism to define our rules for how a specific tax is associated with a particular financial type within core.

I don't see this as being a particularly complicated mechanism. All it needs to do is relate taxes declared in the Financial Accounts table with Financial Types. Since we can't be sure when this will happen and it's holding things up, I suggest we build it ourselves keeping in mind that we will detach it at some point when it is available in core. We should be able to manage this within a single database table.

Any thoughts?

Edit: What I mean by any thoughts is, is there any reason why we shouldn't move ahead. Business is ratcheting up for us at the moment but I'm still in the mood to donate, pledge, etc... time and resources to move forward with this. 

Andrew

« Last Edit: July 02, 2013, 07:17:49 pm by awasson »
My CiviCRM Extension Workshop: https://github.com/awasson

Parvez

  • I post occasionally
  • **
  • Posts: 91
  • Karma: 7
Re: CiviCRM Tax Extensions - Common Core infrastructure planning
August 27, 2013, 02:43:35 pm
Hey Andrew/All,

Have you made any progress on this?

We were planning on doing this prior to the upgrade to 4.3 but parked it as it wasn't on the critical path. Ready to pick up again now so would be good to know where we are with dev etc.

Thanks

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
Re: CiviCRM Tax Extensions - Common Core infrastructure planning
August 29, 2013, 09:57:35 am
Hi all,

I've put my work on the tax extension on the back burner recently because a couple of other jobs came up however, one of the jobs I'm working on will require it at some point so I'm keen to work on it if anyone else is interested.
My CiviCRM Extension Workshop: https://github.com/awasson

byarotsky

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.32
  • PHP version: 5.3.27
Re: CiviCRM Tax Extensions - Common Core infrastructure planning
September 24, 2013, 08:25:50 am
Hello everyone

I am just wondering the status of this project. Has coding started or are we still in the planning stages? Any updates would be greatly appreciated.


Thanks
Brad

mathieu

  • Administrator
  • Ask me questions
  • *****
  • Posts: 620
  • Karma: 36
    • Work
  • CiviCRM version: 4.7
  • CMS version: Drupal
  • MySQL version: MariaDB 10
  • PHP version: 7
Re: CiviCRM Tax Extensions - Common Core infrastructure planning
October 07, 2013, 12:54:16 pm
Hi everyone,

I moved this topic to the main Extensions forum section (instead of the "new extensions" sub-forum).

We are going to delete the "New extensions" sub-forum since there is low-traffic and it will provide better visibility to these discussions.

Mathieu
CiviCamp Montréal, 29 septembre 2017 | Co-founder / consultant / turn-key CiviCRM hosting for Quebec/Canada @ SymbioTIC.coop

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
Re: CiviCRM Tax Extensions - Common Core infrastructure planning
February 11, 2014, 08:37:35 am
Hello team...

What's the interest level in tackling the tax extension this year? Has anyone been working on it since we left off?

Andrew
My CiviCRM Extension Workshop: https://github.com/awasson

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: CiviCRM Tax Extensions - Common Core infrastructure planning
February 11, 2014, 08:58:06 am
I have an immediate need and would be interested in being directed to latest codebase so that I can implement and test for a WordPress site.
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
Re: CiviCRM Tax Extensions - Common Core infrastructure planning
February 11, 2014, 09:07:57 am
Hi Joe,

I'm not sure if anyone else is working on this, or has been since last year. As I recall progress fizzled on it and the missing piece is a rules engine to manage tax rules. I don't know if the rule engine has been added to core or not as I've been out of the loop for a while but if not, I don't see any reason why we can't use a couple of database tables and some logic to make it up until one is added to core.

Has anyone else worked on extension code?

For my part, I'll dust off the code I have and document where I'm at with it and what is missing. I haven't looked at it since September. I will do that this afternoon and ping you back.

Andrew
My CiviCRM Extension Workshop: https://github.com/awasson

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: CiviCRM Tax Extensions - Common Core infrastructure planning
February 11, 2014, 09:12:05 am
Wonderful, thanks Andrew. My need is to support Canadian taxes in WordPress.
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

lolas

  • I post frequently
  • ***
  • Posts: 134
  • Karma: 9
    • Freeform Solutions
  • CiviCRM version: Several
  • CMS version: Drupal
  • MySQL version: 5.1+
  • PHP version: Several
Re: CiviCRM Tax Extensions - Common Core infrastructure planning
February 11, 2014, 09:20:23 am
We ended up doing something specific for one client using custom fields on contributions since we had a deadline. It is limited to memberships but was made generic in a few places so that it could easily be extended to Events. I can't really provide the code since it is tied up with some of their other membership customizations but it's probably not that useful as a generic starting point anyway.

One useful piece that we learned is missing and where Core may need some re-work to support taxes or other price components: The ability to hook into some of the JavaScript in the templates. We had to override a few templates mainly to alter the JavaScript.
Freeform Solutions provides technology and management consulting, website and database development, and managed internet hosting solutions for not-for-profit organizations (NFPs).

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
Re: CiviCRM Tax Extensions - Common Core infrastructure planning
February 11, 2014, 09:32:26 am
Thanks lolas,

So was this achieved without an extension at all? It sure would be cool to be able to do it with a recipe rather than an extension but I couldn't figure out how to do that.

In the extension, I injected jQuery into specific pages on the page build and form build hooks.

I have to deal with some daily things first but I'll report back this afternoon (evening for you guys) and we'll see if we can get this back on track.

lolas: I'm really interested in more about what you guys achieved and how you achieved it. In previous attempts I hacked core templates and added code right in the payment processing classes which is completely unmaintainable but had to be done at the time. I'll never do that again  :-[
My CiviCRM Extension Workshop: https://github.com/awasson

lolas

  • I post frequently
  • ***
  • Posts: 134
  • Karma: 9
    • Freeform Solutions
  • CiviCRM version: Several
  • CMS version: Drupal
  • MySQL version: 5.1+
  • PHP version: Several
Re: CiviCRM Tax Extensions - Common Core infrastructure planning
February 11, 2014, 09:42:54 am
It is a combination of custom fields and a Drupal module.  I agree hacking core templates is terribly unmaintainable. We did it in this case but it is limited to a few lines - mostly to fix JavaScript and in one place added a one line function call to add a bunch of extra tokens to a mailing template. That last one could have been done via PHP in the template as well but the client likes to edit the template sans PHP.

Those few lines could be removed if a few small things were fixed in core.
Freeform Solutions provides technology and management consulting, website and database development, and managed internet hosting solutions for not-for-profit organizations (NFPs).

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
Re: CiviCRM Tax Extensions - Common Core infrastructure planning
February 11, 2014, 10:13:31 am
Yes, I figured there had to be a module in there somewhere but it sounds like your solution was cleaner than my first attempt. I'm excited to get some interest in this again. I'll post back tonight.

Cheers,
Andrew
My CiviCRM Extension Workshop: https://github.com/awasson

Pages: 1 [2] 3
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Extensions (Moderators: mathieu, totten, kasiawaka) »
  • CiviCRM Tax Extensions - Common Core infrastructure planning

This forum was archived on 2017-11-26.