Hopefully fixed the dodgy subject
This commit is contained in:
parent
4284e0c0f8
commit
cbea64ec75
|
|
@ -663,28 +663,28 @@ class DocumentsController extends AppController {
|
|||
$this->Email->cc = array($enquiry['User']['email']);
|
||||
$this->Email->bcc = array('carpis@cmctechnologies.com.au');
|
||||
|
||||
$this->Email->subject = $enquiry['Enquiry']['title'].' ';
|
||||
$this->Email->replyTo = $enquiry['User']['email'];
|
||||
$this->Email->from = 'CMC Technologies - Sales <sales@cmctechnologies.com.au>';
|
||||
|
||||
$docType = $this->Document->getDocType($document);
|
||||
|
||||
$template = $docType.'_email';
|
||||
$subject = $enquiry['Enquiry']['title'].' ';
|
||||
|
||||
switch($docType) {
|
||||
case 'quote':
|
||||
$this->Email->subject .= " Quotation"
|
||||
break;
|
||||
case 'invoice':
|
||||
$this->Email->subject .= " Invoice"
|
||||
$subject .= " Invoice"
|
||||
$this->set('invoice', $this->Document->Invoice->find('first', array('conditions'=>array('Invoice.id'=>$document['Invoice']['id']))));
|
||||
break;
|
||||
case 'purchaseOrder':
|
||||
$this->Email->subject .= " Purchase Order"
|
||||
$subject .= " Purchase Order"
|
||||
$this->set('job', $this->Document->PurchaseOrder->Job->find('first', array('conditions'=>array('Job.id'=>$document['OrderAcknowledgement']['job_id']))));
|
||||
break;
|
||||
case 'orderAck':
|
||||
$this->Email->subject .= " Order Acknowledgement"
|
||||
$subject .= " Order Acknowledgement"
|
||||
$this->set('job', $this->Document->OrderAcknowledgement->Job->find('first', array('conditions'=>array('Job.id'=>$document['OrderAcknowledgement']['job_id']))));
|
||||
if ($document['OrderAcknowledgement']['signature_required']) {
|
||||
$template = 'OrderAck_email_signature_required';
|
||||
|
|
@ -693,6 +693,7 @@ class DocumentsController extends AppController {
|
|||
|
||||
|
||||
$this->Email->template = $template;
|
||||
$this->Email->subject = $subject;
|
||||
|
||||
|
||||
$this->Email->sendAs = 'both';
|
||||
|
|
|
|||
Loading…
Reference in a new issue