diff --git a/controllers/quotes_controller.php b/controllers/quotes_controller.php index 43ce9e5b..522d7ae5 100755 --- a/controllers/quotes_controller.php +++ b/controllers/quotes_controller.php @@ -51,43 +51,6 @@ class QuotesController extends AppController { } - - function add() { - - if(isset($this->params['named']['enquiryid'])) { - $enquiryid = $this->params['named']['enquiryid']; - $this->Quote->create(); - $number_of_revisions = $this->Quote->findCount('Quote.enquiry_id ='. $enquiryid); - $this->data['Quote']['revision'] = $number_of_revisions; - $this->data['Quote']['enquiry_id'] = $enquiryid; - $this->data['Quote']['date_issued'] = date('Y-m-d'); - - $this->data['Quote']['currency_id'] = 2; - - - if ($this->Quote->save($this->data)) { - - $quoteid = $this->Quote->id; - //$this->data['Document'][''] - - - $this->Session->setFlash(__('The Quote has been saved', true)); - $this->redirect(array('action'=>'view/'.$quoteid)); - } - else { - $this->Session->setFlash(__('The Quote was not saved. Something has gone wrong.', true)); - $this->redirect(array('action'=>'index')); - } - } - else { - $this->Session->setFlash(__('Invalid Enquiry ID', true)); - $this->redirect(array('controller'=>'enquiries','action'=>'index')); - } - - } - - - function edit($id = null) { $this->layout = 'ajax'; diff --git a/views/quotes/add.ctp b/views/quotes/add.ctp deleted file mode 100755 index 763f2544..00000000 --- a/views/quotes/add.ctp +++ /dev/null @@ -1,32 +0,0 @@ -
-create('Quote');?> -
- - input('enquiry_id'); - echo $form->input('currency_id'); - echo $form->input('revision'); - echo $form->input('delivery_time'); - echo $form->input('payment_terms'); - echo $form->input('days_valid'); - echo $form->input('date_issued'); - echo $form->input('valid_until'); - echo $form->input('delivery_point'); - echo $form->input('exchange_rate'); - echo $form->input('customs_duty'); - echo $form->input('document_id'); - ?> -
-end('Submit');?> -
-
- -
diff --git a/views/quotes/view.ctp b/views/quotes/view.ctp deleted file mode 100755 index 9cf125b3..00000000 --- a/views/quotes/view.ctp +++ /dev/null @@ -1,82 +0,0 @@ -
-

Quote: link($quote['Enquiry']['title'], array('controller' => 'enquiries', 'action' => 'view', $quote['Enquiry']['id'])); ?> Rev

-
- > - > - -   - - > - > - -   - - > - > - link($quote['Currency']['name'], array('controller' => 'currencies', 'action' => 'view', $quote['Currency']['id'])); ?> -   - - > - > - -   - - > - > - -   - - > - > - -   - - > - > - -   - - > - > - -   - - > - > - -   - - > - > - -   - - > - > - -   - - > - > - link($quote['Document']['id'], array('controller' => 'documents', 'action' => 'view', $quote['Document']['id'])); ?> -   - -
-
-
- -
- - - \ No newline at end of file diff --git a/views/quotes/view.ctpOLD b/views/quotes/view.ctpOLD deleted file mode 100755 index 11fdbe05..00000000 --- a/views/quotes/view.ctpOLD +++ /dev/null @@ -1,221 +0,0 @@ -
-

- -
- > - > - nice($quote['Quote']['created']); ?> -   - - - > - > - nice($quote['Quote']['modified']); ?> -   - - > - > - link($quote['Enquiry']['title'], array('controller'=> 'enquiries', 'action'=>'view', $quote['Enquiry']['id'])); ?> -   - - > - > - -   - - > - > - -   - - > - > - -   - - > - > - -   - - > - > - -   - -
-
-
- -
- - -
-
- - - - - - - - - - -
- -
- - - - - - -