diff --git a/admin-dev/tabs/AdminStockMvt.php b/admin-dev/tabs/AdminStockMvt.php deleted file mode 100755 index 24998ad12..000000000 --- a/admin-dev/tabs/AdminStockMvt.php +++ /dev/null @@ -1,209 +0,0 @@ - -* @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 7307 $ -* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -class AdminStockMvt extends AdminTab -{ - public function __construct() - { - $this->context = Context::getContext(); - $this->table = 'stock_mvt'; - $this->className = 'StockMvt'; - $this->edit = false; - $this->delete = false; - $this->view = false; - - $this->fieldsDisplay = array( - 'id_stock_mvt' => array('title' => $this->l('ID'), 'width' => 40), - 'product_name' => array('title' => $this->l('Product Name'), 'width' => 200, 'havingFilter' => true), - 'physical_quantity' => array('title' => $this->l('Quantity'), 'width' => 40), - 'reason' => array('title' => $this->l('Reason'), 'width' => 200), - 'id_order' => array('title' => $this->l('ID Order'), 'width' => 40), - 'employee' => array('title' => $this->l('Employee'), 'width' => 100, 'havingFilter' => true), - 'warehouse' => array('title' => $this->l('Warehouse'), 'width' => 100, 'havingFilter' => true), - ); - - $this->_select = 'CONCAT(pl.name, \' \', GROUP_CONCAT(IFNULL(al.name, \'\'), \'\')) product_name, CONCAT(e.lastname, \' \', e.firstname) AS employee, mrl.name AS reason, CONCAT(w.reference, " - ", w.name) AS warehouse'; - $this->_join = 'INNER JOIN '._DB_PREFIX_.'stock stock ON a.id_stock = stock.id_stock - LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (stock.id_product = pl.id_product AND pl.id_lang = '.(int)$this->context->language->id.$this->context->shop->addSqlRestrictionOnLang('pl').') - LEFT JOIN `'._DB_PREFIX_.'stock_mvt_reason_lang` mrl ON (a.id_stock_mvt_reason = mrl.id_stock_mvt_reason AND mrl.id_lang = '.(int)$this->context->language->id.') - LEFT JOIN `'._DB_PREFIX_.'employee` e ON (e.id_employee = a.id_employee) - LEFT JOIN `'._DB_PREFIX_.'warehouse` w ON (w.id_warehouse = stock.id_warehouse) - LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac ON (pac.id_product_attribute = stock.id_product_attribute) - LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al ON (al.id_attribute = pac.id_attribute AND al.id_lang = '.(int)$this->context->language->id.')'; - $this->_group = 'GROUP BY a.id_stock_mvt'; - parent::__construct(); - } - - public function postProcess() - { - /*if (Tools::isSubmit('rebuildStock')) - StockMvt::addMissingMvt($this->context->employee->id, false);*/ - return parent::postProcess(); - } - - public function displayForm($isMainTab = true) - { - parent::displayForm(); - - if (!($obj = $this->loadObject(true))) - return; - $dl = 'name'; - echo '
'; - } -/* - public function viewstock_mvt() - { - $stockMvt = new StockMvt((int)Tools::getValue('id_stock_mvt')); - $product = new Product((int)$stockMvt->id_product, true, $this->context->language->id); - $movements = $product->getStockMvts($this->context->language->id); - - echo '| '.$this->l('ID').' | -'.$this->l('Product Name').' | -'.$this->l('Quantity').' | -'.$this->l('Reason').' | -'.$this->l('Employee').' | -'.$this->l('Order').' | -'.$this->l('Date').' | -
|---|---|---|---|---|---|---|
| '.$mvt['id_stock_mvt'].' | -'.$mvt['product_name'].' | -'.$mvt['quantity'].' | -'.$mvt['reason'].' | -'.$mvt['employee'].' | -#'.$mvt['id_order'].' | -'.Tools::displayDate($mvt['date_add'], $this->context->language->id).' | -