// report of pull request 737
This commit is contained in:
1 parent
89ac0bc439
commit
3448027861
1 file changed
+27
-24
@@ -363,10 +363,13 @@ class AdminImportControllerCore extends AdminController
|
|||||||
'shop' => Shop::getGroupFromShop(Configuration::get('PS_SHOP_DEFAULT')),
|
'shop' => Shop::getGroupFromShop(Configuration::get('PS_SHOP_DEFAULT')),
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
// @since 1.5.0
|
}
|
||||||
case $this->entities[$this->l('Supply Orders')]:
|
|
||||||
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
// @since 1.5.0
|
||||||
{
|
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
||||||
|
switch ((int)Tools::getValue('entity'))
|
||||||
|
{
|
||||||
|
case $this->entities[$this->l('Supply Orders')]:
|
||||||
// required fields
|
// required fields
|
||||||
$this->required_fields = array(
|
$this->required_fields = array(
|
||||||
'id_supplier',
|
'id_supplier',
|
||||||
@@ -394,12 +397,8 @@ class AdminImportControllerCore extends AdminController
|
|||||||
'discount_rate' => '0',
|
'discount_rate' => '0',
|
||||||
'is_template' => '0',
|
'is_template' => '0',
|
||||||
);
|
);
|
||||||
}
|
break;
|
||||||
break;
|
case $this->entities[$this->l('Supply Order Details')]:
|
||||||
// @since 1.5.0
|
|
||||||
case $this->entities[$this->l('Supply Order Details')]:
|
|
||||||
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
|
||||||
{
|
|
||||||
// required fields
|
// required fields
|
||||||
$this->required_fields = array(
|
$this->required_fields = array(
|
||||||
'supply_order_reference',
|
'supply_order_reference',
|
||||||
@@ -423,8 +422,9 @@ class AdminImportControllerCore extends AdminController
|
|||||||
'discount_rate' => '0',
|
'discount_rate' => '0',
|
||||||
'tax_rate' => '0',
|
'tax_rate' => '0',
|
||||||
);
|
);
|
||||||
}
|
break;
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
||||||
$this->separator = strval(trim(Tools::getValue('separator', ';')));
|
$this->separator = strval(trim(Tools::getValue('separator', ';')));
|
||||||
|
|
||||||
@@ -2764,19 +2764,22 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$this->supplierImport();
|
$this->supplierImport();
|
||||||
$this->clearSmartyCache();
|
$this->clearSmartyCache();
|
||||||
break;
|
break;
|
||||||
// @since 1.5.0
|
|
||||||
case $this->entities[$import_type = $this->l('Supply Orders')]:
|
|
||||||
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
|
||||||
$this->supplyOrdersImport();
|
|
||||||
break;
|
|
||||||
// @since 1.5.0
|
|
||||||
case $this->entities[$import_type = $this->l('Supply Order Details')]:
|
|
||||||
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
|
||||||
$this->supplyOrdersDetailsImport();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$this->errors[] = $this->l('Please select what you would like to import');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @since 1.5.0
|
||||||
|
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
||||||
|
switch ((int)Tools::getValue('entity'))
|
||||||
|
{
|
||||||
|
case $this->entities[$import_type = $this->l('Supply Orders')]:
|
||||||
|
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
||||||
|
$this->supplyOrdersImport();
|
||||||
|
break;
|
||||||
|
case $this->entities[$import_type = $this->l('Supply Order Details')]:
|
||||||
|
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
||||||
|
$this->supplyOrdersDetailsImport();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if ($import_type !== false)
|
if ($import_type !== false)
|
||||||
{
|
{
|
||||||
$log_message = sprintf($this->l('%s import'), $import_type);
|
$log_message = sprintf($this->l('%s import'), $import_type);
|
||||||
|
|||||||
Reference in new issue
Block a user