diff --git a/models/line_item.php b/models/line_item.php index 2d8e7255..70e3a798 100644 --- a/models/line_item.php +++ b/models/line_item.php @@ -20,6 +20,7 @@ class LineItem extends AppModel { var $belongsTo = array( 'Quote' => array('className' => 'Quote', 'foreignKey' => 'quote_id', + 'counterCache' => true, 'conditions' => '', 'fields' => '', 'order' => '' @@ -42,7 +43,7 @@ class LineItem extends AppModel { - var $order = "item_number ASC"; + var $order = "LineItem.item_number ASC"; } ?> \ No newline at end of file diff --git a/views/quotes/view.ctp b/views/quotes/view.ctp index 1160e4b4..d2f04606 100755 --- a/views/quotes/view.ctp +++ b/views/quotes/view.ctp @@ -57,7 +57,7 @@ foreach ($quote['QuotePage'] as $quotePage):
-

+

diff --git a/webroot/js/autocomplete-customer.js b/webroot/js/autocomplete-customer.js index 6425ba36..2c46558d 100644 --- a/webroot/js/autocomplete-customer.js +++ b/webroot/js/autocomplete-customer.js @@ -9,11 +9,15 @@ $(function() { + + $("#customerName").autocomplete({ source: "/customers/completeCustomer", minLength: 1 }); + + $("#CustomerCountryName").autocomplete({