diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php
index 050fe09f444..5d8cee7215f 100644
--- a/htdocs/comm/propal/card.php
+++ b/htdocs/comm/propal/card.php
@@ -1924,6 +1924,7 @@ if (empty($reshook)) {
$res = $product->fetch($productid);
$type = $product->type;
+ $$price_base_type = $product->price_base_type;
$label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : '');
$price_min = $product->price_min;
diff --git a/htdocs/core/ajax/updateextrafield.php b/htdocs/core/ajax/updateextrafield.php
index e42424126fe..f7dffb2954d 100644
--- a/htdocs/core/ajax/updateextrafield.php
+++ b/htdocs/core/ajax/updateextrafield.php
@@ -59,7 +59,7 @@ include '../../main.inc.php';
$objectType = GETPOST('objectType', 'aZ09');
$objectId = GETPOST('objectId', 'aZ09');
$field = GETPOST('field', 'aZ09');
-$value = GETPOST('value', 'aZ09');
+$value = GETPOST('value', 'alpha');
$module = getElementProperties($objectType)['module'];
$element_ref = '';
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 7f14ae81e59..f6bf37f03dc 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -3754,7 +3754,7 @@ class Form
print($hidelabel ? '' : $langs->trans("RefOrLabel") . ' : ') . '';
} else {
- print $this->select_produits_fournisseurs_list($socid, $selected, $htmlname, $filtertype, $filtre, '', $status, 0, 0, $alsoproductwithnosupplierprice, $morecss, 0, $placeholder);
+ print $this->select_produits_fournisseurs_list($socid, $selected, $htmlname, $filtertype, $filtre, '', $status, 0, 0, $alsoproductwithnosupplierprice, $morecss, getDolGlobalInt('SUPPLIER_SHOW_STOCK_IN_PRODUCTS_COMBO'), $placeholder);
}
}
diff --git a/htdocs/core/class/html.formai.class.php b/htdocs/core/class/html.formai.class.php
index fd0304141c4..246dea54cca 100644
--- a/htdocs/core/class/html.formai.class.php
+++ b/htdocs/core/class/html.formai.class.php
@@ -411,7 +411,7 @@ class FormAI extends Form
console.log('Add response into field \'#'+htmlname+'\': '+response);
jQuery('#'+htmlname).val(response); // If #htmlcontent is a input name or textarea
- jQuery('#'+htmlname).html(response); // If #htmlContent is a div
+ jQuery('#'+htmlname).html(response).trigger('change'); // If #htmlContent is a div and trigger event change for extrafield update
//jQuery('#'+htmlname+'preview').val(response);
if (CKEDITOR.instances) {
diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php
index 25bee4baf24..ac3d92ba0aa 100644
--- a/htdocs/core/tpl/extrafields_view.tpl.php
+++ b/htdocs/core/tpl/extrafields_view.tpl.php
@@ -229,23 +229,38 @@ if (empty($reshook) && !empty($object->table_element) && isset($extrafields->att
$fieldid = 'socid';
}
- print '
'.img_edit().' | ';
- }
- if (isModEnabled("ai") && $action == 'edit_extras' && GETPOST('attribute') == $tmpkeyextra && !empty($extrafields->attributes[$object->table_element]["aiprompt"][$tmpkeyextra])) {
- $showlinktoai = "extrafieldfiller";
- $showlinktoailabel = $langs->trans("FillExtrafieldWithAi");
- $htmlname = "options_".$tmpkeyextra;
- $onlyenhancements = "textgenerationextrafield";
- $morecss = "editfielda";
- $aiprompt = $extrafields->attributes[$object->table_element]["aiprompt"][$tmpkeyextra];
- $out = "";
-
- // Fill $out
- include DOL_DOCUMENT_ROOT.'/core/tpl/formlayoutai.tpl.php';
print '';
- print '';
- print $out;
- print ' | ';
+ if (isModEnabled("ai") && !empty($extrafields->attributes[$object->table_element]["aiprompt"][$tmpkeyextra])) {
+ $showlinktoai = "extrafieldfiller_".$tmpkeyextra;
+ $showlinktoailabel = $langs->trans("FillExtrafieldWithAi");
+ $htmlname = !empty($object->id) ? $object->element.'_extras_'.$tmpkeyextra.'_'.$object->id : "options_".$tmpkeyextra;
+ $onlyenhancements = "textgenerationextrafield";
+ $morecss = "editfielda";
+ $aiprompt = $extrafields->attributes[$object->table_element]["aiprompt"][$tmpkeyextra];
+ $out = "";
+
+ // Fill $out
+ include DOL_DOCUMENT_ROOT.'/core/tpl/formlayoutai.tpl.php';
+ print $out;
+ print '';
+ }
+ print ''.img_edit().'';
+ print'';
}
print '';
print '';
diff --git a/htdocs/core/tpl/formlayoutai.tpl.php b/htdocs/core/tpl/formlayoutai.tpl.php
index cc4896a567e..5b422875afe 100644
--- a/htdocs/core/tpl/formlayoutai.tpl.php
+++ b/htdocs/core/tpl/formlayoutai.tpl.php
@@ -41,15 +41,10 @@ if (empty($conf) || !is_object($conf)) {
exit(1);
}
-
if (empty($langs)) {
print 'Parameter langs not defined.';
exit(1);
}
-if (empty($object)) {
- print 'Parameter object not defined.';
- exit(1);
-}
if (empty($htmlname)) {
print 'Parameter htmlname not defined.';
exit(1);
@@ -163,7 +158,7 @@ if ($showlinktoai) {
if (empty($onlyenhancements)) {
$onlyenhancements = '';
}
- if (!empty($aiprompt)) {
+ if (!empty($aiprompt) && !empty($object)) {
$formai->setSubstitFromObject($object, $langs);
$aiprompt = make_substitutions($aiprompt, $formai->substit);
}
diff --git a/htdocs/fichinter/class/api_interventions.class.php b/htdocs/fichinter/class/api_interventions.class.php
index 51bcfeb64b9..f20d2ac0894 100644
--- a/htdocs/fichinter/class/api_interventions.class.php
+++ b/htdocs/fichinter/class/api_interventions.class.php
@@ -131,13 +131,14 @@ class Interventions extends DolibarrApi
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')"
* @param string $properties Restrict the data returned to these properties. Ignored if empty. Comma separated list of property names
* @param string $contact_type {@choice '',thirdparty,internal,external} Type of contacts
+ * @param bool $pagination_data If this parameter is set to true the response will include pagination data. Default value is false. Page starts from 0*
* @return array Array of order objects
* @phan-return array