diff --git a/controllers/enquiries_controller.php b/controllers/enquiries_controller.php index 42afad31..218bd734 100755 --- a/controllers/enquiries_controller.php +++ b/controllers/enquiries_controller.php @@ -94,7 +94,7 @@ class EnquiriesController extends AppController { if ($this->Enquiry->save($this->data)) { $id = $this->Enquiry->id; if($this->data['Enquiry']['send_enquiry_email'] == 1) { - $this->__addToQueue($id); + $this->__sendNewEnquiryEmail($id); //Will change this to be the queue at some point. } else { $this->Session->setFlash(__('The Enquiry has been saved but the Contact has NOT been emailed, as you requested.', true)); diff --git a/controllers/products_controller.php b/controllers/products_controller.php index ca1a7367..9d7643a1 100755 --- a/controllers/products_controller.php +++ b/controllers/products_controller.php @@ -26,13 +26,19 @@ class ProductsController extends AppController { if ($this->Product->save($this->data)) { $this->Session->setFlash(__('The Product has been saved', true)); - $this->redirect(array('action'=>'index')); + $id = $this->Product->id; + $this->redirect(array('action'=>'view/'.$id)); } else { $this->Session->setFlash(__('The Product could not be saved. Please, try again.', true)); } } $principles = $this->Product->Principle->find('list'); - $this->set(compact('principles')); + $product_categories = $this->Product->ProductCategory->find('list'); + $this->set(compact('principles', 'product_categories')); + } + + function add_costing() { + } function edit($id = null) { diff --git a/views/elements/enquiry_table.ctp b/views/elements/enquiry_table.ctp index 9ded6d7a..118d2d92 100644 --- a/views/elements/enquiry_table.ctp +++ b/views/elements/enquiry_table.ctp @@ -118,7 +118,7 @@ foreach ($enquiries as $enquiry): } ?> - + link(__('View', true), array('controller'=>'enquiries','action'=>'view', $enquiry['Enquiry']['id'])); ?> link(__('Edit', true), array('controller'=>'enquiries','action'=>'edit', $enquiry['Enquiry']['id'])); ?> diff --git a/views/enquiries/edit.ctp b/views/enquiries/edit.ctp index d98f1f8c..3b6b1696 100755 --- a/views/enquiries/edit.ctp +++ b/views/enquiries/edit.ctp @@ -17,7 +17,7 @@ echo $form->input('billing_address_id', array('div' => 'addressradio', 'legend' => 'Billing Address', 'options' => $billing_addresses_list, 'type' => 'radio')); echo $form->input('shipping_address_id', array('div' => 'addressradio','legend' => 'Shipping Address', 'options' => $shipping_addresses_list, 'type' => 'radio')); echo $form->input('status_id'); - echo $form->input('comments', array('id'=>'comments')); + echo $form->input('comments', array('id'=>'comments', 'wrap'=>'hard')); ?> ');" value="Edit Comments" class="dateButton" id="datebutton"/>

CMC Technologies

-
+
link('Login', '/users/login'); @@ -102,9 +102,9 @@ if (window.attachEvent) window.attachEvent("onload", sfHover); -
  • link('Products', '/products/index'); ?>

    +
  • link('Products', '/product_categories/index'); ?>

      -
    • link('Product Index', '/products/index'); ?>
    • +
    • link('Product Index', '/product_categories/index'); ?>
    • link('Add Product', '/products/add'); ?>
  • diff --git a/views/products/add.ctp b/views/products/add.ctp index 773d8ab2..c6368905 100755 --- a/views/products/add.ctp +++ b/views/products/add.ctp @@ -10,38 +10,9 @@ echo $form->input('title'); echo $form->input('description'); echo $form->input('part_number'); - echo $form->input('exchange_rate', array('id'=>'exchange_rate')); - echo $form->input('cost_price_each', array('id'=>'costprice')); - echo $form->input('our_discount', array('label'=>'Our Discount %', 'id' => 'ourdiscount')); - echo $form->input('packing_each', array('id'=>'packing')); - echo '
    '; - echo $form->label('fob_country_of_export', 'F.O.B Country of Export'); - echo $form->text('fob_country_of_export', array('readonly'=>'readonly', 'id'=>'fob_country_of_export')); - echo '
    '; - echo '
    '; - echo $form->label('convert_to_aud', 'Convert to A$'); - echo $form->text('convert_to_aud', array('readonly'=>'readonly', 'id'=>'convert_to_aud')); - echo '
    '; - - echo $form->input('duty', array('label' => 'Duty %', 'id'=>'duty')); - echo $form->input('shipping_weight_each', array('id'=>'shippingweight_each')); - echo $form->input('shipping_cost_each', array('id'=>'shippingcost_each')); - echo $form->input('customs', array('id'=>'customs')); - echo $form->input('misc_cost', array('label' => 'Misc. Costs', 'id'=>'misc_cost')); - echo $form->input('finance', array('label' => 'Finance %', 'id'=>'finance', 'after'=>'

    ')); - - echo '
    '; - echo $form->label('total_landed_cost', 'Total Landed Cost'); - echo $form->text('total_landed_cost', array('readonly'=>'readonly', 'id'=>'total_landed_cost')); - echo '
    '; - echo $form->input('sellprice_each', array('label' => 'Sell Price Each', 'id'=>'sellprice_each')); - echo '
    '; - echo $form->label('gross_profit_dollars', 'Gross Profit $'); - echo $form->text('gross_profit_dollars', array('readonly'=>'readonly', 'id'=>'gross_profit_dollars')); - echo '
    '; - echo '
    '; - echo $form->label('gross_profit_percent', 'Gross Profit %'); - echo $form->text('gross_profit_prercent', array('readonly'=>'readonly', 'id'=>'gross_profit_percent')); + echo $form->input('product_category_id'); + echo $ajax->link('Enter Costing Info', array('controller'=> 'products', 'action' => 'add_costing'), array( 'update' => 'costingdetails')); + echo '
    '; echo '
    '; echo $form->input('notes'); echo $ajax->observeForm('productaddform', array('frequency' => 0.5, 'complete'=>'buildup()')); diff --git a/webroot/css/quotenik.css b/webroot/css/quotenik.css index 5a82f413..5d6412e3 100755 --- a/webroot/css/quotenik.css +++ b/webroot/css/quotenik.css @@ -428,8 +428,12 @@ table.mer tr td.contactname { padding: 0; font-size: small; } +table.mer tr td.viewedit { + padding: 0; + font-size: x-small; + white-space: nowrap; +} - table.quotetable tr.mostrecent td { background: #ADD8E6; } diff --git a/webroot/img/system-search.png b/webroot/img/system-search.png new file mode 100644 index 00000000..950d792a Binary files /dev/null and b/webroot/img/system-search.png differ