From b57b353c4097d2018cc988ff5ade28f6814eeb83 Mon Sep 17 00:00:00 2001 From: Karl Cordes Date: Fri, 27 Mar 2009 12:26:36 +1100 Subject: [PATCH] Reverted from Email Queue to just sending the email straight away. May fix this later --- controllers/enquiries_controller.php | 2 +- controllers/products_controller.php | 10 ++++++-- views/elements/enquiry_table.ctp | 2 +- views/enquiries/edit.ctp | 2 +- views/layouts/default.ctp | 6 ++--- views/products/add.ctp | 35 +++------------------------ webroot/css/quotenik.css | 6 ++++- webroot/img/system-search.png | Bin 0 -> 2215 bytes 8 files changed, 22 insertions(+), 41 deletions(-) create mode 100644 webroot/img/system-search.png 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 0000000000000000000000000000000000000000..950d792af54b114e3ba6ea4cc39577aea7fb71e5 GIT binary patch literal 2215 zcmV;Y2w3-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