diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 8169193ea08..948f195214a 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -222,6 +222,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; $object->fields = dol_sort_array($object->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); +$error = 0; /* @@ -513,6 +514,7 @@ if (empty($reshook)) { } else { $lineid = 0; $error++; + $errors[] = $objecttmp->error; break; } // Defined the new fk_parent_line diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 234eeb1e688..5fbc305b58b 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -752,7 +752,7 @@ if (!$error && $massaction == "builddoc" && $permissiontoread && !GETPOST('butto $arrayofinclusion[] = '^'.preg_quote(dol_sanitizeFileName($tmppdf), '/').'\.pdf$'; } foreach ($listofobjectref as $tmppdf) { - $arrayofinclusion[] = '^'.preg_quote(dol_sanitizeFileName($tmppdf), '/').'_[a-zA-Z0-9\-\_\']+\.pdf$'; // To include PDF generated from ODX files + $arrayofinclusion[] = '^'.preg_quote(dol_sanitizeFileName($tmppdf), '/').'_[a-zA-Z0-9\-\_\'\&\.]+\.pdf$'; // To include PDF generated from ODX files } $listoffiles = dol_dir_list($uploaddir, 'all', 1, implode('|', $arrayofinclusion), '\.meta$|\.png', 'date', SORT_DESC, 0, true); diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 1f7326ed40a..04279cf7fe5 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -2612,10 +2612,22 @@ if ($action == 'create') { ,async:false ,dataType:"json" ,success:function(response) { - if (response.response_status == "success"){ - jQuery("#value_unit_ht").val(response.data); - jQuery("#value_unit_ht").trigger("change"); - jQuery("#value_unit").val(""); + if (response.response_status == "success"){'; + + if (!empty($conf->global->EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY)) { + print ' + jQuery("#value_unit").val(parseFloat(response.data) * (100 + parseFloat(tva)) / 100); + jQuery("#value_unit").trigger("change"); + '; + } else { + print ' + jQuery("#value_unit_ht").val(response.data); + jQuery("#value_unit_ht").trigger("change"); + jQuery("#value_unit").val(""); + '; + } + + print ' } else if(response.response_status == "error" && response.errorMessage != undefined && response.errorMessage.length > 0 ){ $.jnotify(response.errorMessage, "error", {timeout: 0, type: "error"},{ remove: function (){} } ); }