Fixing invoice emails
This commit is contained in:
parent
0d2e7e9577
commit
7b0e958f70
|
|
@ -669,6 +669,19 @@ class DocumentsController extends AppController {
|
||||||
|
|
||||||
$docType = $this->Document->getDocType($document);
|
$docType = $this->Document->getDocType($document);
|
||||||
|
|
||||||
|
switch($docType) {
|
||||||
|
case 'quote':
|
||||||
|
break;
|
||||||
|
case 'invoice':
|
||||||
|
$this->set('invoice', $this->Document->Invoice->find('first', array('conditions'=>array('Invoice.id'=>$document['Invoice']['id']))));
|
||||||
|
break;
|
||||||
|
case 'purchaseOrder':
|
||||||
|
break;
|
||||||
|
case 'orderAck':
|
||||||
|
$this->set('job', $this->Document->OrderAcknowledgement->Job->find('first', array('conditions'=>array('Job.id'=>$document['OrderAcknowledgement']['job_id']))));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$template = $docType.'_email';
|
$template = $docType.'_email';
|
||||||
$this->Email->template = $template;
|
$this->Email->template = $template;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue