diff --git a/module/product/control.php b/module/product/control.php index 27c3e8c04e..0abd2df670 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -586,12 +586,20 @@ class product extends control $rdUsers = $this->user->getPairs('nodeleted|devfirst', $appendRdUsers); if(!empty($this->config->user->moreLink)) $this->config->moreLinks["RD"] = $this->config->user->moreLink; - /* Get product lines by programs.*/ - $programs = $this->program->getTopPairs(); - $lines = array(); - foreach($programs as $id => $program) + $programs = array(); + if($this->config->systemMode == 'new') { - $lines[$id] = array('') + $this->product->getLinePairs($id); + /* Get product lines by programs.*/ + $programs = $this->program->getTopPairs(); + $lines = array(0 => ''); + foreach($programs as $id => $program) + { + $lines[$id] = array('') + $this->product->getLinePairs($id); + } + } + else + { + $lines = array('') + $this->product->getLinePairs(); } $this->view->title = $this->lang->product->batchEdit; @@ -603,7 +611,7 @@ class product extends control $this->view->qdUsers = $qdUsers; $this->view->rdUsers = $rdUsers; $this->view->programID = $programID; - $this->view->programs = array('') + $programs; + $this->view->programs = array('' => '') + $programs; unset($this->lang->product->typeList['']); $this->display(); @@ -949,7 +957,7 @@ class product extends control $lines = array(); if(empty($productID) or $programID) $lines = $this->product->getLinePairs($programID); - if($productID) die(html::select("lines[$productID]", array('' => '') + $lines, '', "class='form-control chosen'")); + if($productID) die(html::select("lines[$productID]", array('' => '') + $lines, '', "class='form-control picker-select'")); if(!$productID) die(html::select('line', array('' => '') + $lines, '', "class='form-control chosen'")); } diff --git a/module/product/js/batchedit.js b/module/product/js/batchedit.js index f5e929189b..7349ccdd1a 100644 --- a/module/product/js/batchedit.js +++ b/module/product/js/batchedit.js @@ -24,6 +24,6 @@ function loadProductLines(programID, productID) var link = createLink('product', 'ajaxGetLine', 'programID=' + programID + '&productID=' + productID); $('#line_' + productID).load(link, function() { - $('#lines' + productID).chosen(); + $('#lines' + productID).picker(); }); } diff --git a/module/product/model.php b/module/product/model.php index 153889d8de..33f27fcb2b 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -657,7 +657,7 @@ class productModel extends model $productID = (int)$productID; $products[$productID] = new stdClass(); - $products[$productID]->program = $data->programs[$productID]; + if($this->config->systemMode == 'new') $products[$productID]->program = $data->programs[$productID]; $products[$productID]->name = $productName; $products[$productID]->line = (int)$data->lines[$productID]; $products[$productID]->PO = $data->POs[$productID]; diff --git a/module/product/view/batchedit.html.php b/module/product/view/batchedit.html.php index 3c4716187e..8ada335cef 100755 --- a/module/product/view/batchedit.html.php +++ b/module/product/view/batchedit.html.php @@ -52,7 +52,9 @@ $full = ''; } ?> + config->systemMode == 'new'):?>