BambooInvoice Forums

Email subject - how do I include name of Client

 
Total Posts: 7

I would like to include the name of the client in the email subject. Right now the subject says “Email 1”. I would like it to say “Email 1 Client [Name]. What do I need to change in the script?

Thanks.

Total Posts: 7

I’m sorry, it says “Invoice [Number]”. I want it to say Invoice [Number] Client [Name].

Total Posts: 36

Look in
bamboo_system_files/application/controllers/invoices.php around line 680
I’ve altered mine a bit so look around there and you’ll find it.

Total Posts: 7

OK, here are the two lines that appear to have some effect:

$this->email->from($data[‘companyInfo’]->primary_contact_email, $data[‘companyInfo’]->primary_contact);
$this->email->subject($this->lang->line(‘invoice_invoice’).” $invoice_number : “.$data[‘companyInfo’]->company_name);

My problem is that I have no idea how to modify because I don’t know this language. Could you please send me the modified line so when the email with the PDF arrives it will have a subject line with the invoice number and the client name? I need this so my bookkeeper and I can keep straight which invoice belongs to which client in our email filing system.

Thanks.

Total Posts: 36

backup your original file and try this changed line. I’ve only done a quick test so you test and report back.
$this->email->subject($this->lang->line(‘invoice_invoice’).” $invoice_number : “.$this->clientcontacts_model->getContactInfo($recipient)->first_name.’ ‘.$this->clientcontacts_model->getContactInfo($recipient)->last_name);

If that doesn’t work I may hve to send you the whole php file because I’m not sure if this forum screws the code when pasted in here.

Total Posts: 7

I am sorry to report that it did not work. I got an error message. If you would be kind enough to send your entire file I would be most appreciative. My email address is [NOT HERE]

Thank you.

Total Posts: 36

It would pay to get rid of your email address out of here before the spam bots get it.
File attached.
That puts the recipients name in there too not the company name because I was getting errors with company name for some reason and don’t really have the time to keep looking.
Cheers
Felix

File Attachments
invoices.zip  (File Size: 7KB - Downloads: 30)
Total Posts: 36

Actually scratch that last one I realised what I was doing wrong with getting company name in straight after posting that. :)

File Attachments
invoices.zip  (File Size: 7KB - Downloads: 40)
Total Posts: 7

Thank you. That works and the info in the subject line helps a lot.

Total Posts: 7

By the way, here’s the link to the online hometown local newspaper I have created, which is why I needed the fix in invoices.php. We are selling a good many ads.

http://beauforttribune.com