1 (edited by shive9jai 01/24/2013 09:36:06 am)

Topic: How to send auto email after direct invoice

Hi,

I want that whenever a direct invoice submitted an email will send automatically to customer without clicking on email link.
Please tellme how to do that.

I also want to send invoice amount and customer current balance as a html text along with " Attached you will find  Invoice No. # " text.

Thanks ..

or

I have created a table named "balace_report in database which contains customer id no, name and their balance ( column names are id,name,balance)

I want balance field to be with "Attached you will find  Invoice No" in email

I found the file "pfdr_eport.inc" which contains code what to send in email. please tell me how send balance coloumn.

Re: How to send auto email after direct invoice

Can have a cronjob to do it.

Re: How to send auto email after direct invoice

Pls tell me how to do that or which code(link) i should add in cron jobs.

Re: How to send auto email after direct invoice

Line 1000-1001 in file reporting/includes/pdf_report.inc has the necessary code you want to modify.

                        $msg = _("Dear") . " " . $contact['name2'] . ",\n\n" 
                            . _("Attached you will find ") . " " . $subject ."\n\n";

Re: How to send auto email after direct invoice

Which code i need to add for sending total invoice amount please tell me the code.

6 (edited by apmuthu 02/13/2013 11:13:03 am)

Re: How to send auto email after direct invoice

Each Report will have different variables. The pdf_report.inc file is used for all reports. You must use the variable from the repXXX.php file you want after checking that it is the report being generated before inserting into the $msg string.

Actually, in such instances, a html email or plain text email can be an option for the reports along with PDF/Excel.

Re: How to send auto email after direct invoice

Hi actually i am not good in php. But pls help me that how can default email will be send automatically after any invoice without clicking on email link.
Pls tell me the exact code and where i need to place that or any other process pls tell me in detail i am not a developer.

I just want to send email automatically after every invoice.

Re: How to send auto email after direct invoice

Hi,

I have done the $msg part i have just replace the "" $subject "" to "" $this->formData['document_amount'] "" and got the invoice amount instead of subject now i will design the mail text.

Now pls tell me how to automatically send this email pls tell me pls...............

Re: How to send auto email after direct invoice

I can't help you on how to automatically send the mail, but just wanted to remind you...  don't forget to save a backup copy of any file(s) you change.  Otherwise, your change(s) will get overwritten if you do an update and those files are effected and you'll have to redo all the changes.

Regards,

Chris

Re: How to send auto email after direct invoice

you also might want to change line 1006 to
$msg = _("Dear") . " " . $contact['name'] . ",\n\n"