More tidying in Quotes controller
This commit is contained in:
parent
a66004025d
commit
0a6f3dbc4e
|
|
@ -11,29 +11,6 @@ class QuotesController extends AppController {
|
||||||
$this->set('quotes', $this->paginate());
|
$this->set('quotes', $this->paginate());
|
||||||
}
|
}
|
||||||
|
|
||||||
function view($id = null) {
|
|
||||||
if (!$id) {
|
|
||||||
$this->Session->setFlash(__('Invalid Quote.', true));
|
|
||||||
$this->redirect(array('action'=>'index'));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($this->data)) {
|
|
||||||
$quote = $this->Quote->read(null, $id);
|
|
||||||
$this->data = $quote;
|
|
||||||
$this->set('quote', $quote);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$this->set('customer', $this->Quote->Enquiry->Customer->read(null, $quote['Enquiry']['customer_id']));
|
|
||||||
|
|
||||||
$currencies = $this->Quote->Currency->find('list');
|
|
||||||
$this->set('currencies', $currencies);
|
|
||||||
|
|
||||||
$this->set('principles', $this->Quote->Enquiry->Principle->find('list'));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function ajax_edit() {
|
function ajax_edit() {
|
||||||
$this->layout = 'ajax';
|
$this->layout = 'ajax';
|
||||||
if(!empty($this->data)) {
|
if(!empty($this->data)) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue