diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index b7ef8950fe1..65638a1cab2 100644 --- a/htdocs/core/modules/modAccounting.class.php +++ b/htdocs/core/modules/modAccounting.class.php @@ -240,7 +240,7 @@ class modAccounting extends DolibarrModules $r++; $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='Chartofaccounts'; - $this->export_icon[$r]='Accounting'; + $this->export_icon[$r]='accounting'; $this->export_permission[$r]=array(array("accounting","chartofaccount")); $this->export_fields_array[$r]=array('ac.rowid'=>'ChartofaccountsId','ac.pcg_version'=>'Chartofaccounts','aa.rowid'=>'Id','aa.account_number'=>"AccountAccounting",'aa.label'=>"Label",'aa.account_parent'=>"Accountparent",'aa.pcg_type'=>"Pcgtype",'aa.pcg_subtype'=>'Pcgsubtype','aa.active'=>'Status'); $this->export_TypeFields_array[$r]=array('ac.rowid'=>'List:accounting_system:pcg_version','aa.account_number'=>"Text",'aa.label'=>"Text",'aa.account_parent'=>"Text",'aa.pcg_type'=>'Text','aa.pcg_subtype'=>'Text','aa.active'=>'Status'); diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 9227998e4a0..7bcd69e3d0b 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -352,20 +352,19 @@ if ($step == 1 || ! $datatoimport) print ''.$langs->trans("ImportableDatas").''; print ' '; print ''; - $val=true; - if (count($objimport->array_import_code)) + + if (count($objimport->array_import_module)) { - foreach ($objimport->array_import_code as $key => $value) + $sortedarrayofmodules = dol_sort_array($objimport->array_import_module, 'module_position', 'asc', 0, 0, 1); + foreach ($sortedarrayofmodules as $key => $value) { //var_dump($objimport->array_import_code[$key]); - $val=!$val; - print ''; + print ''; $titleofmodule=$objimport->array_import_module[$key]->getName(); // Special cas for import common to module/services if (in_array($objimport->array_import_code[$key], array('produit_supplierprices','produit_multiprice','produit_languages'))) $titleofmodule=$langs->trans("ProductOrService"); print $titleofmodule; print ''; - //print $value; print img_object($objimport->array_import_module[$key]->getName(), $objimport->array_import_icon[$key]).' '; print $objimport->array_import_label[$key]; print ''; @@ -382,7 +381,7 @@ if ($step == 1 || ! $datatoimport) } else { - print ''.$langs->trans("NoImportableData").''; + print ''.$langs->trans("NoImportableData").''; } print ''; print '';