';
}
// Mode of payment
diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php
index ecbfdc94454..8e2f78ca578 100644
--- a/htdocs/core/class/commondocgenerator.class.php
+++ b/htdocs/core/class/commondocgenerator.class.php
@@ -786,6 +786,15 @@ abstract class CommonDocGenerator
$resarray = $this->fill_substitutionarray_with_extrafields($line, $resarray, $extrafields, $array_key, $outputlangs);
+ // Load product data optional fields to the line -> enables to use "line_product_options_{extrafield}"
+ if (isset($line->fk_product) && $line->fk_product > 0)
+ {
+ $tmpproduct = new Product($this->db);
+ $result = $tmpproduct->fetch($line->fk_product);
+ foreach ($tmpproduct->array_options as $key=>$label)
+ $resarray["line_product_".$key] = $label;
+ }
+
return $resarray;
}
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 21327a9a37e..fb618813f56 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -1368,7 +1368,7 @@ class FormFile
// $section is inside $param
$newparam .= preg_replace('/&file=.*$/', '', $param); // We don't need param file=
$backtopage = DOL_URL_ROOT.'/ecm/index.php?§ion_dir='.urlencode($relativepath).$newparam;
- print ''.img_edit('default', 0, 'class="paddingrightonly"').'';
+ print ''.img_edit('default', 0, 'class="paddingrightonly"').'';
}
if (empty($useinecm) || $useinecm == 2 || $useinecm == 6) { // 6=Media file manager
@@ -1392,7 +1392,7 @@ class FormFile
if ($permtoeditline) {
$paramsectiondir = (in_array($modulepart, array('medias', 'ecm')) ? '§ion_dir='.urlencode($relativepath) : '');
- print ''.img_edit('default', 0, 'class="paddingrightonly"').'';
+ print ''.img_edit('default', 0, 'class="paddingrightonly"').'';
}
}
if ($permonobject) {
diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql
index f6f0a2a3ff9..abbeadf7166 100644
--- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql
+++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql
@@ -328,7 +328,7 @@ ALTER TABLE llx_product MODIFY COLUMN desiredstock float;
ALTER TABLE llx_product_warehouse_properties MODIFY COLUMN seuil_stock_alerte float;
ALTER TABLE llx_product_warehouse_properties MODIFY COLUMN desiredstock float;
-ALTER TABLE llx_product ADD COLUMN fk_state integer DEFAULT NULL;
+ALTER TABLE llx_product ADD COLUMN fk_state integer DEFAULT NULL AFTER fk_country;
ALTER TABLE llx_projet ADD COLUMN email_msgid varchar(255);
ALTER TABLE llx_ticket ADD COLUMN email_msgid varchar(255);
diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php
index 421a0842d89..ed62e5a224f 100644
--- a/htdocs/societe/class/api_thirdparties.class.php
+++ b/htdocs/societe/class/api_thirdparties.class.php
@@ -1823,7 +1823,7 @@ class Thirdparties extends DolibarrApi
*
* Return an array with thirdparty informations
*
- * @param int $rowid Id of third party to load
+ * @param int $rowid Id of third party to load (Use 0 to get a specimen record, use null to use other search criterias)
* @param string $ref Reference of third party, name (Warning, this can return several records)
* @param string $ref_ext External reference of third party (Warning, this information is a free field not provided by Dolibarr)
* @param string $barcode Barcode of third party to load