Closed (won't fix)
Project:
PM Invoice
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
7 Apr 2011 at 22:59 UTC
Updated:
8 Apr 2015 at 12:43 UTC
Jump to comment: Most recent
I was setting up the invoice module (http://drupal.org/project/invoice) this evening, and realised quite how similar it is to Storm Invoice.
We should see if it is possible to plug into that rather than providing everything ourselves.
Comments
Comment #1
chertzogi like this module, but when i was messing around with it, the drawback i didnt like was the fact that you couldnt reference nodes. you had to create the items on the fly. i would love to be able to have a work flow like this:
create new invoice
on the items list it populates with "billable items"
when invoice is saved, sets invoiced items to billed.
im no good with code, but will test anything that people post.
Comment #2
juliangb commented@chertzog, you can bill other Storm nodes already, as you have described.
This issue is more about better integration with the Invoice module, unrelated to Storm. It does very similar things, so makes sense to combine on the common functionality.
Comment #3
juliangb commentedTagging
Comment #4
paulhudson commentedI'd like to take a look at this.
Objectives:
Utilize the Invoice Modules node/add form
Allow creation of Storm 'Organizations' on the fly from invoice node/add page?
Use the Invoice modules Print and PDF feature... there is a Print module (http://drupal.org/project/print) but Invoice already has this feature...
Paul Hudson
Comment #5
paulhudson commentedHey, I've had a scan through the invoice module and storminvoice module.
I nearly collapsed at the thought of attempting this but it doesn't seem all that bad. :-/ Here's some initial thoughts:
- What happens in storm when an invoice is paid and what use is made of the Payment date field of an invoice? I can't see a comparable payment received date on invoice module.
- module_storminvoice_auto_add() can be rewritten to build a node object that invoice_insert() deals with on node_save().
- We'd still need to use invoice_customers table which would basically duplicate whats in stormorganization table.
- storminvoice module could continue to provide the interface for viewing invoices but would need quite a lot of hacking to switch to the invoice module
- We'd need to handle the reference between organizations and projects on invoices, this could be done via a slimmed down version of the storminvoice table which would contain these fields: vid, nid, number, organization_nid, organization_title, project_nid, project_title, src_nid, src_vid. We'd JOIN the invoice table by ON sin.number = i.iid
- I guess the storm attributes need to be calculated before building the line items in the invoice node object.
Any feedback on the above would be great. I'm really not familiar with the Storm module so am making some assumptions here. :-)
Best,
Paul Hudson
Comment #6
paulhudson commentedYou can see where I'm going with this here: http://dev.hudson-digital.co.uk/node/2
I've just done a small amount of hacking so the Projects module is the only one that creates invoices via the invoice module.
If you visit the link above you will be able to create an invoice for the test project.
You can also view http://dev.hudson-digital.co.uk/storm/invoices to view the invoice.module invoices.
I don't think it will be too difficult to reference the Organization and Project names or to calculate the 'to pay', 'total paid' and 'total' values.
I'll hold off on further development for now until I have your feedback. :-)
Best,
Paul
Comment #7
paulhudson commentedComment #8
paulhudson commentedUsing hook_form_alter and a custom submit handler could allow us to display a select box of billable items.
I could take a look at this if juliangb is happy for me to go ahead with the invoice integration.
Comment #9
juliangb commentedI need a bit of time to look at this, but a couple of immediate comments:
- Would this cause an optional or mandatory dependency on the invoice module?
- I'm keen to use integrations with other modules to provide a simplification in the Storm modules. Would this provide that, or is this mainly to allow more functionality via the invoice module?
Comment #10
paulhudson commented- I guess the invoice module could be an optional add on with the current storm invoice as default.
You'd still need the auto_hooks to create invoices. Also, I like that storm displays the balance to be paid so there's functionality to keep there. The invoice module basically does the rest though so it would reduce the amount of code in the storminvoice module. Other modules shouldn't see a difference other than the invoice node objects construction.
I guess this is mainly adding features of the invoice module with a view to replace the bulk of the current storminvoice module. However, checking if invoice.module is enabled and providing an administrative switch to allow users to choose sounds like a good idea. Certainly from the point of view of current users. :-)
I think the two are fairly compatible. If I know the broad direction you're comfortable heading in then I'm happy to play with it and see how we go.
Comment #11
juliangb commentedI'm still not 100% clear on how the integration would go.
My main worry is that this would add complexity - without the simplification that comes with it to make it worthwhile.
Comment #12
paulhudson commentedHey sorry for the delay, deadline stuff...
I hear your concern. I guess the change to Invoice module would have to be mandatory rather than optionally supported or you'll defiantly be adding complication.
Using Invoice module would allow us to do away with the js, theme and some of the module and inc code of storm invoice. Leaving a slimmer storm invoice module that handles reporting, listing invoices, auto_add and building the view, etc. So still doing quite a lot. :-)
Comment #13
JoshuaM commentedI'm not too familiar with the invoice module for Drupal. Would it allow me to customize the columns present and the auto-add entry descriptions on the invoice? I've been looking to start making my own customizations to the Storm Invoice module, but will hold off if this merge is going to happen.
Comment #14
juliangb commentedYes, I think it would be mandatory or nothing.
So - I think it basically comes down to whether there is enough in common to make it worthwhile!
Any thoughts from others?
Comment #15
juliangb commentedBack to active - as no patch to review.
Comment #16
d34dman commentedis this still assigned to drupaul.co.uk?
Comment #17
juliangb commentedMoving to PM Invoice, for review of whether this is still relevant.
Comment #18
d34dman commentedCould this be put to closed wont fix? Reason #2467165: Invoice Module integration is unsupported.
Comment #19
juliangb commentedAgree