diff --git a/htdocs/accountancy/bookkeeping/export.php b/htdocs/accountancy/bookkeeping/export.php
index ebd2dabecbe..91276dfce1a 100644
--- a/htdocs/accountancy/bookkeeping/export.php
+++ b/htdocs/accountancy/bookkeeping/export.php
@@ -845,19 +845,39 @@ if ($action == 'export_file') {
}
// add documents in an archive for some accountancy export format
- if (getDolGlobalString('ACCOUNTING_EXPORT_MODELCSV') == AccountancyExport::$EXPORT_TYPE_QUADRATUS
- || getDolGlobalString('ACCOUNTING_EXPORT_MODELCSV') == AccountancyExport::$EXPORT_TYPE_FEC
- || getDolGlobalString('ACCOUNTING_EXPORT_MODELCSV') == AccountancyExport::$EXPORT_TYPE_FEC2
- ) {
- $form_question['notifiedexportfull'] = array(
- 'name' => 'notifiedexportfull',
- 'type' => 'checkbox',
- 'label' => $langs->trans('NotifiedExportFull'),
- 'value' => 'false',
- );
- }
+ $exportTypesWithDocs = array(
+ AccountancyExport::$EXPORT_TYPE_QUADRATUS,
+ AccountancyExport::$EXPORT_TYPE_FEC,
+ AccountancyExport::$EXPORT_TYPE_FEC2
+ );
+
+ $form_question['notifiedexportfull'] = array(
+ 'name' => 'notifiedexportfull',
+ 'type' => 'checkbox',
+ 'label' => $langs->trans('NotifiedExportFull'),
+ 'value' => 'false',
+ );
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?'.$param, $langs->trans("ExportFilteredList").'...', $langs->trans('ConfirmExportFile'), 'export_fileconfirm', $form_question, '', 1, 500, 700);
+
+ $formconfirm .= '';
}
// Print form confirm
diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php
index 513de0d50af..fd87c07cc12 100644
--- a/htdocs/core/class/commondocgenerator.class.php
+++ b/htdocs/core/class/commondocgenerator.class.php
@@ -1733,8 +1733,12 @@ abstract class CommonDocGenerator
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $label) {
// Enable extrafield ?
$enabled = 0;
+ if (!empty($extrafields->attributes[$object->table_element]['enabled'][$key])) {
+ $enabled = (int) dol_eval((string) $extrafields->attributes[$object->table_element]['enabled'][$key], 1, 1, '2');
+ }
+
$disableOnEmpty = 0;
- if (!empty($extrafields->attributes[$object->table_element]['printable'][$key])) {
+ if ($enabled && !empty($extrafields->attributes[$object->table_element]['printable'][$key])) {
$printable = intval($extrafields->attributes[$object->table_element]['printable'][$key]);
if (in_array($printable, $params['printableEnable']) || in_array($printable, $params['printableEnableNotEmpty'])) {
$enabled = 1;
diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php
index 5ced81e9129..805eee53f36 100644
--- a/htdocs/product/inventory/inventory.php
+++ b/htdocs/product/inventory/inventory.php
@@ -1124,7 +1124,7 @@ if ($resql) {
if (isModEnabled('productbatch') && $product_static->hasbatch()) {
$valuetoshow = $product_static->stock_warehouse[$obj->fk_warehouse]->detail_batch[$obj->batch]->qty ?? 0;
} else {
- $valuetoshow = $product_static->stock_warehouse[$obj->fk_warehouse]->real ?? 0;
+ $valuetoshow = !empty($product_static->stock_warehouse[$obj->fk_warehouse]->real) ? $product_static->stock_warehouse[$obj->fk_warehouse]->real : 0;
}
}
print price2num($valuetoshow, 'MS');
@@ -1299,10 +1299,11 @@ print '';