Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0

This commit is contained in:
Laurent Destailleur 2023-05-03 02:40:32 +02:00
commit a1d6e55189
3 changed files with 19 additions and 5 deletions

View File

@ -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

View File

@ -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);

View File

@ -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 (){} } );
}