diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index de160fe2b93..f52dfc6d589 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -400,11 +400,11 @@ if ($result) { } $arrayofmassactions = array( - 'ventil'=>$langs->trans("Ventilate") - //'presend'=>$langs->trans("SendByMail"), - //'builddoc'=>$langs->trans("PDFMerge"), + 'ventil'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Ventilate") + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); - //if ($user->rights->mymodule->supprimer) $arrayofmassactions['predelete']=''.$langs->trans("Delete"); + //if ($user->rights->mymodule->supprimer) $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); //if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton = $form->selectMassAction('ventil', $arrayofmassactions, 1); diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php index 98decf4d27a..4d2d5f7b88a 100644 --- a/htdocs/accountancy/expensereport/list.php +++ b/htdocs/accountancy/expensereport/list.php @@ -298,7 +298,7 @@ if ($result) { } $arrayofmassactions = array( - 'ventil' => $langs->trans("Ventilate") + 'ventil' => img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Ventilate") ); $massactionbutton = $form->selectMassAction('ventil', $arrayofmassactions, 1); diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index 1dcd17ea074..414cd624bee 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -407,11 +407,11 @@ if ($result) { } $arrayofmassactions = array( - 'ventil'=>$langs->trans("Ventilate") - //'presend'=>$langs->trans("SendByMail"), - //'builddoc'=>$langs->trans("PDFMerge"), + 'ventil'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Ventilate") + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); - //if ($user->rights->mymodule->supprimer) $arrayofmassactions['predelete']=''.$langs->trans("Delete"); + //if ($user->rights->mymodule->supprimer) $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); //if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton = $form->selectMassAction('ventil', $arrayofmassactions, 1); diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 50fd5a78c93..9560a284e2a 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -543,8 +543,8 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // List of mass actions available $arrayofmassactions = array( - //'presend'=>img_picto('', 'email').$langs->trans("SendByMail"), - //'builddoc'=>img_picto('', 'pdf').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').' '.$langs->trans("SendByMail"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); if ($user->rights->adherent->creer) { $arrayofmassactions['close'] = img_picto('', 'close_title', 'class="pictofixedwidth"').$langs->trans("Resiliate"); diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index 6b76fc3d502..7322f92fccd 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -287,10 +287,10 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // List of mass actions available $arrayofmassactions = array( - //'presend'=>$langs->trans("SendByMail"), - //'builddoc'=>$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); -//if ($user->rights->adherent->supprimer) $arrayofmassactions['predelete']=''.$langs->trans("Delete"); +//if ($user->rights->adherent->supprimer) $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); if (in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); } diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 9061fd150b7..2e4b88c2287 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -606,7 +606,7 @@ complete_dictionary_with_modules($taborder, $tabname, $tablib, $tabsql, $tabsqls // Defaut sortorder if (empty($sortfield)) { - $tmp1 = explode(',', $tabsqlsort[$id]); + $tmp1 = explode(',', empty($tabsqlsort[$id]) ? '' : $tabsqlsort[$id]); $tmp2 = explode(' ', $tmp1[0]); $sortfield = preg_replace('/^.*\./', '', $tmp2[0]); } @@ -713,12 +713,12 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) { continue; // For a column name 'sortorder', we use the field name 'position' } if ((!GETPOSTISSET($value) || GETPOST($value) == '') - && (!in_array($listfield[$f], array('decalage', 'module', 'accountancy_code', 'accountancy_code_sell', 'accountancy_code_buy', 'tracking', 'picto')) // Fields that are not mandatory - && ($id != 10 || ($listfield[$f] != 'code' && $listfield[$f] != 'note')) // Field code and note is not mandatory for dictionary table 10 + && (!in_array($value, array('decalage', 'module', 'accountancy_code', 'accountancy_code_sell', 'accountancy_code_buy', 'tracking', 'picto')) // Fields that are not mandatory + && ($id != 10 || ($value != 'code' && $value != 'note')) // Field code and note is not mandatory for dictionary table 10 ) ) { $ok = 0; - $fieldnamekey = $listfield[$f]; + $fieldnamekey = $value; // We take translate key of field if ($fieldnamekey == 'libelle' || ($fieldnamekey == 'label')) { $fieldnamekey = 'Label'; @@ -1211,26 +1211,26 @@ if ($id) { // Line for title $tdsoffields = ''; foreach ($fieldlist as $field => $value) { - if ($fieldlist[$field] == 'entity') { + if ($value == 'entity') { $withentity = getEntity($tabname[$id]); continue; } // Define field friendly name from its technical name - $valuetoshow = ucfirst($fieldlist[$field]); // Par defaut + $valuetoshow = ucfirst($value); // Par defaut $valuetoshow = $langs->trans($valuetoshow); // try to translate $class = ''; - if ($fieldlist[$field] == 'pos') { + if ($value == 'pos') { $valuetoshow = $langs->trans("Position"); $class = 'maxwidth100'; } - if ($fieldlist[$field] == 'source') { + if ($value == 'source') { $valuetoshow = $langs->trans("Contact"); } - if ($fieldlist[$field] == 'price') { + if ($value == 'price') { $valuetoshow = $langs->trans("PriceUHT"); } - if ($fieldlist[$field] == 'taux') { + if ($value == 'taux') { if ($tabname[$id] != MAIN_DB_PREFIX."c_revenuestamp") { $valuetoshow = $langs->trans("Rate"); } else { @@ -1238,175 +1238,175 @@ if ($id) { } $class = 'center'; } - if ($fieldlist[$field] == 'localtax1_type') { + if ($value == 'localtax1_type') { $valuetoshow = $langs->trans("UseLocalTax")." 2"; $class = "center"; $sortable = 0; } - if ($fieldlist[$field] == 'localtax1') { + if ($value == 'localtax1') { $valuetoshow = $langs->trans("Rate")." 2"; $class = "center"; } - if ($fieldlist[$field] == 'localtax2_type') { + if ($value == 'localtax2_type') { $valuetoshow = $langs->trans("UseLocalTax")." 3"; $class = "center"; $sortable = 0; } - if ($fieldlist[$field] == 'localtax2') { + if ($value == 'localtax2') { $valuetoshow = $langs->trans("Rate")." 3"; $class = "center"; } - if ($fieldlist[$field] == 'organization') { + if ($value == 'organization') { $valuetoshow = $langs->trans("Organization"); } - if ($fieldlist[$field] == 'lang') { + if ($value == 'lang') { $valuetoshow = $langs->trans("Language"); } - if ($fieldlist[$field] == 'type') { + if ($value == 'type') { if ($tabname[$id] == MAIN_DB_PREFIX."c_paiement") { $valuetoshow = $form->textwithtooltip($langs->trans("Type"), $langs->trans("TypePaymentDesc"), 2, 1, img_help(1, '')); } else { $valuetoshow = $langs->trans("Type"); } } - if ($fieldlist[$field] == 'code') { + if ($value == 'code') { $valuetoshow = $langs->trans("Code"); $class = 'maxwidth100'; } - if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') { + if ($value == 'libelle' || $value == 'label') { $valuetoshow = $form->textwithtooltip($langs->trans("Label"), $langs->trans("LabelUsedByDefault"), 2, 1, img_help(1, '')); } - if ($fieldlist[$field] == 'libelle_facture') { + if ($value == 'libelle_facture') { $valuetoshow = $form->textwithtooltip($langs->trans("LabelOnDocuments"), $langs->trans("LabelUsedByDefault"), 2, 1, img_help(1, '')); } - if ($fieldlist[$field] == 'country') { + if ($value == 'country') { if (in_array('region_id', $fieldlist)) { print ' '; continue; } // For region page, we do not show the country input $valuetoshow = $langs->trans("Country"); } - if ($fieldlist[$field] == 'recuperableonly') { + if ($value == 'recuperableonly') { $valuetoshow = $langs->trans("NPR"); $class = "center"; } - if ($fieldlist[$field] == 'nbjour') { + if ($value == 'nbjour') { $valuetoshow = $langs->trans("NbOfDays"); } - if ($fieldlist[$field] == 'type_cdr') { + if ($value == 'type_cdr') { $valuetoshow = $langs->trans("AtEndOfMonth"); $class = "center"; } - if ($fieldlist[$field] == 'decalage') { + if ($value == 'decalage') { $valuetoshow = $langs->trans("Offset"); } - if ($fieldlist[$field] == 'width' || $fieldlist[$field] == 'nx') { + if ($value == 'width' || $value == 'nx') { $valuetoshow = $langs->trans("Width"); } - if ($fieldlist[$field] == 'height' || $fieldlist[$field] == 'ny') { + if ($value == 'height' || $value == 'ny') { $valuetoshow = $langs->trans("Height"); } - if ($fieldlist[$field] == 'unit' || $fieldlist[$field] == 'metric') { + if ($value == 'unit' || $value == 'metric') { $valuetoshow = $langs->trans("MeasuringUnit"); } - if ($fieldlist[$field] == 'region_id' || $fieldlist[$field] == 'country_id') { + if ($value == 'region_id' || $value == 'country_id') { $valuetoshow = ''; } - if ($fieldlist[$field] == 'accountancy_code') { + if ($value == 'accountancy_code') { $valuetoshow = $langs->trans("AccountancyCode"); } - if ($fieldlist[$field] == 'accountancy_code_sell') { + if ($value == 'accountancy_code_sell') { $valuetoshow = $langs->trans("AccountancyCodeSell"); } - if ($fieldlist[$field] == 'accountancy_code_buy') { + if ($value == 'accountancy_code_buy') { $valuetoshow = $langs->trans("AccountancyCodeBuy"); } - if ($fieldlist[$field] == 'pcg_version' || $fieldlist[$field] == 'fk_pcg_version') { + if ($value == 'pcg_version' || $value == 'fk_pcg_version') { $valuetoshow = $langs->trans("Pcg_version"); } - if ($fieldlist[$field] == 'account_parent') { + if ($value == 'account_parent') { $valuetoshow = $langs->trans("Accountparent"); } - if ($fieldlist[$field] == 'pcg_type') { + if ($value == 'pcg_type') { $valuetoshow = $langs->trans("Pcg_type"); } - if ($fieldlist[$field] == 'pcg_subtype') { + if ($value == 'pcg_subtype') { $valuetoshow = $langs->trans("Pcg_subtype"); } - if ($fieldlist[$field] == 'sortorder') { + if ($value == 'sortorder') { $valuetoshow = $langs->trans("SortOrder"); } - if ($fieldlist[$field] == 'short_label') { + if ($value == 'short_label') { $valuetoshow = $langs->trans("ShortLabel"); } - if ($fieldlist[$field] == 'range_account') { + if ($value == 'range_account') { $valuetoshow = $langs->trans("Range"); } - if ($fieldlist[$field] == 'sens') { + if ($value == 'sens') { $valuetoshow = $langs->trans("Sens"); } - if ($fieldlist[$field] == 'category_type') { + if ($value == 'category_type') { $valuetoshow = $langs->trans("Calculated"); } - if ($fieldlist[$field] == 'formula') { + if ($value == 'formula') { $valuetoshow = $langs->trans("Formula"); } - if ($fieldlist[$field] == 'paper_size') { + if ($value == 'paper_size') { $valuetoshow = $langs->trans("PaperSize"); } - if ($fieldlist[$field] == 'orientation') { + if ($value == 'orientation') { $valuetoshow = $langs->trans("Orientation"); } - if ($fieldlist[$field] == 'leftmargin') { + if ($value == 'leftmargin') { $valuetoshow = $langs->trans("LeftMargin"); } - if ($fieldlist[$field] == 'topmargin') { + if ($value == 'topmargin') { $valuetoshow = $langs->trans("TopMargin"); } - if ($fieldlist[$field] == 'spacex') { + if ($value == 'spacex') { $valuetoshow = $langs->trans("SpaceX"); } - if ($fieldlist[$field] == 'spacey') { + if ($value == 'spacey') { $valuetoshow = $langs->trans("SpaceY"); } - if ($fieldlist[$field] == 'font_size') { + if ($value == 'font_size') { $valuetoshow = $langs->trans("FontSize"); } - if ($fieldlist[$field] == 'custom_x') { + if ($value == 'custom_x') { $valuetoshow = $langs->trans("CustomX"); } - if ($fieldlist[$field] == 'custom_y') { + if ($value == 'custom_y') { $valuetoshow = $langs->trans("CustomY"); } - if ($fieldlist[$field] == 'percent') { + if ($value == 'percent') { $valuetoshow = $langs->trans("Percentage"); } - if ($fieldlist[$field] == 'affect') { + if ($value == 'affect') { $valuetoshow = $langs->trans("WithCounter"); } - if ($fieldlist[$field] == 'delay') { + if ($value == 'delay') { $valuetoshow = $langs->trans("NoticePeriod"); } - if ($fieldlist[$field] == 'newbymonth') { + if ($value == 'newbymonth') { $valuetoshow = $langs->trans("NewByMonth"); } - if ($fieldlist[$field] == 'fk_tva') { + if ($value == 'fk_tva') { $valuetoshow = $langs->trans("VAT"); } - if ($fieldlist[$field] == 'range_ik') { + if ($value == 'range_ik') { $valuetoshow = $langs->trans("RangeIk"); } - if ($fieldlist[$field] == 'fk_c_exp_tax_cat') { + if ($value == 'fk_c_exp_tax_cat') { $valuetoshow = $langs->trans("CarCategory"); } - if ($fieldlist[$field] == 'revenuestamp_type') { + if ($value == 'revenuestamp_type') { $valuetoshow = $langs->trans('TypeOfRevenueStamp'); } - if ($fieldlist[$field] == 'use_default') { + if ($value == 'use_default') { $valuetoshow = $langs->trans('Default'); $class = 'center'; } - if ($fieldlist[$field] == 'unit_type') { + if ($value == 'unit_type') { $valuetoshow = $langs->trans('TypeOfUnit'); } - if ($fieldlist[$field] == 'public' && $tablib[$id] == 'TicketDictCategory') { + if ($value == 'public' && $tablib[$id] == 'TicketDictCategory') { $valuetoshow = $langs->trans('TicketGroupIsPublic'); $class = 'center'; } if ($id == 2) { // Special case for state page - if ($fieldlist[$field] == 'region_id') { + if ($value == 'region_id') { $valuetoshow = ' '; $showfield = 1; } - if ($fieldlist[$field] == 'region') { + if ($value == 'region') { $valuetoshow = $langs->trans("Country").'/'.$langs->trans("Region"); $showfield = 1; } } @@ -1513,13 +1513,13 @@ if ($id) { print ''; $filterfound = 0; foreach ($fieldlist as $field => $value) { - if ($fieldlist[$field] == 'entity') { + if ($value == 'entity') { continue; } $showfield = 1; // By default - if ($fieldlist[$field] == 'region_id' || $fieldlist[$field] == 'country_id') { + if ($value == 'region_id' || $value == 'country_id') { $showfield = 0; } @@ -1555,7 +1555,7 @@ if ($id) { // Title of lines print ''; foreach ($fieldlist as $field => $value) { - if ($fieldlist[$field] == 'entity') { + if ($value == 'entity') { continue; } @@ -1568,17 +1568,17 @@ if ($id) { $showfield = 1; // By defaut $cssprefix = ''; $sortable = 1; - $valuetoshow = ucfirst($fieldlist[$field]); // By defaut + $valuetoshow = ucfirst($value); // By defaut $valuetoshow = $langs->trans($valuetoshow); // try to translate // Special cases - if ($fieldlist[$field] == 'source') { + if ($value == 'source') { $valuetoshow = $langs->trans("Contact"); } - if ($fieldlist[$field] == 'price') { + if ($value == 'price') { $valuetoshow = $langs->trans("PriceUHT"); } - if ($fieldlist[$field] == 'taux') { + if ($value == 'taux') { if ($tabname[$id] != MAIN_DB_PREFIX."c_revenuestamp") { $valuetoshow = $langs->trans("Rate"); } else { @@ -1586,167 +1586,167 @@ if ($id) { } $cssprefix = 'center '; } - if ($fieldlist[$field] == 'localtax1_type') { + if ($value == 'localtax1_type') { $valuetoshow = $langs->trans("UseLocalTax")." 2"; $cssprefix = "center "; $sortable = 0; } - if ($fieldlist[$field] == 'localtax1') { + if ($value == 'localtax1') { $valuetoshow = $langs->trans("Rate")." 2"; $cssprefix = "center "; $sortable = 0; } - if ($fieldlist[$field] == 'localtax2_type') { + if ($value == 'localtax2_type') { $valuetoshow = $langs->trans("UseLocalTax")." 3"; $cssprefix = "center "; $sortable = 0; } - if ($fieldlist[$field] == 'localtax2') { + if ($value == 'localtax2') { $valuetoshow = $langs->trans("Rate")." 3"; $cssprefix = "center "; $sortable = 0; } - if ($fieldlist[$field] == 'organization') { + if ($value == 'organization') { $valuetoshow = $langs->trans("Organization"); } - if ($fieldlist[$field] == 'lang') { + if ($value == 'lang') { $valuetoshow = $langs->trans("Language"); } - if ($fieldlist[$field] == 'type') { + if ($value == 'type') { $valuetoshow = $langs->trans("Type"); } - if ($fieldlist[$field] == 'code') { + if ($value == 'code') { $valuetoshow = $langs->trans("Code"); } - if ($fieldlist[$field] == 'pos') { + if ($value == 'pos') { $cssprefix = 'right '; $valuetoshow = $langs->trans("Position"); } - if ($fieldlist[$field] == 'position') { + if ($value == 'position') { $cssprefix = 'right '; $valuetoshow = $langs->trans("Position"); } - if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') { + if ($value == 'libelle' || $value == 'label') { $valuetoshow = $langs->trans("Label"); } - if ($fieldlist[$field] == 'libelle_facture') { + if ($value == 'libelle_facture') { $valuetoshow = $langs->trans("LabelOnDocuments"); } - if ($fieldlist[$field] == 'country') { + if ($value == 'country') { $valuetoshow = $langs->trans("Country"); } - if ($fieldlist[$field] == 'recuperableonly') { + if ($value == 'recuperableonly') { $valuetoshow = $langs->trans("NPR"); $cssprefix = "center "; } - if ($fieldlist[$field] == 'nbjour') { + if ($value == 'nbjour') { $valuetoshow = $langs->trans("NbOfDays"); } - if ($fieldlist[$field] == 'type_cdr') { + if ($value == 'type_cdr') { $valuetoshow = $langs->trans("AtEndOfMonth"); $cssprefix = "center "; } - if ($fieldlist[$field] == 'decalage') { + if ($value == 'decalage') { $valuetoshow = $langs->trans("Offset"); } - if ($fieldlist[$field] == 'width' || $fieldlist[$field] == 'nx') { + if ($value == 'width' || $value == 'nx') { $valuetoshow = $langs->trans("Width"); } - if ($fieldlist[$field] == 'height' || $fieldlist[$field] == 'ny') { + if ($value == 'height' || $value == 'ny') { $valuetoshow = $langs->trans("Height"); } - if ($fieldlist[$field] == 'unit' || $fieldlist[$field] == 'metric') { + if ($value == 'unit' || $value == 'metric') { $valuetoshow = $langs->trans("MeasuringUnit"); } - if ($fieldlist[$field] == 'accountancy_code') { + if ($value == 'accountancy_code') { $valuetoshow = $langs->trans("AccountancyCode"); } - if ($fieldlist[$field] == 'accountancy_code_sell') { + if ($value == 'accountancy_code_sell') { $valuetoshow = $langs->trans("AccountancyCodeSell"); $sortable = 0; } - if ($fieldlist[$field] == 'accountancy_code_buy') { + if ($value == 'accountancy_code_buy') { $valuetoshow = $langs->trans("AccountancyCodeBuy"); $sortable = 0; } - if ($fieldlist[$field] == 'fk_pcg_version') { + if ($value == 'fk_pcg_version') { $valuetoshow = $langs->trans("Pcg_version"); } - if ($fieldlist[$field] == 'account_parent') { + if ($value == 'account_parent') { $valuetoshow = $langs->trans("Accountsparent"); } - if ($fieldlist[$field] == 'pcg_type') { + if ($value == 'pcg_type') { $valuetoshow = $langs->trans("Pcg_type"); } - if ($fieldlist[$field] == 'pcg_subtype') { + if ($value == 'pcg_subtype') { $valuetoshow = $langs->trans("Pcg_subtype"); } - if ($fieldlist[$field] == 'sortorder') { + if ($value == 'sortorder') { $valuetoshow = $langs->trans("SortOrder"); } - if ($fieldlist[$field] == 'short_label') { + if ($value == 'short_label') { $valuetoshow = $langs->trans("ShortLabel"); } - if ($fieldlist[$field] == 'range_account') { + if ($value == 'range_account') { $valuetoshow = $langs->trans("Range"); } - if ($fieldlist[$field] == 'sens') { + if ($value == 'sens') { $valuetoshow = $langs->trans("Sens"); } - if ($fieldlist[$field] == 'category_type') { + if ($value == 'category_type') { $valuetoshow = $langs->trans("Calculated"); } - if ($fieldlist[$field] == 'formula') { + if ($value == 'formula') { $valuetoshow = $langs->trans("Formula"); } - if ($fieldlist[$field] == 'paper_size') { + if ($value == 'paper_size') { $valuetoshow = $langs->trans("PaperSize"); } - if ($fieldlist[$field] == 'orientation') { + if ($value == 'orientation') { $valuetoshow = $langs->trans("Orientation"); } - if ($fieldlist[$field] == 'leftmargin') { + if ($value == 'leftmargin') { $valuetoshow = $langs->trans("LeftMargin"); } - if ($fieldlist[$field] == 'topmargin') { + if ($value == 'topmargin') { $valuetoshow = $langs->trans("TopMargin"); } - if ($fieldlist[$field] == 'spacex') { + if ($value == 'spacex') { $valuetoshow = $langs->trans("SpaceX"); } - if ($fieldlist[$field] == 'spacey') { + if ($value == 'spacey') { $valuetoshow = $langs->trans("SpaceY"); } - if ($fieldlist[$field] == 'font_size') { + if ($value == 'font_size') { $valuetoshow = $langs->trans("FontSize"); } - if ($fieldlist[$field] == 'custom_x') { + if ($value == 'custom_x') { $valuetoshow = $langs->trans("CustomX"); } - if ($fieldlist[$field] == 'custom_y') { + if ($value == 'custom_y') { $valuetoshow = $langs->trans("CustomY"); } - if ($fieldlist[$field] == 'percent') { + if ($value == 'percent') { $valuetoshow = $langs->trans("Percentage"); } - if ($fieldlist[$field] == 'affect') { + if ($value == 'affect') { $valuetoshow = $langs->trans("WithCounter"); } - if ($fieldlist[$field] == 'delay') { + if ($value == 'delay') { $valuetoshow = $langs->trans("NoticePeriod"); } - if ($fieldlist[$field] == 'newbymonth') { + if ($value == 'newbymonth') { $valuetoshow = $langs->trans("NewByMonth"); } - if ($fieldlist[$field] == 'fk_tva') { + if ($value == 'fk_tva') { $valuetoshow = $langs->trans("VAT"); } - if ($fieldlist[$field] == 'range_ik') { + if ($value == 'range_ik') { $valuetoshow = $langs->trans("RangeIk"); } - if ($fieldlist[$field] == 'fk_c_exp_tax_cat') { + if ($value == 'fk_c_exp_tax_cat') { $valuetoshow = $langs->trans("CarCategory"); } - if ($fieldlist[$field] == 'revenuestamp_type') { + if ($value == 'revenuestamp_type') { $valuetoshow = $langs->trans('TypeOfRevenueStamp'); } - if ($fieldlist[$field] == 'use_default') { + if ($value == 'use_default') { $valuetoshow = $langs->trans('Default'); $cssprefix = 'center '; } - if ($fieldlist[$field] == 'unit_type') { + if ($value == 'unit_type') { $valuetoshow = $langs->trans('TypeOfUnit'); } - if ($fieldlist[$field] == 'public' && $tablib[$id] == 'TicketDictCategory') { + if ($value == 'public' && $tablib[$id] == 'TicketDictCategory') { $valuetoshow = $langs->trans('TicketGroupIsPublic'); $cssprefix = 'center '; } - if ($fieldlist[$field] == 'region_id' || $fieldlist[$field] == 'country_id') { + if ($value == 'region_id' || $value == 'country_id') { $showfield = 0; } @@ -1760,7 +1760,7 @@ if ($id) { $newvaluetoshow = $valuetoshow; } - print getTitleFieldOfList($newvaluetoshow, 0, $_SERVER["PHP_SELF"], ($sortable ? $fieldlist[$field] : ''), ($page ? 'page='.$page.'&' : ''), $param, '', $sortfield, $sortorder, $cssprefix); + print getTitleFieldOfList($newvaluetoshow, 0, $_SERVER["PHP_SELF"], ($sortable ? $value : ''), ($page ? 'page='.$page.'&' : ''), $param, '', $sortfield, $sortorder, $cssprefix); } } // Favorite - Only activated on country dictionary @@ -1778,7 +1778,7 @@ if ($id) { while ($i < $num) { $obj = $db->fetch_object($resql); //print_r($obj); - print ''; + print ''; if ($action == 'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) { $tmpaction = 'edit'; $parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); @@ -1814,9 +1814,9 @@ if ($id) { //var_dump($fieldlist); $class = ''; $showfield = 1; - $valuetoshow = $obj->{$fieldlist[$field]}; + $valuetoshow = empty($obj->{$value}) ? '' : $obj->{$value}; - if ($fieldlist[$field] == 'entity') { + if ($value == 'entity') { $withentity = $valuetoshow; continue; } @@ -1827,17 +1827,17 @@ if ($id) { $valuetoshow = isset($sourceList[$valuetoshow]) ? $sourceList[$valuetoshow] : $valuetoshow; } elseif ($valuetoshow == 'all') { $valuetoshow = $langs->trans('All'); - } elseif ($fieldlist[$field] == 'country') { + } elseif ($value == 'country') { if (empty($obj->country_code)) { $valuetoshow = '-'; } else { $key = $langs->trans("Country".strtoupper($obj->country_code)); $valuetoshow = ($key != "Country".strtoupper($obj->country_code) ? $obj->country_code." - ".$key : $obj->country); } - } elseif ($fieldlist[$field] == 'recuperableonly' || $fieldlist[$field] == 'deductible' || $fieldlist[$field] == 'category_type') { + } elseif ($value == 'recuperableonly' || $value == 'deductible' || $value == 'category_type') { $valuetoshow = yn($valuetoshow); $class = "center"; - } elseif ($fieldlist[$field] == 'type_cdr') { + } elseif ($value == 'type_cdr') { if (empty($valuetoshow)) { $valuetoshow = $langs->trans('None'); } elseif ($valuetoshow == 1) { @@ -1846,157 +1846,157 @@ if ($id) { $valuetoshow = $langs->trans('CurrentNext'); } $class = "center"; - } elseif ($fieldlist[$field] == 'price' || preg_match('/^amount/i', $fieldlist[$field])) { + } elseif ($value == 'price' || preg_match('/^amount/i', $value)) { $valuetoshow = price($valuetoshow); } if ($value == 'private') { $valuetoshow = yn($elementList[$valuetoshow]); - } elseif ($fieldlist[$field] == 'libelle_facture') { + } elseif ($value == 'libelle_facture') { $langs->load("bills"); $key = $langs->trans("PaymentCondition".strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != "PaymentCondition".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); + $valuetoshow = ($obj->code && $key != "PaymentCondition".strtoupper($obj->code) ? $key : $obj->{$value}); $valuetoshow = nl2br($valuetoshow); - } elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_country') { + } elseif ($value == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_country') { $key = $langs->trans("Country".strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != "Country".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_availability') { + $valuetoshow = ($obj->code && $key != "Country".strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif ($value == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_availability') { $langs->load("propal"); $key = $langs->trans("AvailabilityType".strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != "AvailabilityType".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_actioncomm') { + $valuetoshow = ($obj->code && $key != "AvailabilityType".strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif ($value == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_actioncomm') { $key = $langs->trans("Action".strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != "Action".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } elseif (!empty($obj->code_iso) && $fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_currencies') { + $valuetoshow = ($obj->code && $key != "Action".strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif (!empty($obj->code_iso) && $value == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_currencies') { $key = $langs->trans("Currency".strtoupper($obj->code_iso)); - $valuetoshow = ($obj->code_iso && $key != "Currency".strtoupper($obj->code_iso) ? $key : $obj->{$fieldlist[$field]}); - } elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_typent') { + $valuetoshow = ($obj->code_iso && $key != "Currency".strtoupper($obj->code_iso) ? $key : $obj->{$value}); + } elseif ($value == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_typent') { $key = $langs->trans(strtoupper($obj->code)); - $valuetoshow = ($key != strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_prospectlevel') { + $valuetoshow = ($key != strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif ($value == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_prospectlevel') { $key = $langs->trans(strtoupper($obj->code)); - $valuetoshow = ($key != strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_civility') { + $valuetoshow = ($key != strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif ($value == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_civility') { $key = $langs->trans("Civility".strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != "Civility".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_contact') { + $valuetoshow = ($obj->code && $key != "Civility".strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif ($value == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_contact') { $langs->load('agenda'); $key = $langs->trans("TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != "TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_payment_term') { + $valuetoshow = ($obj->code && $key != "TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif ($value == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_payment_term') { $langs->load("bills"); $key = $langs->trans("PaymentConditionShort".strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != "PaymentConditionShort".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_paiement') { + $valuetoshow = ($obj->code && $key != "PaymentConditionShort".strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif ($value == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_paiement') { $langs->load("bills"); $key = $langs->trans("PaymentType".strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != "PaymentType".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } elseif ($fieldlist[$field] == 'type' && $tabname[$id] == MAIN_DB_PREFIX.'c_paiement') { + $valuetoshow = ($obj->code && $key != "PaymentType".strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif ($value == 'type' && $tabname[$id] == MAIN_DB_PREFIX.'c_paiement') { $payment_type_list = array(0=>$langs->trans('PaymentTypeCustomer'), 1=>$langs->trans('PaymentTypeSupplier'), 2=>$langs->trans('PaymentTypeBoth')); $valuetoshow = $payment_type_list[$valuetoshow]; - } elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_input_reason') { + } elseif ($value == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_input_reason') { $key = $langs->trans("DemandReasonType".strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != "DemandReasonType".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_input_method') { + $valuetoshow = ($obj->code && $key != "DemandReasonType".strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif ($value == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_input_method') { $langs->load("orders"); $key = $langs->trans($obj->code); - $valuetoshow = ($obj->code && $key != $obj->code) ? $key : $obj->{$fieldlist[$field]}; - } elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_shipment_mode') { + $valuetoshow = ($obj->code && $key != $obj->code) ? $key : $obj->{$value}; + } elseif ($value == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_shipment_mode') { $langs->load("sendings"); $key = $langs->trans("SendingMethod".strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != "SendingMethod".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_paper_format') { + $valuetoshow = ($obj->code && $key != "SendingMethod".strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif ($value == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_paper_format') { $key = $langs->trans('PaperFormat'.strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != 'PaperFormat'.strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_fees') { + $valuetoshow = ($obj->code && $key != 'PaperFormat'.strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif ($value == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_fees') { $langs->load('trips'); $key = $langs->trans(strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } elseif ($fieldlist[$field] == 'region_id' || $fieldlist[$field] == 'country_id') { + $valuetoshow = ($obj->code && $key != strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif ($value == 'region_id' || $value == 'country_id') { $showfield = 0; - } elseif ($fieldlist[$field] == 'unicode') { + } elseif ($value == 'unicode') { $valuetoshow = $langs->getCurrencySymbol($obj->code, 1); - } elseif ($fieldlist[$field] == 'label' && $tabname[GETPOST("id", 'int')] == MAIN_DB_PREFIX.'c_units') { + } elseif ($value == 'label' && $tabname[GETPOST("id", 'int')] == MAIN_DB_PREFIX.'c_units') { $langs->load("products"); - $valuetoshow = $langs->trans($obj->{$fieldlist[$field]}); - } elseif ($fieldlist[$field] == 'short_label' && $tabname[GETPOST("id", 'int')] == MAIN_DB_PREFIX.'c_units') { + $valuetoshow = $langs->trans($obj->{$value}); + } elseif ($value == 'short_label' && $tabname[GETPOST("id", 'int')] == MAIN_DB_PREFIX.'c_units') { $langs->load("products"); - $valuetoshow = $langs->trans($obj->{$fieldlist[$field]}); - } elseif (($fieldlist[$field] == 'unit') && ($tabname[$id] == MAIN_DB_PREFIX.'c_paper_format')) { + $valuetoshow = $langs->trans($obj->{$value}); + } elseif (($value == 'unit') && ($tabname[$id] == MAIN_DB_PREFIX.'c_paper_format')) { $key = $langs->trans('SizeUnit'.strtolower($obj->unit)); - $valuetoshow = ($obj->code && $key != 'SizeUnit'.strtolower($obj->unit) ? $key : $obj->{$fieldlist[$field]}); - } elseif ($fieldlist[$field] == 'localtax1' || $fieldlist[$field] == 'localtax2') { + $valuetoshow = ($obj->code && $key != 'SizeUnit'.strtolower($obj->unit) ? $key : $obj->{$value}); + } elseif ($value == 'localtax1' || $value == 'localtax2') { $class = "center"; - } elseif ($fieldlist[$field] == 'localtax1_type') { + } elseif ($value == 'localtax1_type') { if ($obj->localtax1 != 0) { $valuetoshow = $localtax_typeList[$valuetoshow]; } else { $valuetoshow = ''; } $class = "center"; - } elseif ($fieldlist[$field] == 'localtax2_type') { + } elseif ($value == 'localtax2_type') { if ($obj->localtax2 != 0) { $valuetoshow = $localtax_typeList[$valuetoshow]; } else { $valuetoshow = ''; } $class = "center"; - } elseif ($fieldlist[$field] == 'taux') { + } elseif ($value == 'taux') { $valuetoshow = price($valuetoshow, 0, $langs, 0, 0); $class = "center"; - } elseif (in_array($fieldlist[$field], array('recuperableonly'))) { + } elseif (in_array($value, array('recuperableonly'))) { $class = "center"; - } elseif ($fieldlist[$field] == 'accountancy_code' || $fieldlist[$field] == 'accountancy_code_sell' || $fieldlist[$field] == 'accountancy_code_buy') { + } elseif ($value == 'accountancy_code' || $value == 'accountancy_code_sell' || $value == 'accountancy_code_buy') { $valuetoshow = length_accountg($valuetoshow); - } elseif ($fieldlist[$field] == 'fk_tva') { + } elseif ($value == 'fk_tva') { foreach ($form->cache_vatrates as $key => $Tab) { if ($form->cache_vatrates[$key]['rowid'] == $valuetoshow) { $valuetoshow = $form->cache_vatrates[$key]['libtva']; break; } } - } elseif ($fieldlist[$field] == 'fk_c_exp_tax_cat') { + } elseif ($value == 'fk_c_exp_tax_cat') { $valuetoshow = getDictvalue(MAIN_DB_PREFIX.'c_exp_tax_cat', 'label', $valuetoshow); $valuetoshow = $langs->trans($valuetoshow); } elseif ($tabname[$id] == MAIN_DB_PREFIX.'c_exp_tax_cat') { $valuetoshow = $langs->trans($valuetoshow); - } elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_units') { + } elseif ($value == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_units') { $langs->load('other'); $key = $langs->trans($obj->label); - $valuetoshow = ($obj->label && $key != strtoupper($obj->label) ? $key : $obj->{$fieldlist[$field]}); - } elseif ($fieldlist[$field] == 'code' && $id == 3) { + $valuetoshow = ($obj->label && $key != strtoupper($obj->label) ? $key : $obj->{$value}); + } elseif ($value == 'code' && $id == 3) { $valuetoshow = $obj->state_code; - } elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_product_nature') { + } elseif ($value == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_product_nature') { $langs->load("products"); - $valuetoshow = $langs->trans($obj->{$fieldlist[$field]}); + $valuetoshow = $langs->trans($obj->{$value}); } $class .= ($class ? ' ' : '').'tddict'; - if ($fieldlist[$field] == 'note' && $id == 10) { + if ($value == 'note' && $id == 10) { $class .= ' tdoverflowmax200'; } - if ($fieldlist[$field] == 'tracking') { + if ($value == 'tracking') { $class .= ' tdoverflowauto'; } - if ($fieldlist[$field] == 'position') { + if ($value == 'position') { $class .= ' right'; } - if ($fieldlist[$field] == 'localtax1_type') { + if ($value == 'localtax1_type') { $class .= ' nowrap'; } - if ($fieldlist[$field] == 'localtax2_type') { + if ($value == 'localtax2_type') { $class .= ' nowrap'; } - if ($fieldlist[$field] == 'pos') { + if ($value == 'pos') { $class .= ' right'; } - if ($fieldlist[$field] == 'use_default') { + if ($value == 'use_default') { $class .= ' center'; } - if ($fieldlist[$field] == 'public') { + if ($value == 'public') { $class .= ' center'; } // Show value for field if ($showfield) { - print ''.$valuetoshow.''; + print ''.$valuetoshow.''; } } } @@ -2024,12 +2024,12 @@ if ($id) { if (isset($obj->type) && in_array($obj->type, array('system', 'systemauto'))) { $iserasable = 0; } - if (in_array($obj->code, array('AC_OTH', 'AC_OTH_AUTO')) || in_array($obj->type, array('systemauto'))) { + if (in_array(empty($obj->code) ? '' : $obj->code, array('AC_OTH', 'AC_OTH_AUTO')) || in_array(empty($obj->type) ? '' : $obj->type, array('systemauto'))) { $canbedisabled = 0; $canbedisabled = 0; } $canbemodified = $iserasable; - if ($obj->code == 'RECEP') { + if (!empty($obj->code) && $obj->code == 'RECEP') { $canbemodified = 1; } if ($tabname[$id] == MAIN_DB_PREFIX."c_actioncomm") { @@ -2042,7 +2042,7 @@ if ($id) { if (empty($rowidcol) || in_array($id, array(6, 7, 8, 13, 17, 19, 27, 32))) { $rowidcol = 'rowid'; } - $url = $_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.((!empty($obj->{$rowidcol}) || $obj->{$rowidcol} == '0') ? $obj->{$rowidcol}:(!empty($obj->code) ?urlencode($obj->code) : '')).'&code='.(!empty($obj->code) ?urlencode($obj->code) : ''); + $url = $_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(isset($obj->{$rowidcol}) ? $obj->{$rowidcol} : (!empty($obj->code) ? urlencode($obj->code) : '')).'&code='.(!empty($obj->code) ?urlencode($obj->code) : ''); if (!empty($param)) { $url .= '&'.$param; } @@ -2196,18 +2196,18 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') $withentity = ''; foreach ($fieldlist as $field => $value) { - if ($fieldlist[$field] == 'entity') { - $withentity = $obj->{$fieldlist[$field]}; + if ($value == 'entity') { + $withentity = $obj->{$value}; continue; } - if (in_array($fieldlist[$field], array('code', 'libelle', 'type')) && $tabname == MAIN_DB_PREFIX."c_actioncomm" && in_array($obj->type, array('system', 'systemauto'))) { - $hidden = (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:''); + if (in_array($value, array('code', 'libelle', 'type')) && $tabname == MAIN_DB_PREFIX."c_actioncomm" && in_array($obj->type, array('system', 'systemauto'))) { + $hidden = (!empty($obj->{$value}) ? $obj->{$value}:''); print ''; - print ''; + print ''; print $langs->trans($hidden); print ''; - } elseif ($fieldlist[$field] == 'country') { + } elseif ($value == 'country') { if (in_array('region_id', $fieldlist)) { print ''; print ''; @@ -2217,71 +2217,71 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') $fieldname = 'country'; print $form->select_country((!empty($obj->country_code) ? $obj->country_code : (!empty($obj->country) ? $obj->country : '')), $fieldname, '', 28, 'maxwidth150 maxwidthonsmartphone'); print ''; - } elseif ($fieldlist[$field] == 'country_id') { + } elseif ($value == 'country_id') { if (!in_array('country', $fieldlist)) { // If there is already a field country, we don't show country_id (avoid duplicate) - $country_id = (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]} : 0); + $country_id = (!empty($obj->{$value}) ? $obj->{$value} : 0); print ''; - print ''; + print ''; print ''; } - } elseif ($fieldlist[$field] == 'region') { + } elseif ($value == 'region') { print ''; $formcompany->select_region($region_id, 'region'); print ''; - } elseif ($fieldlist[$field] == 'region_id') { - $region_id = (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:0); + } elseif ($value == 'region_id') { + $region_id = (!empty($obj->{$value}) ? $obj->{$value}:0); print ''; - print ''; + print ''; print ''; - } elseif ($fieldlist[$field] == 'lang') { + } elseif ($value == 'lang') { print ''; print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'lang'); print ''; - } elseif ($fieldlist[$field] == 'element') { + } elseif ($value == 'element') { // The type of the element (for contact types) print ''; - print $form->selectarray('element', $elementList, (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:'')); + print $form->selectarray('element', $elementList, (!empty($obj->{$value}) ? $obj->{$value}:'')); print ''; - } elseif ($fieldlist[$field] == 'source') { + } elseif ($value == 'source') { // The source of the element (for contact types) print ''; - print $form->selectarray('source', $sourceList, (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:'')); + print $form->selectarray('source', $sourceList, (!empty($obj->{$value}) ? $obj->{$value}:'')); print ''; - } elseif ($fieldlist[$field] == 'private') { + } elseif ($value == 'private') { print ''; - print $form->selectyesno("private", (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:'')); + print $form->selectyesno("private", (!empty($obj->{$value}) ? $obj->{$value}:'')); print ''; - } elseif ($fieldlist[$field] == 'type' && $tabname == MAIN_DB_PREFIX."c_actioncomm") { + } elseif ($value == 'type' && $tabname == MAIN_DB_PREFIX."c_actioncomm") { $type = (!empty($obj->type) ? $obj->type : 'user'); // Check if type is different of 'user' (external module) print ''; print $type.''; print ''; - } elseif ($fieldlist[$field] == 'type' && $tabname == MAIN_DB_PREFIX.'c_paiement') { + } elseif ($value == 'type' && $tabname == MAIN_DB_PREFIX.'c_paiement') { print ''; $select_list = array(0=>$langs->trans('PaymentTypeCustomer'), 1=>$langs->trans('PaymentTypeSupplier'), 2=>$langs->trans('PaymentTypeBoth')); - print $form->selectarray($fieldlist[$field], $select_list, (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:'2')); + print $form->selectarray($value, $select_list, (!empty($obj->{$value}) ? $obj->{$value}:'2')); print ''; - } elseif ($fieldlist[$field] == 'recuperableonly' || $fieldlist[$field] == 'type_cdr' || $fieldlist[$field] == 'deductible' || $fieldlist[$field] == 'category_type') { - if ($fieldlist[$field] == 'type_cdr') { + } elseif ($value == 'recuperableonly' || $value == 'type_cdr' || $value == 'deductible' || $value == 'category_type') { + if ($value == 'type_cdr') { print ''; } else { print ''; } - if ($fieldlist[$field] == 'type_cdr') { - print $form->selectarray($fieldlist[$field], array(0=>$langs->trans('None'), 1=>$langs->trans('AtEndOfMonth'), 2=>$langs->trans('CurrentNext')), (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:'')); + if ($value == 'type_cdr') { + print $form->selectarray($value, array(0=>$langs->trans('None'), 1=>$langs->trans('AtEndOfMonth'), 2=>$langs->trans('CurrentNext')), (!empty($obj->{$value}) ? $obj->{$value}:'')); } else { - print $form->selectyesno($fieldlist[$field], (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:''), 1); + print $form->selectyesno($value, (!empty($obj->{$value}) ? $obj->{$value}:''), 1); } print ''; - } elseif (in_array($fieldlist[$field], array('nbjour', 'decalage', 'taux', 'localtax1', 'localtax2'))) { + } elseif (in_array($value, array('nbjour', 'decalage', 'taux', 'localtax1', 'localtax2'))) { $class = "left"; - if (in_array($fieldlist[$field], array('taux', 'localtax1', 'localtax2'))) { + if (in_array($value, array('taux', 'localtax1', 'localtax2'))) { $class = "center"; // Fields aligned on right } print ''; - print ''; + print ''; print ''; - } elseif (in_array($fieldlist[$field], array('libelle_facture'))) { + } elseif (in_array($value, array('libelle_facture'))) { print ''; $transfound = 0; $transkey = ''; @@ -2295,16 +2295,16 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') } } if (!$transfound) { - print ''; + print ''; } else { - print ''; + print ''; } print ''; - } elseif ($fieldlist[$field] == 'price' || preg_match('/^amount/i', $fieldlist[$field])) { - print ''; - } elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) { - print ''; - } elseif ($fieldlist[$field] == 'unit') { + } elseif ($value == 'price' || preg_match('/^amount/i', $value)) { + print ''; + } elseif ($value == 'code' && isset($obj->{$value})) { + print ''; + } elseif ($value == 'unit') { print ''; $units = array( 'mm' => $langs->trans('SizeUnitmm'), @@ -2312,40 +2312,40 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') 'point' => $langs->trans('SizeUnitpoint'), 'inch' => $langs->trans('SizeUnitinch') ); - print $form->selectarray('unit', $units, (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:''), 0, 0, 0); + print $form->selectarray('unit', $units, (!empty($obj->{$value}) ? $obj->{$value}:''), 0, 0, 0); print ''; - } elseif ($fieldlist[$field] == 'localtax1_type' || $fieldlist[$field] == 'localtax2_type') { + } elseif ($value == 'localtax1_type' || $value == 'localtax2_type') { // Le type de taxe locale print ''; - print $form->selectarray($fieldlist[$field], $localtax_typeList, (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:'')); + print $form->selectarray($value, $localtax_typeList, (!empty($obj->{$value}) ? $obj->{$value}:'')); print ''; - } elseif ($fieldlist[$field] == 'accountancy_code' || $fieldlist[$field] == 'accountancy_code_sell' || $fieldlist[$field] == 'accountancy_code_buy') { + } elseif ($value == 'accountancy_code' || $value == 'accountancy_code_sell' || $value == 'accountancy_code_buy') { print ''; if (!empty($conf->accounting->enabled)) { - $fieldname = $fieldlist[$field]; + $fieldname = $value; $accountancy_account = (!empty($obj->$fieldname) ? $obj->$fieldname : 0); - print $formaccounting->select_account($accountancy_account, '.'.$fieldlist[$field], 1, '', 1, 1, 'maxwidth200 maxwidthonsmartphone'); + print $formaccounting->select_account($accountancy_account, '.'. $value, 1, '', 1, 1, 'maxwidth200 maxwidthonsmartphone'); } else { - $fieldname = $fieldlist[$field]; - print ''; + $fieldname = $value; + print ''; } print ''; - } elseif ($fieldlist[$field] == 'fk_tva') { + } elseif ($value == 'fk_tva') { print ''; print $form->load_tva('fk_tva', $obj->taux, $mysoc, new Societe($db), 0, 0, '', false, -1); print ''; - } elseif ($fieldlist[$field] == 'fk_c_exp_tax_cat') { + } elseif ($value == 'fk_c_exp_tax_cat') { print ''; print $form->selectExpenseCategories($obj->fk_c_exp_tax_cat); print ''; - } elseif ($fieldlist[$field] == 'fk_range') { + } elseif ($value == 'fk_range') { print ''; print $form->selectExpenseRanges($obj->fk_range); print ''; } else { - $fieldValue = isset($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:''; + $fieldValue = isset($obj->{$value}) ? $obj->{$value}:''; - if ($fieldlist[$field] == 'sortorder') { + if ($value == 'sortorder') { $fieldlist[$field] = 'position'; } diff --git a/htdocs/admin/emailcollector_list.php b/htdocs/admin/emailcollector_list.php index 09a790a9f68..2c6739e96dd 100644 --- a/htdocs/admin/emailcollector_list.php +++ b/htdocs/admin/emailcollector_list.php @@ -356,11 +356,11 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // List of mass actions available $arrayofmassactions = array( - //'presend'=>$langs->trans("SendByMail"), - //'builddoc'=>$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); if ($permissiontodelete) { - $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); diff --git a/htdocs/admin/mails_senderprofile_list.php b/htdocs/admin/mails_senderprofile_list.php index 8f781318995..7da20aa36c7 100644 --- a/htdocs/admin/mails_senderprofile_list.php +++ b/htdocs/admin/mails_senderprofile_list.php @@ -354,10 +354,10 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // List of mass actions available $arrayofmassactions = array( - //'presend'=>$langs->trans("SendByMail"), - //'builddoc'=>$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); -//if ($permissiontodelete) $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); +//if ($permissiontodelete) $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); //if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); $massactionbutton = $form->selectMassAction('', $arrayofmassactions); diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php index f84425eda4d..d6b6d6e428a 100644 --- a/htdocs/admin/sms.php +++ b/htdocs/admin/sms.php @@ -172,7 +172,7 @@ if ($action == 'edit') { // Disable print ''.$langs->trans("MAIN_DISABLE_ALL_SMS").''; - print $form->selectyesno('MAIN_DISABLE_ALL_SMS', $conf->global->MAIN_DISABLE_ALL_SMS, 1); + print $form->selectyesno('MAIN_DISABLE_ALL_SMS', getDolGlobalString('MAIN_DISABLE_ALL_SMS'), 1); print ''; // Separator @@ -189,7 +189,7 @@ if ($action == 'edit') { // From print ''.$langs->trans("MAIN_MAIL_SMS_FROM", $langs->transnoentities("Undefined")).''; - print ''; // Autocopy to @@ -213,14 +213,14 @@ if ($action == 'edit') { print ''.$langs->trans("Parameter").''.$langs->trans("Value").''; // Disable - print ''.$langs->trans("MAIN_DISABLE_ALL_SMS").''.yn($conf->global->MAIN_DISABLE_ALL_SMS).''; + print ''.$langs->trans("MAIN_DISABLE_ALL_SMS").''.yn(getDolGlobalString('MAIN_DISABLE_ALL_SMS')).''; // Separator print ' '; // Method print ''.$langs->trans("MAIN_SMS_SENDMODE").''; - $text = $listofmethods[$conf->global->MAIN_SMS_SENDMODE]; + $text = empty(getDolGlobalString('MAIN_SMS_SENDMODE')) ? '' : $listofmethods[getDolGlobalString('MAIN_SMS_SENDMODE')]; if (empty($text)) { $text = $langs->trans("Undefined").' '.img_warning(); } @@ -229,7 +229,7 @@ if ($action == 'edit') { // From print ''.$langs->trans("MAIN_MAIL_SMS_FROM", $langs->transnoentities("Undefined")).''; - print ''.$conf->global->MAIN_MAIL_SMS_FROM; + print ''.getDolGlobalString('MAIN_MAIL_SMS_FROM'); if (!empty($conf->global->MAIN_MAIL_SMS_FROM) && !isValidPhone($conf->global->MAIN_MAIL_SMS_FROM)) { print ' '.img_warning($langs->trans("ErrorBadPhone")); } diff --git a/htdocs/asset/list.php b/htdocs/asset/list.php index e0beefd688f..1e906677e7d 100644 --- a/htdocs/asset/list.php +++ b/htdocs/asset/list.php @@ -346,11 +346,11 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // List of mass actions available $arrayofmassactions = array( - //'presend'=>$langs->trans("SendByMail"), - //'builddoc'=>$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); if ($permissiontodelete) { - $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); diff --git a/htdocs/bom/bom_list.php b/htdocs/bom/bom_list.php index 16172d8f037..ed1a0c3ab42 100644 --- a/htdocs/bom/bom_list.php +++ b/htdocs/bom/bom_list.php @@ -421,7 +421,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // List of mass actions available $arrayofmassactions = array( - //'presend'=>img_picto('', 'email').$langs->trans("SendByMail"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), 'enable'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Enable"), 'disable'=>img_picto('', 'close_title', 'class="pictofixedwidth"').$langs->trans("Disable"), ); diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index e4405f0aea6..d94b5cbdd88 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -143,13 +143,13 @@ $moreforfilter = ''; // List of mass actions available $arrayofmassactions = array( - //'validate'=>$langs->trans("Validate"), - //'generate_doc'=>$langs->trans("ReGeneratePDF"), - //'builddoc'=>$langs->trans("PDFMerge"), - //'presend'=>$langs->trans("SendByMail"), + //'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"), + //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); if ($permissiontodelete) { - $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index 5e11c5cb030..3160c8e289a 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -88,7 +88,7 @@ if ($action == 'addcontact' && $user->rights->commande->creer) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { - dol_print_error($db); + setEventMessages($object->error, $object->errors, 'errors'); } } /* diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 965e0f6c94b..f6b719515cc 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -736,10 +736,10 @@ if ($resql) { // List of mass actions available $arrayofmassactions = array( - //'presend'=>$langs->trans("SendByMail"), - //'builddoc'=>$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); - //if ($user->rights->bank->supprimer) $arrayofmassactions['predelete']=''.$langs->trans("Delete"); + //if ($user->rights->bank->supprimer) $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); if (in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); } diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index ef190884e22..384d0ef6963 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -295,8 +295,8 @@ $param .= $hookmanager->resPrint; // List of mass actions available $arrayofmassactions = array( -// 'presend'=>img_picto('', 'email').$langs->trans("SendByMail"), -// 'builddoc'=>img_picto('', 'pdf').$langs->trans("PDFMerge"), +// 'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), +// 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); if ($permissiontodelete) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); diff --git a/htdocs/compta/cashcontrol/cashcontrol_list.php b/htdocs/compta/cashcontrol/cashcontrol_list.php index 79ac1e1b708..34264649ead 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_list.php +++ b/htdocs/compta/cashcontrol/cashcontrol_list.php @@ -379,10 +379,10 @@ $param .= $hookmanager->resPrint; // List of mass actions available $arrayofmassactions = array( -//'presend'=>$langs->trans("SendByMail"), -//'builddoc'=>$langs->trans("PDFMerge"), +//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), +//'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); -//if ($user->rights->monmodule->delete) $arrayofmassactions['predelete']=''.$langs->trans("Delete"); +//if ($user->rights->monmodule->delete) $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); } diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 884a3da9e6a..db666d1b1ae 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -1336,7 +1336,7 @@ if ($resql) { // Status if (!empty($arrayfields['f.fk_statut']['checked'])) { print ''; - $liststatus = array('0'=>$langs->trans("BillShortStatusDraft"), '1'=>$langs->trans("BillShortStatusNotPaid"), '2'=>$langs->trans("BillShortStatusPaid"), '1,2'=>$langs->trans("BillShortStatusNotPaid").'+'.$langs->trans("BillShortStatusPaid"), '3'=>$langs->trans("BillShortStatusCanceled")); + $liststatus = array('0'=>$langs->trans("BillShortStatusDraft"), '1'=>$langs->trans("BillShortStatusNotPaid"), '0,1'=>$langs->trans("BillShortStatusDraft").'+'.$langs->trans("BillShortStatusNotPaid"), '2'=>$langs->trans("BillShortStatusPaid"), '1,2'=>$langs->trans("BillShortStatusNotPaid").'+'.$langs->trans("BillShortStatusPaid"), '3'=>$langs->trans("BillShortStatusCanceled")); print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 0, 0, 0, '', '', 1); print ''; } diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 27e6343cbf4..b02856ceb3b 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -653,8 +653,8 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // List of mass actions available $arrayofmassactions = array( -// 'presend'=>img_picto('', 'email').$langs->trans("SendByMail"), -// 'builddoc'=>img_picto('', 'pdf').$langs->trans("PDFMerge"), +// 'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), +// 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); //if($user->rights->societe->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer"); if ($user->rights->societe->supprimer) { diff --git a/htdocs/contrat/services_list.php b/htdocs/contrat/services_list.php index a85c46209ec..7247dc02c83 100644 --- a/htdocs/contrat/services_list.php +++ b/htdocs/contrat/services_list.php @@ -432,10 +432,10 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // List of mass actions available $arrayofmassactions = array( - //'presend'=>$langs->trans("SendByMail"), - //'builddoc'=>$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); -//if ($user->rights->contrat->supprimer) $arrayofmassactions['predelete']=''.$langs->trans("Delete"); +//if ($user->rights->contrat->supprimer) $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); //if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton = $form->selectMassAction('', $arrayofmassactions); diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index 6ac331167d3..6933cf2c597 100644 --- a/htdocs/core/class/dolreceiptprinter.class.php +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -50,6 +50,7 @@ * {dol_print_object_local_tax} Print object local tax * {dol_print_object_total} Print object total * {dol_print_order_lines} Print order lines for Printer + * {dol_print_object_lines_with_notes} Print object lines with notes * {dol_print_payment} Print payment method * * Code which can be placed everywhere @@ -191,6 +192,7 @@ class dolReceiptPrinter extends Printer 'dol_value_object_id' => 'InvoiceID', 'dol_value_object_ref' => 'InvoiceRef', 'dol_print_object_lines' => 'DOL_PRINT_OBJECT_LINES', + 'dol_print_object_lines_with_notes' => 'DOL_PRINT_OBJECT_LINES_WITH_NOTES', 'dol_print_object_tax' => 'TotalVAT', 'dol_print_object_local_tax1' => 'TotalLT1', 'dol_print_object_local_tax2' => 'TotalLT2', @@ -641,6 +643,23 @@ class dolReceiptPrinter extends Printer } } break; + case 'DOL_PRINT_OBJECT_LINES_WITH_NOTES': + foreach ($object->lines as $line) { + if ($line->fk_product) { + $spacestoadd = $nbcharactbyline - strlen($line->ref) - strlen($line->qty) - 10 - 1; + $spaces = str_repeat(' ', $spacestoadd > 0 ? $spacestoadd : 0); + $this->printer->text($line->ref.$spaces.$line->qty.' '.str_pad(price($line->total_ttc), 10, ' ', STR_PAD_LEFT)."\n"); + $this->printer->text(strip_tags(htmlspecialchars_decode($line->product_label))."\n"); + $spacestoadd = $nbcharactbyline - strlen($line->description) - strlen($line->qty) - 10 - 1; + $spaces = str_repeat(' ', $spacestoadd > 0 ? $spacestoadd : 0); + $this->printer->text($line->description."\n"); + } else { + $spacestoadd = $nbcharactbyline - strlen($line->description) - strlen($line->qty) - 10 - 1; + $spaces = str_repeat(' ', $spacestoadd > 0 ? $spacestoadd : 0); + $this->printer->text($line->description.$spaces.$line->qty.' '.str_pad(price($line->total_ttc), 10, ' ', STR_PAD_LEFT)."\n"); + } + } + break; case 'DOL_PRINT_OBJECT_TAX': //var_dump($object); $vatarray = array(); diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index aff77ce7285..4177c4237b8 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -505,7 +505,7 @@ class FormProjets } $linkedtothirdparty = false; - if (!in_array($table_element, array('don', 'expensereport_det', 'expensereport', 'loan', 'stock_mouvement', 'payment_salary', 'payment_various', 'chargesociales'))) { + if (!in_array($table_element, array('don', 'expensereport_det', 'expensereport', 'loan', 'stock_mouvement', 'payment_salary', 'payment_various', 'chargesociales', 'entrepot'))) { $linkedtothirdparty = true; } diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index ed01d9d6e9f..cee99749d00 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1228,14 +1228,14 @@ function complete_dictionary_with_modules(&$taborder, &$tabname, &$tablib, &$tab // We discard modules according to features level (PS: if module is activated we always show it) $const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i', '', get_class($objMod))); - if ($objMod->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2 && !$conf->global->$const_name) { + if ($objMod->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2 && empty(getDolGlobalString($const_name))) { $modulequalified = 0; } - if ($objMod->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1 && !$conf->global->$const_name) { + if ($objMod->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1 && empty(getDolGlobalString($const_name))) { $modulequalified = 0; } //If module is not activated disqualified - if (empty($conf->global->$const_name)) { + if (empty(getDolGlobalString($const_name))) { $modulequalified = 0; } diff --git a/htdocs/core/modules/modPartnership.class.php b/htdocs/core/modules/modPartnership.class.php index 442e01b56f6..17c137a7e3c 100644 --- a/htdocs/core/modules/modPartnership.class.php +++ b/htdocs/core/modules/modPartnership.class.php @@ -177,7 +177,7 @@ class modPartnership extends DolibarrModules // Array to add new pages in new tabs $this->tabs = array(); - $tabtoadd = ($conf->global->PARTNERSHIP_IS_MANAGED_FOR == 'member') ? 'member' : 'thirdparty'; + $tabtoadd = (!empty(getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR')) && getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR') == 'member') ? 'member' : 'thirdparty'; if ($tabtoadd == 'member') { $this->tabs[] = array('data'=>'member:+partnership:Partnership:partnership@partnership:$user->rights->partnership->read:/partnership/partnership.php?socid=__ID__'); diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index 712b2ceb163..a88bcda9a66 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -359,13 +359,13 @@ if ($action == 'execute') { // List of mass actions available $arrayofmassactions = array( -//'presend'=>$langs->trans("SendByMail"), -//'builddoc'=>$langs->trans("PDFMerge"), - 'enable'=>$langs->trans("CronStatusActiveBtn"), - 'disable'=>$langs->trans("CronStatusInactiveBtn"), +//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), +//'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + 'enable'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("CronStatusActiveBtn"), + 'disable'=>img_picto('', 'title_close', 'class="pictofixedwidth"').$langs->trans("CronStatusInactiveBtn"), ); if ($user->rights->cron->delete) { - $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } if (in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php index 5bc3bee5d3c..c2bccfaa517 100644 --- a/htdocs/eventorganization/conferenceorbooth_list.php +++ b/htdocs/eventorganization/conferenceorbooth_list.php @@ -573,10 +573,10 @@ $param .= $hookmanager->resPrint; // List of mass actions available $arrayofmassactions = array( - //'validate'=>img_picto('', 'check').$langs->trans("Validate"), - //'generate_doc'=>img_picto('', 'pdf').$langs->trans("ReGeneratePDF"), - //'builddoc'=>img_picto('', 'pdf').$langs->trans("PDFMerge"), - //'presend'=>img_picto('', 'email').$langs->trans("SendByMail"), + //'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"), + //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); if ($permissiontodelete) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); diff --git a/htdocs/fourn/commande/contact.php b/htdocs/fourn/commande/contact.php index d673af33f16..f52aa20d494 100644 --- a/htdocs/fourn/commande/contact.php +++ b/htdocs/fourn/commande/contact.php @@ -78,7 +78,7 @@ if ($action == 'addcontact' && ($user->rights->fournisseur->commande->creer || $ if ($object->fetch($id)) { $result = $object->swapContactStatus(GETPOST('ligne', 'int')); } else { - dol_print_error($db); + setEventMessages($object->error, $object->errors, 'errors'); } } elseif ($action == 'deletecontact' && ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer)) { // Deleting a contact @@ -89,7 +89,7 @@ if ($action == 'addcontact' && ($user->rights->fournisseur->commande->creer || $ header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { - dol_print_error($db); + setEventMessages($object->error, $object->errors, 'errors'); } } diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index e30e1798a52..4fd45d6cff0 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -852,10 +852,10 @@ if ($resql) { // List of mass actions available $arrayofmassactions = array( - 'validate'=>$langs->trans("Validate"), - 'generate_doc'=>$langs->trans("ReGeneratePDF"), - //'builddoc'=>$langs->trans("PDFMerge"), - //'presend'=>$langs->trans("SendByMail"), + 'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"), + 'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); if ($conf->paymentbybanktransfer->enabled) { $langs->load("withdrawals"); @@ -867,7 +867,7 @@ if ($resql) { $arrayofmassactions['banktransfertrequest'] = $langs->trans("MakeBankTransferOrder"); } if ($user->rights->fournisseur->facture->supprimer) { - $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } if (in_array($massaction, array('presend', 'predelete', 'createbills'))) { $arrayofmassactions = array(); diff --git a/htdocs/fourn/product/list.php b/htdocs/fourn/product/list.php index 32ddf769ce2..f411d70af25 100644 --- a/htdocs/fourn/product/list.php +++ b/htdocs/fourn/product/list.php @@ -131,12 +131,12 @@ if ($fourn_id) { $arrayofmassactions = array( - 'generate_doc'=>$langs->trans("ReGeneratePDF"), - 'builddoc'=>$langs->trans("PDFMerge"), - 'presend'=>$langs->trans("SendByMail"), + 'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + 'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); if ($user->rights->mymodule->supprimer) { - $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } if (in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index f49a3145af9..b00abadb9c3 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -434,12 +434,12 @@ if ($resql) { // List of mass actions available $arrayofmassactions = array( - //'generate_doc'=>$langs->trans("ReGeneratePDF"), - //'builddoc'=>$langs->trans("PDFMerge"), - //'presend'=>$langs->trans("SendByMail"), + //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); if (!empty($user->rights->holiday->delete)) { - $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } if (in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); diff --git a/htdocs/install/mysql/data/llx_10_c_regions.sql b/htdocs/install/mysql/data/llx_10_c_regions.sql index fc1bb335241..f2f1048cf19 100644 --- a/htdocs/install/mysql/data/llx_10_c_regions.sql +++ b/htdocs/install/mysql/data/llx_10_c_regions.sql @@ -70,6 +70,8 @@ -- India -> for Departmements -- Indonesia -> for Departmements -- Italy +-- Luxembourg +-- Morocco -- Mexique -> for Departmements -- Netherlands -> for Departmements -- Panama -> for Departmements @@ -77,6 +79,7 @@ -- San Salvador -- Spain -- Switzerland/Suisse -> for Departmements/Cantons +-- Tunesia -- United Kingdom -- USA -> for Departmements @@ -201,19 +204,19 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 5 -- Greece Regions (id_country=102) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10201, NULL, NULL, 'Αττική'); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10202, NULL, NULL, 'Στερεά Ελλάδα'); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10203, NULL, NULL, 'Κεντρική Μακεδονία'); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10204, NULL, NULL, 'Κρήτη'); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10205, NULL, NULL, 'Ανατολική Μακεδονία και Θράκη'); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10206, NULL, NULL, 'Ήπειρος'); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10207, NULL, NULL, 'Ιόνια νησιά'); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10208, NULL, NULL, 'Βόρειο Αιγαίο'); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10209, NULL, NULL, 'Πελοπόννησος'); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10210, NULL, NULL, 'Νότιο Αιγαίο'); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10211, NULL, NULL, 'Δυτική Ελλάδα'); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10212, NULL, NULL, 'Θεσσαλία'); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10213, NULL, NULL, 'Δυτική Μακεδονία'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10201, NULL, NULL, 'Αττική'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10202, NULL, NULL, 'Στερεά Ελλάδα'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10203, NULL, NULL, 'Κεντρική Μακεδονία'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10204, NULL, NULL, 'Κρήτη'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10205, NULL, NULL, 'Ανατολική Μακεδονία και Θράκη'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10206, NULL, NULL, 'Ήπειρος'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10207, NULL, NULL, 'Ιόνια νησιά'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10208, NULL, NULL, 'Βόρειο Αιγαίο'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10209, NULL, NULL, 'Πελοπόννησος'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10210, NULL, NULL, 'Νότιο Αιγαίο'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10211, NULL, NULL, 'Δυτική Ελλάδα'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10212, NULL, NULL, 'Θεσσαλία'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10213, NULL, NULL, 'Δυτική Μακεδονία'); -- Honduras Regions (id country=114) @@ -251,6 +254,31 @@ insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3 insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 320, NULL, 1, 'Veneto'); +-- Luxembourg Regions (districts) (id country=140) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 140, 14001, '', 0, 'Diekirch'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 140, 14002, '', 0, 'Grevenmacher'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 140, 14003, '', 0, 'Luxembourg'); + + +-- Morocco / Maroc - Regions (id country=12) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1201, '', 0, 'Tanger-Tétouan'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1202, '', 0, 'Gharb-Chrarda-Beni Hssen'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1203, '', 0, 'Taza-Al Hoceima-Taounate'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1204, '', 0, 'L''Oriental'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1205, '', 0, 'Fès-Boulemane'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1206, '', 0, 'Meknès-Tafialet'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1207, '', 0, 'Rabat-Salé-Zemour-Zaër'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1208, '', 0, 'Grand Cassablanca'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1209, '', 0, 'Chaouia-Ouardigha'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1210, '', 0, 'Doukahla-Adba'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1211, '', 0, 'Marrakech-Tensift-Al Haouz'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1212, '', 0, 'Tadla-Azilal'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1213, '', 0, 'Sous-Massa-Drâa'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1214, '', 0, 'Guelmim-Es Smara'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1215, '', 0, 'Laâyoune-Boujdour-Sakia el Hamra'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1216, '', 0, 'Oued Ed-Dahab Lagouira'); + + -- Mexique Regions (id country=154) insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 154, 15401, '', 0, 'Mexique'); @@ -268,9 +296,9 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1 -- San Salvador Regions (id country=86) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (86, 8601, NULL, NULL, 'Central'); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (86, 8602, NULL, NULL, 'Oriental'); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (86, 8603, NULL, NULL, 'Occidental'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 86, 8601, NULL, NULL, 'Central'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 86, 8602, NULL, NULL, 'Oriental'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 86, 8603, NULL, NULL, 'Occidental'); -- Spain Regions (id country=4) @@ -300,6 +328,33 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 4 INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 6, 601, '', 1, 'Cantons'); +-- Tunisia Regions (id country=10) +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1001, '',0,'Ariana'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1002, '',0,'Béja'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1003, '',0,'Ben Arous'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1004, '',0,'Bizerte'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1005, '',0,'Gabès'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1006, '',0,'Gafsa'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1007, '',0,'Jendouba'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1008, '',0,'Kairouan'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1009, '',0,'Kasserine'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1010, '',0,'Kébili'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1011, '',0,'La Manouba'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1012, '',0,'Le Kef'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1013, '',0,'Mahdia'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1014, '',0,'Médenine'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1015, '',0,'Monastir'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1016, '',0,'Nabeul'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1017, '',0,'Sfax'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1018, '',0,'Sidi Bouzid'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1019, '',0,'Siliana'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1020, '',0,'Sousse'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1021, '',0,'Tataouine'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1022, '',0,'Tozeur'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1023, '',0,'Tunis'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1024, '',0,'Zaghouan'); + + -- UK United Kingdom Regions (id_country=7) INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 7, 701, '', 0, 'England'); INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 7, 702, '', 0, 'Wales'); @@ -312,56 +367,8 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1 --- Regions Tunisia (id country=10) -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1001, '',0,'Ariana'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1002, '',0,'Béja'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1003, '',0,'Ben Arous'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1004, '',0,'Bizerte'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1005, '',0,'Gabès'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1006, '',0,'Gafsa'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1007, '',0,'Jendouba'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1008, '',0,'Kairouan'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1009, '',0,'Kasserine'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1010, '',0,'Kébili'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1011, '',0,'La Manouba'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1012, '',0,'Le Kef'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1013, '',0,'Mahdia'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1014, '',0,'Médenine'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1015, '',0,'Monastir'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1016, '',0,'Nabeul'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1017, '',0,'Sfax'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1018, '',0,'Sidi Bouzid'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1019, '',0,'Siliana'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1020, '',0,'Sousse'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1021, '',0,'Tataouine'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1022, '',0,'Tozeur'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1023, '',0,'Tunis'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1024, '',0,'Zaghouan'); --- Regions Maroc - Moroco (id country=12) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1201, '', 0, 'Tanger-Tétouan', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1202, '', 0, 'Gharb-Chrarda-Beni Hssen', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1203, '', 0, 'Taza-Al Hoceima-Taounate', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1204, '', 0, 'L''Oriental', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1205, '', 0, 'Fès-Boulemane', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1206, '', 0, 'Meknès-Tafialet', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1207, '', 0, 'Rabat-Salé-Zemour-Zaër', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1208, '', 0, 'Grand Cassablanca', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1209, '', 0, 'Chaouia-Ouardigha', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1210, '', 0, 'Doukahla-Adba', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1211, '', 0, 'Marrakech-Tensift-Al Haouz', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1212, '', 0, 'Tadla-Azilal', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1213, '', 0, 'Sous-Massa-Drâa', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1214, '', 0, 'Guelmim-Es Smara', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1215, '', 0, 'Laâyoune-Boujdour-Sakia el Hamra', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1216, '', 0, 'Oued Ed-Dahab Lagouira', 1); - --- Regions (districts) Luxembourg (id country=140) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 140, 14001, '', 0, 'Diekirch', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 140, 14002, '', 0, 'Grevenmacher', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 140, 14003, '', 0, 'Luxembourg', 1); - -- Regions Mauritius (id country=152) INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 152, 15201, '', 0, 'Rivière Noire', 1); INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 152, 15202, '', 0, 'Flacq', 1); diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index 33a0fafb5dc..d14e52d14e8 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project diff --git a/htdocs/langs/fr_FR/projects.lang b/htdocs/langs/fr_FR/projects.lang index a963bffe13d..d7f3997a019 100644 --- a/htdocs/langs/fr_FR/projects.lang +++ b/htdocs/langs/fr_FR/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consommé ListOfTasks=Liste de tâches GoToListOfTimeConsumed=Aller à la liste des temps consommés GanttView=Vue Gantt +ListWarehouseAssociatedProject=Liste des entrepôts associés au projet ListProposalsAssociatedProject=Liste des propositions commerciales associées au projet ListOrdersAssociatedProject=Liste des commandes clients associées au projet ListInvoicesAssociatedProject=Liste des factures clients associées au projet diff --git a/htdocs/partnership/partnership_list.php b/htdocs/partnership/partnership_list.php index 2d7ffacf452..0e0ee3da9c3 100644 --- a/htdocs/partnership/partnership_list.php +++ b/htdocs/partnership/partnership_list.php @@ -432,8 +432,8 @@ $param .= $hookmanager->resPrint; // List of mass actions available $arrayofmassactions = array( 'cancel'=>img_picto('', 'close_title', 'class="pictofixedwidth"').$langs->trans("Cancel"), - //'generate_doc'=>img_picto('', 'pdf').$langs->trans("ReGeneratePDF"), - //'builddoc'=>img_picto('', 'pdf').$langs->trans("PDFMerge"), + //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), 'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); if ($permissiontodelete) { diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 7f2f8f58bb5..dc5f01bb666 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -41,6 +41,7 @@ $langs->loadLangs(array('products', 'stocks', 'companies', 'categories')); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); $confirm = GETPOST('confirm'); +$projectid = GETPOST('projectid', 'int'); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index e408d37d527..d49db2f7b02 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -359,7 +359,7 @@ $arrayofmassactions = array( //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); -//if ($user->rights->stock->supprimer) $arrayofmassactions['predelete']=img_picto('', 'delete').$langs->trans("Delete"); +//if ($user->rights->stock->supprimer) $arrayofmassactions['predelete']=img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete','preaffecttag'))) { $arrayofmassactions = array(); } diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index 50982e0e084..4a9a0bb9613 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -808,12 +808,12 @@ if ($resql) { // List of mass actions available $arrayofmassactions = array( - // 'presend'=>$langs->trans("SendByMail"), - // 'builddoc'=>$langs->trans("PDFMerge"), + // 'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), + // 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); // By default, we should never accept deletion of stock movement. if (!empty($conf->global->STOCK_ALLOW_DELETE_OF_MOVEMENT) && $permissiontodelete) { - $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php index e467aa80d95..00c8c186c66 100644 --- a/htdocs/product/stock/productlot_list.php +++ b/htdocs/product/stock/productlot_list.php @@ -346,13 +346,13 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // List of mass actions available $arrayofmassactions = array( - //'validate'=>$langs->trans("Validate"), - //'generate_doc'=>$langs->trans("ReGeneratePDF"), - //'builddoc'=>$langs->trans("PDFMerge"), - //'presend'=>$langs->trans("SendByMail"), + //'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"), + //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); if ($permissiontodelete) { - $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index 4c494732499..c9109b348d6 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -5,6 +5,7 @@ * Copyright (C) 2016 Juanjo Menent * Copyright (C) 2016 ATM Consulting * Copyright (C) 2019 Frédéric France + * Copyright (C) 2021 Ferran Marcet * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -750,7 +751,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { if (!empty($conf->global->STOCK_SUPPORTS_SERVICES) || $objp->fk_product_type == 0) { $prod->fetch($objp->rowid); - $prod->load_stock('warehouseopen, warehouseinternal', $draftchecked); + $prod->load_stock('warehouseopen, warehouseinternal'.(!$usevirtualstock?', novirtual':''), $draftchecked); // Multilangs if (!empty($conf->global->MAIN_MULTILANGS)) { @@ -785,11 +786,13 @@ while ($i < ($limit ? min($num, $limit) : $num)) { // Force call prod->load_stats_xxx to choose status to count (otherwise it is loaded by load_stock function) if (isset($draftchecked)) { $result = $prod->load_stats_commande_fournisseur(0, '0,1,2,3,4'); - } else { + } elseif (!$usevirtualstock) { $result = $prod->load_stats_commande_fournisseur(0, '1,2,3,4'); } - $result = $prod->load_stats_reception(0, '4'); + if (!$usevirtualstock) { + $result = $prod->load_stats_reception(0, '4'); + } //print $prod->stats_commande_fournisseur['qty'].'
'."\n"; //print $prod->stats_reception['qty']; diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 50ac450e136..5032cc27a89 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -1778,6 +1778,9 @@ class Project extends CommonObject if ($tableName == "actioncomm") { $sql .= " SET fk_project=".$this->id; $sql .= " WHERE id=".$elementSelectId; + } elseif ($tableName == "entrepot") { + $sql .= " SET fk_project=".$this->id; + $sql .= " WHERE rowid=".$elementSelectId; } else { $sql .= " SET fk_projet=".$this->id; $sql .= " WHERE rowid=".$elementSelectId; diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index f098e653c9a..31f33529774 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -7,6 +7,7 @@ * Copyright (C) 2015 Marcos García * Copyright (C) 2016 Josep Lluís Amador * Copyright (C) 2021 Gauthier VERDOL + * Copyright (C) 2021 Noé Cendrier * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -360,6 +361,18 @@ print '
'; */ $listofreferent = array( +'entrepot'=>array( + 'name'=>"Warehouse", + 'title'=>"ListWarehouseAssociatedProject", + 'class'=>'Entrepot', + 'table'=>'entrepot', + 'datefieldname'=>'date_entrepot', + 'urlnew'=>DOL_URL_ROOT.'/product/stock/card.php?action=create&projectid='.$id, + 'lang'=>'entrepot', + 'buttonnew'=>'AddWarehouse', + 'project_field'=>'fk_project', + 'testnew'=>$user->rights->stock->creer, + 'test'=>$conf->stock->enabled && $user->rights->stock->lire), 'propal'=>array( 'name'=>"Proposals", 'title'=>"ListProposalsAssociatedProject", diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 4d3de0494c8..a0888daee2a 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -612,8 +612,8 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // List of mass actions available $arrayofmassactions = array( 'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), - //'builddoc'=>img_picto('', 'pdf').$langs->trans("PDFMerge"), - //'presend'=>img_picto('', 'email').$langs->trans("SendByMail"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); //if($user->rights->societe->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer"); if ($user->rights->projet->creer) { diff --git a/htdocs/salaries/list.php b/htdocs/salaries/list.php index d11d4584ad0..b35b890b994 100644 --- a/htdocs/salaries/list.php +++ b/htdocs/salaries/list.php @@ -367,7 +367,7 @@ $arrayofmassactions = array( //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), //'buildsepa'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("BuildSepa"), // TODO ); -//if ($permissiontodelete) $arrayofmassactions['predelete'] = img_picto('', 'delete').$langs->trans("Delete"); +//if ($permissiontodelete) $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); } diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 7c2cfb63c64..9c5d261f996 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -848,14 +848,14 @@ if (GETPOST('delsoc')) { // List of mass actions available $arrayofmassactions = array( 'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), -// 'builddoc'=>img_picto('', 'pdf').$langs->trans("PDFMerge"), +// 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); //if($user->rights->societe->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer"); if ($user->rights->societe->supprimer) { - $arrayofmassactions['predelete'] = img_picto('', 'delete').$langs->trans("Delete"); + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } if ($user->rights->societe->creer) { - $arrayofmassactions['preaffecttag'] = img_picto('', 'category').$langs->trans("AffectTag"); + $arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag"); } if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) { $arrayofmassactions = array(); diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index 4dee1705476..2c7ba7694dd 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -510,10 +510,10 @@ if ($resql) { $arrayofmassactions = array( 'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), - //'presend'=>img_picto('', 'email').$langs->trans("SendByMail"), + //'presend'=>img_picto('', 'email',, 'class="pictofixedwidth"').' '.$langs->trans("SendByMail"), ); if ($user->rights->supplier_proposal->supprimer) { - $arrayofmassactions['predelete'] = img_picto('', 'delete').$langs->trans("Delete"); + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').' '.$langs->trans("Delete"); } if (in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); diff --git a/htdocs/user/list.php b/htdocs/user/list.php index c18b13a5bf8..1eecf26664c 100644 --- a/htdocs/user/list.php +++ b/htdocs/user/list.php @@ -533,7 +533,7 @@ if ($permissiontoadd) { if ($permissiontoadd) { $arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag"); } -//if ($permissiontodelete) $arrayofmassactions['predelete'] = img_picto('', 'delete').$langs->trans("Delete"); +//if ($permissiontodelete) $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').' '.$langs->trans("Delete"); if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) { $arrayofmassactions = array();