Automatic E-Mail Invoicing

ryanmnly - May 1, 2009 - 05:27
Project:Storm
Version:6.x-1.x-dev
Component:Storm Invoice
Category:feature request
Priority:normal
Assigned:homoludens
Status:closed
Description

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.

#1

Magnity - May 1, 2009 - 09:36

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

Good idea.

#2

ryanmnly - May 1, 2009 - 15:50

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.

#3

Magnity - May 1, 2009 - 18:31

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!

#4

ryanmnly - May 4, 2009 - 17:49

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?

#5

ryanmnly - May 4, 2009 - 17:50

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?

#6

Magnity - May 4, 2009 - 18:34

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.

#7

JayKayAu - May 19, 2009 - 08:25
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

#8

pareen - June 23, 2009 - 06:26

subscribing

#9

homoludens - June 30, 2009 - 02:07

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?

#10

Magnity - June 30, 2009 - 10:04

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.

#11

homoludens - June 30, 2009 - 18:03

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.

#12

Magnity - June 30, 2009 - 20:54

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"?

#13

homoludens - July 1, 2009 - 01:39

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"

#14

Magnity - July 1, 2009 - 09:45

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.

#15

homoludens - July 2, 2009 - 00:37

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.

AttachmentSize
storminvoice_send_email.patch 18.21 KB

#16

homoludens - July 2, 2009 - 00:38
Assigned to:Anonymous» homoludens
Status:active» needs review

forgot to change status.

#17

Magnity - July 2, 2009 - 09:17
Status:needs review» needs work

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

#18

homoludens - July 2, 2009 - 11:22

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,

#19

Magnity - July 3, 2009 - 21:02
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/% ?

#20

homoludens - July 5, 2009 - 02:04

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?

#21

homoludens - July 5, 2009 - 02:15

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

AttachmentSize
storminvoice_send_email_nofile.patch 18.12 KB

#22

homoludens - July 5, 2009 - 12:17
Status:needs work» needs review

#23

Magnity - July 5, 2009 - 14:51
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.

#24

System Message - July 19, 2009 - 15:00
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.