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

This commit is contained in:
Laurent Destailleur 2024-11-04 11:38:10 +01:00
commit fe547bb0df
4 changed files with 10 additions and 10 deletions

View File

@ -5375,7 +5375,7 @@ abstract class CommonObject
if (isset($this->expeditions[$line->id])) {
$qty_shipped = $this->expeditions[$line->id];
}
$disableedit = $qty_shipped >= $line->qty;
$disableedit = ($qty_shipped > 0) && ($qty_shipped >= $line->qty);
$dirtpls = array_merge($conf->modules_parts['tpl'], array($defaulttpldir));
foreach ($dirtpls as $module => $reldir) {

View File

@ -1947,13 +1947,13 @@ class ExtraFields
/**
* Return HTML string to put an output field into a page
*
* @param string $key Key of attribute
* @param string $value Value to show
* @param string $moreparam To add more parameters on html input tag (only checkbox use html input for output rendering)
* @param string $extrafieldsobjectkey Required (for example $object->table_element).
* @param Translate $outputlangs Output
* @param object $object The parent object of field to show
* @return string Formatted value
* @param string $key Key of attribute
* @param string $value Value to show
* @param string $moreparam To add more parameters on html input tag (only checkbox use html input for output rendering)
* @param string $extrafieldsobjectkey Required (for example $object->table_element).
* @param Translate|null $outputlangs Output
* @param object $object The parent object of field to show
* @return string Formatted value
*/
public function showOutputField($key, $value, $moreparam = '', $extrafieldsobjectkey = '', $outputlangs = null, $object = null)
{

View File

@ -51,7 +51,7 @@ if (!empty($extrafieldsobjectkey) && !empty($extrafields->attributes[$extrafield
}
}
$valuetoshow = $extrafields->showOutputField($key, $value, '', $extrafieldsobjectkey);
$valuetoshow = $extrafields->showOutputField($key, $value, '', $extrafieldsobjectkey, null, $object);
$title = dol_string_nohtmltag($valuetoshow);
print '<td'.($cssclass ? ' class="'.$cssclass.'"' : ''); // TODO Add 'css' and 'cssview' and 'csslist' for extrafields and use here 'csslist'

View File

@ -256,7 +256,7 @@ if (empty($reshook) && !empty($object->table_element) && isset($extrafields->att
print '</form>';
} else {
//var_dump($tmpkeyextra.'-'.$value.'-'.$object->table_element);
print $extrafields->showOutputField($tmpkeyextra, $value, '', $object->table_element);
print $extrafields->showOutputField($tmpkeyextra, $value, '', $object->table_element, null, $object);
}
print '</td>';