Temporarily disable ECM integration to prevent fatal errors

- Added ECM integration toggle for easy enable/disable
- Temporarily disabled ECM integration to prevent fatal errors
- Added debugging logs to track ECM files path resolution
- PDF saving to disk still works without ECM integration
- Declaration validation will work without document management
- Can be re-enabled once ECM files path is properly resolved
This commit is contained in:
Frank Cools 2025-10-06 17:23:45 +02:00
parent 4074c4fabd
commit faf7b3a00a

View File

@ -1129,6 +1129,10 @@ class DeclarationTVA
}
// Try to add document record to Dolibarr (optional feature)
// Skip ECM integration if there are any issues to prevent fatal errors
$ecm_integration_enabled = false; // Temporarily disabled to prevent fatal errors
if ($ecm_integration_enabled) {
// Try multiple possible paths for ecmfiles.class.php
$ecmfiles_paths = array(
DOL_DOCUMENT_ROOT . '/ecm/class/ecmfiles.class.php',
@ -1148,6 +1152,8 @@ class DeclarationTVA
if ($ecmfiles_path && file_exists($ecmfiles_path)) {
try {
// Log the path being used for debugging
error_log("DeclarationTVA: Using ECM files path: " . $ecmfiles_path);
require_once $ecmfiles_path;
$ecmfile = new EcmFiles($this->db);