Very nice time-tracking and project tracking. Perhaps there is a way to do what I'm trying to do already, but I've not found it yet so I'll put this in as a Feature Request.
What would be very useful is a way to import from Timetracker into Invoices as invoice items, so one doesn't have to re-enter each project or task and lookup the time spent (and the rate) for each. Since the price-mode and price is already stored in the Project datatype, an "Invoice Project" (and/or "Invoice Organization") button seems like a natural extension.
| Comment | File | Size | Author |
|---|---|---|---|
| #35 | storm_timetracking_to_invoice.patch | 4.1 KB | Magnity |
| #27 | storm_auto_item.20090601.patch | 4.98 KB | raintonr |
Comments
Comment #1
wtopper commentedThis would be a fantastic addition - especially if it was sensitive to the Billable check-box! It would save loads of duplicate entry and potential errors.
Comment #2
Roberto Gerola commentedI have prepared a rough list of feature I would like to implement in
Storm.
1. Syncing between different installations
Scenario : there are two or more different installations of Storm owned
and used by different users.
The different groups of users need to collaborate on some projects, so
they need to share some data, without have to login on the partner
system or, worst, to duplicate the data on the several installations.
A typical example is an organization that hires another company or some
freelancers to works on some projects.
2. Filter extensions
Saving conditions with a name
SQL filter
3. Hooks for form filter
Hooks for list and building SQL code to customize the search pages
4. Team management and support
5. PDF print of invoices
6. Multiple taxes
Support for multiple taxes on invoice items
7. Documentation / manual
8. Simplifying form pages removing unneeded options
9. Views support
10. Create some blocks : open projects, latest tickets and so on
11. Block for quick time tracking and time support.
12. Charts integration
13. Comparison reports for invoices and expenses
14. Dashboard
15. Automatic creation of invoices from time tracking and expense tracking
Roberto
Comment #3
KrisBulman commentedthanks for the update Roberto! can't wait for compound taxes and views support!
Comment #4
flickerfly commentedI think #10 (Blocks of information) will automatically come with #9 (Views Support). That's one of the reasons I'm so interested in seeing views support arrive. :-)
Comment #5
jorditr commentedHi. I would say that "5. PDF print of invoices" could be automatically covered with "Printer, e-mail and PDF versions" (http://drupal.org/project/print) a nice module that adds links for a friendly-printable version of the page, a pdf version and "send email" link.
Comment #6
jorditr commentedIn any case your plans are beutifully awesome!! :-)
Maybe you should publish that list on your site.
Comment #7
KrisBulman commentedi think views support is pretty far down the list for the amount of functionality it will provide
Comment #8
Dubber Dan commentedA good list. Out of those my faves would be:
5. PDF print of invoices
6. Multiple taxes
Support for multiple taxes on invoice items
10. Create some blocks : open projects, latest tickets and so on
14. Dashboard
15. Automatic creation of invoices from time tracking and expense tracking
Is there anything that could be done to help any of the work along?
Comment #9
flickerfly commentedI was just looking over this again. Fun to see this list is progressing. :-)
Comment #10
j4h8 commentedHi,
this is my most important one:
15. Automatic creation of invoices from time tracking
Is there any roadmap for the implementation of the features?
Thanks a lot for a great module!
Comment #11
flickerfly commentedI agree, I'm really looking forward to that also.
Comment #12
steveoliver commentedI can't believe this feature isn't available. It seems crucial to this module. Is there any progress getting Timetracking items into Invoices?
-Steve
Comment #13
Roberto Gerola commented> I can't believe this feature isn't available. It seems crucial to this module. Is there any progress getting Timetracking items into Invoices?
Hi.
Storm is a voluntary project and I work on it in my spare time.
I created it for my personal use and then decided to donate it to the community because
I got and get every day so much from Open Source community that I think should give
something back. But this is not a free development service for every idea or feature posted
on an issue list.
Donation in any form : code, documentation, ideas or money is very welcomed to support the project.
At now I spent on Storm development many months of work and I'll do my best every day to keep it
up.
Thanks, Roberto.
Comment #14
squ1rr3l commentedGreat work, Roberto. This is exactly what I need, and I have been searching for something quite a bit. Thanks for posting this for the community.
I agree with several others here that being able to create an invoice from a list of timetrackings would be the top priority for me. There are a couple of other things that are broken in the "release" version, such as that the PDF report simply produces an error, and the edit form for time trackings will not display (error again). They may be fixed, I haven't checked. If not, I'll open new tickets.
How can I help you with coding? Or would it be more help to work on documentation? I've got experience with Perl, which translates to PHP *sometimes*, but these days I mostly do Java and C#. So I may be more productive with docs. Where do you need help? I guess this is a little off-topic. I'll try to contact you instead when I have some more time.
Thanks again for a great module! Your work is appreciated.
Comment #15
KrisBulman commentedis there no one else contributing code aside from you, Roberto?
Comment #16
Roberto Gerola commentedNo, only me.
A developer donated some code for team member support and I'm integrating it,
but I have to change some parts.
Roberto
Comment #17
JayKayAu commentedHi Roberto,
First, thanks so much for an amazingly useful module!
We're a tiny company who sells services, rather than products, so count us as another vote for #15 Time/Expense Tracking -> Invoices
We're currently using vTiger CRM to keep our data together, but it's a bit big and clunky for our needs, and we've got our fingers crossed that we can use Storm for everything instead...
On behalf of us: Keep going! :D
- Jamil
Comment #18
raintonr commentedI would like to help! :)
Although I don't have much time, do not think much time is required to make this change. A little background - I have worked as a billing specialist in telecoms and ISPs for over 10 years, so this should be something I can do ;)
The problem here is that when one creates an invoiceitem (to use Storm terminology) from another item (expenses or timetracking) one must have a mechanism to prevent changes to the source item and also of course record it has been billed.
This can be done with either a reference on the invoiceitem created or the item being represented.
I would suggest that for ease of code the
storminvoiceitemtable be modified and have asource_nidcolumn adding. For speed of execution in checking for billed items this column should be indexed. It can be null for the times when manual line items need adding. If it this column is non-null than no manual changes to the invoice line should be allowed.Once in place one could modify the storminvoice module to automatically look for unbilled items (expenses and timetracking) prior to the bill cut-off date (usually the date of creation but some users might like to have that on a fixed cycle perhaps) and create line items for them when an invoice is create (time of billing). I found this example of how to programatically create nodes:
http://drupal.org/node/243950
A check should be in place for the expenses and timetracking modules not to let any node be updated if it has been billed (ie. if there is a row in
storminvoiceitemwith thesource_nid= current node).It would probably be fair to say that an invoice node also needs modifying with a status of some kind that is at least 'open' or 'posted'. Once 'posted' this implies the invoice has been sent to the customer and no more line items should be added (although a separate 'dispatched' status might also be useful). Other useful status could be 'paid', 'bad debt', etc. which may be added at a later date.
We could start talking about the need to then include adjustments and other issues, but that would belong in a different module I imagine.
Anyhow - these are just a few thoughts on how the auto-calculation of invoices could be done, anyone agree? I might have a play with trying to set this up if possible. I'd be happy to help directly maintain this module if required and already have CVS access to Drupal.
Comment #19
squ1rr3l commentedraintonr,
I like your ideas! This is a feature that will be very useful, as many items I am manually duplicating (1 timetracking entry, 1 invoice entry). Your comments are very insightful.
I don't think it's necessary to disallow editing of an invoice item, even when it is tied to an expense or timetracking. There may be differences in the way you want to describe the item between tracking it and billing it. There could be a warning or some obvious way to provide hints to the user that it may be out of sync with the source item.
When generating an invoice, and looking for unbilled items to add, I would think you would want to filter the selections certainly by date range, but probably also by organization and/or project name.
Invoices already have status. They at least have "paid" and "overdue", but no user interface for changing them (they are based on due date and whether payment date is entered).
So I agree, but would be very wary of disallowing editing anywhere, at least without including a way to override. I think in most cases, a warning should be sufficient.
Comment #20
raintonr commentedRe: #19
Yes, I agree that filtering on Organisation (the one you are billing - they must be a 'client') and by their projects is a good thing. I would assume one would collect billable, but unbilled items that have a date prior to the cutoff date of the invoice being prepared.
Not sure I completely agree about the lack of edits, but this can be made an option or something ('strict billing' perhaps?). The thing is that many organisations that may want to use Storm will want to have audit trail, etc. for their invoice generation and letting users edit after an invoice is posted would completely break that (perhaps not if node revisions were generated, but doesn't look like they work at the moment).
Well, but as you say, for the rest (who do not have 'strict billing' on) there would be the warning option.
Personally I would also find the ability to generate automatic expenses on a regular basis (weekly, monthly) useful. But let's walk first - that could be added as a separate module later.
Comment #21
alexm-1 commentedWow, this is a long and heated thread. Just wondering if any more work had been done on this since the module maintenance changed hands. One more enthusiastic vote for a means of adding up Timetrackings based on user-reference, project or even task, and a means of importing them into Invoices.
I think the first issue is more important though, the redundancy of manually entering hours into invoices and calculating price wouldn't be so bad if we didn't also have to add up each individual Timetracking over the course of a month, especially since you can't even tell which user is associated with which Timetracking let alone filter based on that.
I've been setting up parallel Views to attempt to compensate for this, but that's another issue altogether since most of the Storm fields can't be displayed through Views. I'm reading through this now (http://drupal.org/node/320801), which will hopefully help with View integration.
Help with any of these issues would be great. Thanks a lot!
Comment #22
Magnity commentedThe quick answer is no - no more work has been done on it, but as I have said for several other issues - its on the list of things to do!
(Plus the usual postscript - patches always welcome - its much quicker to work a patch into the way you'd like it / simply apply it than to code from scratch!)
Comment #23
alexm-1 commentedFor sure, well, I'd be happy to help in any way I can, but programing isn't my strong-suit. Keep up the good work though, I'm sure you're doing your best.
Comment #24
raintonr commentedI really want to develop a patch for this.
Thinking more about it, the patch will should be to the storminvoiceitem module. This should see an invoice node type being created and generate the required invoice items automatically at this time. Does that sound reasonable?
Comment #25
Magnity commentedThanks @raintonr,
There are some major changes coming to the storminvoiceitem module in the latest dev - its being combined into the storminvoice module. However, this shouldn't affect you too much as the functionality will always be present and the tables / content types will be the same (give or take perhaps a _ to keep namespaces consistant).
Changed version to 6.x-1.x-dev as this is where new functionality will be committed.
Comment #26
raintonr commentedAh... merging with invoice will make this easier. When do you think that will be committed?
Comment #27
raintonr commentedThis is a patch against the whole tree, but only the following files are changed:
storm/storminvoice/storminvoice.module
storm/storminvoiceitem/storminvoiceitem.install
storm/storminvoiceitem/storminvoiceitem.module
Clearly it needs a bit of polish but just to give the idea of how this should (erm could?) work.
Comment #28
Magnity commentedRe #26 - it is in progress - partly converted. It will be completed within a week or so depending on my schedule.
Re #27 and patch - seems like a good start. Which branch is it against? It needs to be against DRUPAL-6--1 (the -dev release)
Comment #29
raintonr commentedPatch in #27 was against the 1-Jun dev release.
Comment #30
raintonr commentedStumbled across this just now: http://drupal.org/project/node_factory
Looks like another way to programmatically create nodes (needed to solve this issue) rather than just creating a new node object and populating that. Wonder if there's any advantage to either method?
Comment #31
Magnity commentedThis patch is highly dependant on the invoiceitems module - which is undergoing significant changes - therefore, it will need rerolling after #436922: Combine Storm Invoice & Storm Invoice Item is completed.
Re #30 - Storm nodes have a lot of custom fields, so I suspect that this will need to use the Storm functions themselves to populate.
Comment #32
njacobson commentedOne more BIG vote to automatically pull time tracking into invoices. Because of the "Billable" checkbox on time tracking... I assumed there was some way to generate an invoice from it, but haven't figured it out and after reading this thread - looks like it's on the to-do list. This is a great module... keep it up. Thanks!!!
I'm not a programmer... so I don't know how easy/hard this would be... but if an invoice was created first, could you then just have a checkbox on the time tracking entry to add it to the selected invoice? A little clunky since the invoice would have to be created first, but seems a little easier than figuring out how to 'find' the appropriate timetracking nodes when creating an invoice after-the-fact.
Comment #33
homoludens commentedMaybe it is easier to make, but what is proffered way of doing this?
I'm seeing it like autocompletion/selection/node reference field when creating invoice item with unbilled timetracking entries from the same project. You just select/reference timetracking entry and click "Save".
Is that something that would be practical?
Comment #34
deggertsen commentedInvoices are currently attached to an Organization and optionally a Project and a Reference (On a side note I'd personally prefer to do away with "Reference" and allow you to optionally attach the invoice to a Task and/or a Ticket). So with that already in place this is what I would like to see:
Under the invoice configuration you would set a date for the default time for an invoice to stop collecting timetracking entries (default would be the 1st of the month). This would determine a cutoff for when timetracking items would no longer add to X invoice but would now add to Y invoice. We could call this the 'invoice cutoff date'. The "Request date" should be the same as this cutoff date and therefore allow the admin to decide if the invoice should be sent automatically to the client at this time (This would be dependent on Automatic E-Mail Invoicing), be sent a reminder that the invoice is ready for review, or to do nothing.
Another setting would be for the default smallest parameter for an invoice (i.e. Organization, Project, Task, Ticket). If it was set to Project for example this would tell Storm that if a new task was created it would simply add another item to the invoice created for the Project it is listed under. Or if it is set to Organization then a timetracking item created under that organization would add to that organization's invoice (as long as "billable" is checked for the timetracking). Hopefully that makes sense. I'm going to call this 'invoice grouping'.
Now lets say I have that setting set to Organization and I create a timetracking for task X today. It would create a new invoice item on the Organization's invoice. But say tomorrow I create another timetracking for the same task, it would be nice if rather than create a new invoice item it simply adds to the quantity of the item already in existence. I realize that this may take a lot more work but I feel it would be invaluable for the organizing of an invoice. This would also need to be another setting under the invoice configuration that says what the smallest parameter for invoice items to be grouped under, whether that be project, task, or ticket. I'll call this 'invoice item grouping'.
You wouldn't be able to have 'invoice item grouping' however without the ability to have quantity attached to an invoice item. I definitely think that is something that is necessary. I feel it would be best if you can have fractional quantities just in case you are working with hourly rates (i.e. 5.25 hours).
Hopefully that all makes sense. I don't think my thoughts on this are complete but I'm sure you've already read enough for now.
So to summarize I would like to see the following:
1. Invoice configuration for "Invoice Cut-off Date"
2. Invoice configuration for "Invoice Grouping"
3. Invoice configuration for "Invoice Item Grouping"
4. The ability to add quantity to an Invoice Item.
Thanks for your great work on this! I wish I knew enough programming to help but if $ will help to get this done let me know and I will consider it!
Comment #35
Magnity commentedUpdated patch - haven't tested changes though - will update later on today.
Comment #36
homoludens commentedhaven't tried it yet, just looking through code, and i support idea in this comment:
Comment #37
Magnity commentedJust to clarify what my thoughts are for this:
- A function within Storminvoice that creates an invoice programmatically
- A function within Storminvoice that adds invoice items programmatically
- Functionality within Storm org / project / task / ticket / timetracking, which upon a user can click "Invoice all unbilled items", this bills for any items under that org / project / task / ticket / timetracking that are both billable and haven't already been billed. Perhaps some options here.
- This functionality first creates an invoice, then adds items to it.
- Redirect to show the user the invoice.
- From here, the user can use whatever existing functionality to print / email the invoice.
In terms of the changes to invoice items that @deggertson suggests, i'm happy to put in quantities for invoice items, but will label the other ones (grouping / auto cutoff) as a maybe for now.
Comment #38
Magnity commentedDoes anybody use multiple currencies with one organisation? In order to group items together on one invoice, that invoice will have to be in one currency only. I'm wondering whether it would be simpler to only allow setting of the currency per organization - then inherit from that for the others.
The way I am going about this, the invoice will take info if possible from the timetracking, then from ticket, task, project, organization nodes. However, it is also showing up a few things that need fixing - such as, some nodes do not have tax percent - just tax. It'd be ok to create the invoice, but then could cause issues with editting.
Comment #39
deggertsen commented@Magnity. I love the compromises that you suggest. I think it will work just fine to have a button to "Invoice all unbilled items". Grouping of similar invoice items would be really nice but the whole "Invoice Cut-off Date" and "Invoice Grouping" would not be so necessary if you can just click to add all unbilled items to an invoice. However, I do want to clarify that I think this button should appear after you have created an invoice, in the invoice, so that you are adding the invoice items so that invoice rather than having it simply create a new invoice when you click that button. I would think that this would be easier to program a function for also, but maybe you had a different idea of how it should work that is better?
I do not see why someone would need to have multiple currencies with one organization. It may be nice for someone if you could have multiple currencies for an organization but they could get around it by simply creating a separate organization for each currency the organization takes... Because even if an organization did take more than one currency they would probably need to be billed separately anyway...
Comment #40
Magnity commentedIf an invoice nid is specified, it will add to that invoice, if it is not specified, it will first create one and then add any other items to that invoice too.
I have split off the currency issue so that it can be tracked better for the changelog. It is now #518664: Review Storm's handling of currencies.
Comment #41
Magnity commentedOn the demo site and in -dev from midnight, there is now the basic functionality for this. Consider it beta perhaps.
- From a timetracking, there is a link to add the item to an invoice. For the moment, it requires creating a new invoice.
- The invoice is created, and an item created to represent that timetracking.
- The price is calculated from the timetracking duration multiplied by the hourly rate. For the moment, if the rate is per day, the hourly rate is assumed to be the daily rate divided by 8, but this will likely become a setting. The code attempts to get the hourly rate from the associated ticket, task, project or organization - in that order.
Firstly, please start to play with this, and let me know what you think. Things like the invoice item title for now will probably be set in code, but after #332555: Token support- proof of concept is complete, this could become a setting on a site by site basis.
Secondly, the styling of the links and the wording is very much a placeholder at the moment - I haven't really attempted to make it look nice or fit in with other storm styles at the moment. Feedback on good phrases is welcome.
Once i've had a few reviews of this, i'll add the support for billing for entire organizations, projects, tasks etc., which will build on this basic functionality.
Comment #42
Magnity commentedThe functionality for adding timetrackings to existing invoices has now been added in as well - next step is to extend to allow other types of node to be billed.
Please do all test out the dev release...
Thanks,
Comment #43
ore commentedseems the invoice creation is broken on my dev version.
i suspect invoices are getting created with the incorrect request date and thus not appearing in any results. will try and fix tonight if i get a chance.
Comment #44
ore commentedturns out the install file doesnt update an existing installation with two columns in the invoice table.
add
tax1app, tax1percent as floats to your invoice table and your good to go.
cheers
mike
Comment #45
Magnity commentedAlthough that database query is where the problem lies - we actually don't need those columns in the invoice table. I think i had meant to add them to the invoiceitems table.
Nevertheless, the changes you need are:
http://drupal.org/cvs?commit=243246
http://drupal.org/cvs?commit=243244
The next -dev version will contain these fixes.
Comment #46
xmacinfoAs this been reported?
When the invoice module is disabled timetracking does not look to see if the invoice module is enabled.
I would not expect to see this when the invoice module is not enabled:
However we should still need to track if a timesheet is billable or not, even if the invoice module is not enabled. This is what we do with our installation of STORM.
Comment #47
Magnity commentedThanks for that - i've made the change only to display those options when Storm Invoice is enabled.
Re the billable option - I think this is still possible?
Comment #48
Mark_Watson27 commentedNot being picky but...shouldn't you also check for permission to add to invoices prior to showing the icon?
i.e.
Comment #49
xmacinfoI hope that showing the "billable" check box being still possible, even if the invoice module is disabled. ;-)
Comment #50
Magnity commentedRe #48 - yes indeed. I've just changed that.
Re #49 - the billable check box should still appear regardless of this feature and/or the storminvoice module being enabled/disabled. Are you finding it any different?
Comment #51
deggertsen commentedSorry it has been so long since I've been involved. Life gets hectic sometimes...
I've been playing with the most recent Dev version and stable release and I'm trying to figure out what has actually changed... I don't see anything that allows me to add a timetracking to an invoice as mentioned above. I do see the billable checkbox still but it doesn't seem to do anything. Did I download the wrong version? I'm using 6.x-1.x-dev downloaded today (Sept 3rd). I assume I don't have to apply the patch in #35 but am I wrong?
Comment #52
Mark_Watson27 commented@deggertsen: When you view a timetracking you should see two 'Invoice this item' links on the right hand side, do you not see these?
Comment #53
deggertsen commented@Mark_Watson27: I found it. For some reason I expected it to be there when you edit/create the timetracking. Not in the view. It looks like it's working fine. Thanks for pointing out my stupidity ;).
As far as I'm concerned it looks like getting Timetracking Items to go into invoices is now good. Next step as far as this goes is here #567558: Extend auto-billing to other types of Storm node
Comment #54
Magnity commentedAs you've seen, i've broken the remaining items down into:
- #567550: Allow quantities for invoice items
- #567558: Extend auto-billing to other types of Storm node
Plus there was already: #560832: timetrack record invoice status
I think these cover the remaining tasks, so i am closing out this issue so that each part can be dealt with separately.