Remove all debug statements and error_log calls from codebase

This commit is contained in:
Frank Cools 2025-10-08 15:18:48 +02:00
parent fea225dc3d
commit c08a8bb526
2 changed files with 0 additions and 15 deletions

View File

@ -1155,7 +1155,6 @@ 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);
@ -1178,19 +1177,15 @@ class DeclarationTVA
$link_result = $this->linkDocumentToDeclaration($declaration_id, $ecmfile->id);
if (!$link_result) {
// Log the error but don't fail the whole process
error_log("DeclarationTVA: Failed to link document to declaration: " . $this->error);
}
} else {
// Log the error but don't fail the whole process
error_log("DeclarationTVA: Failed to create ECM file record: " . $ecmfile->error);
}
} catch (Exception $e) {
// Log the error but don't fail the whole process
error_log("DeclarationTVA: Exception creating ECM file: " . $e->getMessage());
}
} else {
// Log that ECM files class is not available
error_log("DeclarationTVA: ECM files class not found. Tried paths: " . implode(', ', $ecmfiles_paths));
}
}

View File

@ -62,14 +62,12 @@ class DeclarationTVA_Config
$create_result = $this->db->query($create_sql);
if (!$create_result) {
error_log("DeclarationTVA: Failed to create config table: " . $this->db->lasterror());
return false;
}
// Insert default configuration values
$this->insertDefaultConfigValues();
error_log("DeclarationTVA: Created declarationtva_config table");
}
return true;
@ -296,11 +294,6 @@ class DeclarationTVA_Config
}
}
// Debug: Log what we found
error_log("DeclarationTVA: getAccountingAccounts() found " . count($accounts) . " accounts");
if (!empty($accounts)) {
error_log("DeclarationTVA: First account: " . $accounts[0]['account_number'] . " - " . $accounts[0]['label']);
}
return $accounts;
}
@ -384,7 +377,6 @@ class DeclarationTVA_Config
foreach ($default_config as $key => $default_value) {
$value = $this->get('bank_' . $key, $default_value);
$config[$key] = $value;
error_log("DeclarationTVA: Retrieved bank config " . $key . ": " . $value);
}
return $config;
@ -398,9 +390,7 @@ class DeclarationTVA_Config
*/
public function updateBankAccountConfiguration($bank_account_id)
{
error_log("DeclarationTVA: Updating bank account to: " . $bank_account_id);
$result = $this->set('bank_bank_account', (int)$bank_account_id);
error_log("DeclarationTVA: Bank account update result: " . ($result ? 'success' : 'failed'));
return $result;
}