Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
ldestailleur
2025-06-28 13:18:15 +02:00
7 changed files with 20 additions and 39 deletions

View File

@@ -243,6 +243,7 @@ class BookKeeping extends CommonObject
}
if (isset($this->doc_ref)) {
$this->doc_ref = trim($this->doc_ref);
$this->doc_ref = dol_trunc($this->doc_ref, 300); // We limit to 300 chars to avoid problems with too long ref in DB
}
if (isset($this->fk_doc)) {
$this->fk_doc = (int) $this->fk_doc;

View File

@@ -87,18 +87,10 @@ if ($action == 'builddoc' && ($permissiontoadd || !empty($usercangeneretedoc)))
}
// To be sure vars is defined
if (empty($hidedetails)) {
$hidedetails = 0;
}
if (empty($hidedesc)) {
$hidedesc = 0;
}
if (empty($hideref)) {
$hideref = 0;
}
if (empty($moreparams)) {
$moreparams = null;
}
$hidedetails = isset($hidedetails) ? $hidedetails : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS') ? 1 : 0);
$hidedesc = isset($hidedesc) ? $hidedesc : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DESC') ? 1 : 0);
$hideref = isset($hideref) ? $hideref : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_REF') ? 1 : 0);
$moreparams = isset($moreparams) ? $moreparams : null;
$result = $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams);
if ($result <= 0) {

View File

@@ -34,6 +34,7 @@
// $permissiontoread, $permissiontoadd, $permissiontodelete, $permissiontoclose may be defined
// $uploaddir may be defined (example to $conf->project->dir_output."/";)
// $hidedetails, $hidedesc, $hideref and $moreparams may have been set or not.
// $toselect may be defined
// $diroutputmassaction may be defined
// $confirm
@@ -1082,11 +1083,12 @@ if (!$error && $massaction == 'validate' && $permissiontoadd) {
}
$model = $objecttmp->model_pdf;
$ret = $objecttmp->fetch($objecttmp->id); // Reload to get new records
// To be sure vars is defined
$hidedetails = !empty($hidedetails) ? $hidedetails : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS') ? 1 : 0);
$hidedesc = !empty($hidedesc) ? $hidedesc : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DESC') ? 1 : 0);
$hideref = !empty($hideref) ? $hideref : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_REF') ? 1 : 0);
$moreparams = !empty($moreparams) ? $moreparams : null;
$hidedetails = isset($hidedetails) ? $hidedetails : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS') ? 1 : 0);
$hidedesc = isset($hidedesc) ? $hidedesc : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DESC') ? 1 : 0);
$hideref = isset($hideref) ? $hideref : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_REF') ? 1 : 0);
$moreparams = isset($moreparams) ? $moreparams : null;
$result = $objecttmp->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
if ($result < 0) {
@@ -1246,18 +1248,10 @@ EOPHAN;
}
// To be sure vars is defined
if (empty($hidedetails)) {
$hidedetails = (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS') ? 1 : 0);
}
if (empty($hidedesc)) {
$hidedesc = (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DESC') ? 1 : 0);
}
if (empty($hideref)) {
$hideref = (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_REF') ? 1 : 0);
}
if (empty($moreparams)) {
$moreparams = null;
}
$hidedetails = isset($hidedetails) ? $hidedetails : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS') ? 1 : 0);
$hidedesc = isset($hidedesc) ? $hidedesc : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DESC') ? 1 : 0);
$hideref = isset($hideref) ? $hideref : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_REF') ? 1 : 0);
$moreparams = isset($moreparams) ? $moreparams : null;
$result = $objecttmp->generateDocument($objecttmp->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams);

View File

@@ -6188,8 +6188,8 @@ class Form
$formconfirm .= '
resizable: false,
height: \'' . ((int) $height) . '\',
width: \'' . ((int) $width) . '\',
height: \'' . dol_escape_js($height) . '\',
width: \'' . dol_escape_js($width) . '\',
modal: true,
closeOnEscape: false,
buttons: {

View File

@@ -426,7 +426,6 @@ class Export
}
break;
case 'Duree':
break;
case 'Numeric':
// if there is a signe +
if (strpos($ValueField, "+") > 0) {
@@ -649,7 +648,6 @@ class Export
$szMsg = $langs->trans('ExportDateFilter');
break;
case 'Duree':
break;
case 'Numeric':
$szMsg = $langs->trans('ExportNumericFilter');
break;

View File

@@ -631,7 +631,7 @@ class Reception extends CommonObject
if ($qty == 0 || ($qty < 0 && !getDolGlobalInt('RECEPTION_ALLOW_NEGATIVE_QTY'))) {
continue;
}
dol_syslog(get_class($this)."::valid movement index ".$i." ed.rowid=".$obj->rowid." edb.rowid=".$obj->edbrowid);
dol_syslog(get_class($this)."::valid movement index ".$i." ed.rowid=".$obj->rowid);
//var_dump($this->lines[$i]);
$mouvS = new MouvementStock($this->db);
@@ -2038,11 +2038,7 @@ class Reception extends CommonObject
$qty = $obj->qty;
if ($qty <= 0) {
continue;
}
dol_syslog(get_class($this)."::reopen reception movement index ".$i." ed.rowid=".$obj->rowid." edb.rowid=".$obj->edbrowid);
dol_syslog(get_class($this)."::reopen reception movement index ".$i." ed.rowid=".$obj->rowid);
//var_dump($this->lines[$i]);
$mouvS = new MouvementStock($this->db);

View File

@@ -363,7 +363,7 @@ class Salaries extends DolibarrApi
* @phpstan-param ?array<string,string> $request_data
* @return Object PaymentSalary object
*
* @url POST {id}/payments
* @url PUT {id}/payments
*
* @throws RestException
*/