I would absolutely love to see a button you can click that automatically sends the invoice to the customer. It would take a lot of steps out the process.

Currently I have to create the invoice, download it to my pc, create an email to the customer, attach the invoice, and click send.

A new feature in storm could consolidate that down to create the invoice, then click send.

Comments

Magnity’s picture

Do I understand that you mean emailling the pdf version with covering note rather than plain text invoice?

Good idea.

ryanmnly’s picture

Yes, I think that's what I mean. Click a button and boom, the e-mailed invoice goes out. Is there a way to send a plain text one already? I'd prefer the PDF still, but I didn't see an actual "e-mail" button. Only buttons to download it.

Magnity’s picture

To clarify, there isn't a way of sending an automated plain text one at the moment - I was simply making sure I knew what you were suggesting!

ryanmnly’s picture

The STORM module is excellent. I am extremely happy with it. I have used full blown CRMs in the past and they are so cumbersome that they end up wasting time.

Yes, the e-mail invoice option would be awesome! I was also going to hire someone to build a module that can send out quotes to potential customers. However, after running across STORM, I would rather fund it as a part of this project rather than separate. Is this something I can do?

ryanmnly’s picture

The STORM module is excellent. I am extremely happy with it. I have used full blown CRMs in the past and they are so cumbersome that they end up wasting time.

Yes, the e-mail invoice option would be awesome! I was also going to hire someone to build a module that can send out quotes to potential customers. However, after running across STORM, I would rather fund it as a part of this project rather than separate. Is this something I can do?

Magnity’s picture

I'd be willing to do paid development for Storm (the difference from standard development being that it would be on features agreed with the person putting up the funds, and at an agreed timescale rather than an as and when).

We should also offer this to Roberto Gerola (the original author) although I know he has a lot on so may not have time.

The way you should go about this is to make sure that the features you'd like are requested in issues - then to create one issue soley regarding the paid development and linking to the ones that you'd like solved. This may also encourage others to chipin if they are for the same cause.

JayKayAu’s picture

Component: User interface » Storm Invoices

This feature would be fantastically useful!

We'd love to use this in a PDF + Cover Letter fashion as well. It would be useful if the cover letter could be defined by the user once, and then the recipient's details automatically merged in.

I wish I was further up the learning curve to give you a hand on this..

- J

pareen’s picture

subscribing

homoludens’s picture

this doesn't look like to difficult and is very useful. i will try to make it.

only thing that i'm not sure how to start is how to generate pdf as file without browser, wget, curl,... if someone has idea how and if it's possible, please write. (i didn't look at tcpdf lib at all, so maybe it is very simple?)
EDIT: it is very simple to output it as file.

@Magnity: or you are already working on this?

Magnity’s picture

I haven't started on this yet.

On the pdf invoice - it can be called from a web address - so i was hoping it would be possible to attach that to an email.

homoludens’s picture

i have added link for sending email and i'm can make pdf as file in files/storminvoice directory. right now i'm making part with email sending. and i have some questions:

1. should there be some custom text that goes to client, or (i'm toward for this one) should every invoice has it's own field for email text (cover note)?

2. where should i put text field for cover note:
- it seams, to me, that nice place for cover note is when you are creating/editing invoice so it would be in invoice form. (this is also easier/faster solution for me and user)

- or, it's maybe better to open new form after clicking "Send email" link, with subject and body fields?

EDIT:
3. should this pdfs be only temporary or permanent? right now i think that temporary is enough.

Magnity’s picture

Do we actually have to store the pdf? Surely when it is generated dynamically, it is virtually there anyway?

1) I'd agree. Perhaps a default setting, and 2) the chance to edit this after clicking "Send email"?

homoludens’s picture

storing of pdf may be needed - cause when i send pdf invoice to customer - i need copy of it - so if by accident i change some invoice item - i have history of what mine customer really got.
but right now i'm thinking that better solution would be to add mine/users email address to Bcc field - so it will be backuped in mine inbox.

current idea for cover note is:
- there is default one, configurable in admin section
- that one goes to editable text area after clicking "Send invoice"

Magnity’s picture

But on storing the pdf within the filesystem - that can create a new raft of security problems, as accessing those files wouldn't necessarily go via the Drupal code. I'm for the CC/BCC option.

homoludens’s picture

StatusFileSize
new18.21 KB

here is patch for sending email with pdf of invoice as attachment.

i have added link "Send PDF via e-mail" on invoice page, which leads to page for reviewing of email to be sent.
default subject and body of cover note can be configured at admin section.

please review.

there is one thing i don't like about it: i have almost totally copied code for function which generates pdf file because i couldn't make the same function work for both types of creation without modifying to much of other code. and since this is a new function with a lot of new code i believe it is better to have it "separated" a little until it is tested enough.

homoludens’s picture

Assigned: Unassigned » homoludens
Status: Active » Needs review

forgot to change status.

Magnity’s picture

Status: Needs review » Needs work

The icon appears on the invoice successfully - but then after clicking I'm getting the a blank white screen...

homoludens’s picture

i will check it out, but to b on the safe side: have you cleared the chache?

i have noticed thath when registering new path (which is case here) cache needs to be cleared,

Magnity’s picture

Component: Storm Invoices » Storm Invoice

Yes - I should have cleared the cache.

Some points:
- I really don't like the way that a pdf is stored in the filesystem prior to sending. I'd say this is a security risk.
- Send to states that it can be on multiple lines but is a single line text box
- Subject and covernotes should have defaults, but these could be sorted out later.

Is there a particular reason why the tcpdf function has to be replicated? Can the page not call the pdf from /storm/invoice/report/%/pdf/% ?

homoludens’s picture

1. i don't like it either. file is made the moment the form is showed - and deleted when it is sent. so it will not be deleted if you don't send the form. Plus, i don't think it is good idea to write and read form files if you don't have to.
it is possible, and i have some code, will try to make patch.

2. Mistake. Will change description.

3. Yes, it would be nice to have some nice default text for cover letter, so if someone has some nice text you can post here.

I have replicated tcpdf function so I wouldn't have to change to much code from original one and the rest of the modue before this feature becomes stable. This way sending email is somewhat isolated from the rest of the module. It will be easy to merge it latter, when we work out all problems and test it enough. Does this make some sense?

homoludens’s picture

StatusFileSize
new18.12 KB

Here is new patch with corrected description for text field and it does not create file.

homoludens’s picture

Status: Needs work » Needs review
Magnity’s picture

Status: Needs review » Fixed

Committed.
http://drupal.org/cvs?commit=233774

There are still a few niggles which it'd be good to sort sometime - such as the duplication of the pdf generation function, but these can be sorted out as separate issues.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.