Remove all debug statements and error_log calls from codebase
This commit is contained in:
parent
fea225dc3d
commit
c08a8bb526
@ -1155,7 +1155,6 @@ class DeclarationTVA
|
|||||||
if ($ecmfiles_path && file_exists($ecmfiles_path)) {
|
if ($ecmfiles_path && file_exists($ecmfiles_path)) {
|
||||||
try {
|
try {
|
||||||
// Log the path being used for debugging
|
// Log the path being used for debugging
|
||||||
error_log("DeclarationTVA: Using ECM files path: " . $ecmfiles_path);
|
|
||||||
require_once $ecmfiles_path;
|
require_once $ecmfiles_path;
|
||||||
$ecmfile = new EcmFiles($this->db);
|
$ecmfile = new EcmFiles($this->db);
|
||||||
|
|
||||||
@ -1178,19 +1177,15 @@ class DeclarationTVA
|
|||||||
$link_result = $this->linkDocumentToDeclaration($declaration_id, $ecmfile->id);
|
$link_result = $this->linkDocumentToDeclaration($declaration_id, $ecmfile->id);
|
||||||
if (!$link_result) {
|
if (!$link_result) {
|
||||||
// Log the error but don't fail the whole process
|
// Log the error but don't fail the whole process
|
||||||
error_log("DeclarationTVA: Failed to link document to declaration: " . $this->error);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Log the error but don't fail the whole process
|
// Log the error but don't fail the whole process
|
||||||
error_log("DeclarationTVA: Failed to create ECM file record: " . $ecmfile->error);
|
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
// Log the error but don't fail the whole process
|
// Log the error but don't fail the whole process
|
||||||
error_log("DeclarationTVA: Exception creating ECM file: " . $e->getMessage());
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Log that ECM files class is not available
|
// Log that ECM files class is not available
|
||||||
error_log("DeclarationTVA: ECM files class not found. Tried paths: " . implode(', ', $ecmfiles_paths));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -62,14 +62,12 @@ class DeclarationTVA_Config
|
|||||||
|
|
||||||
$create_result = $this->db->query($create_sql);
|
$create_result = $this->db->query($create_sql);
|
||||||
if (!$create_result) {
|
if (!$create_result) {
|
||||||
error_log("DeclarationTVA: Failed to create config table: " . $this->db->lasterror());
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert default configuration values
|
// Insert default configuration values
|
||||||
$this->insertDefaultConfigValues();
|
$this->insertDefaultConfigValues();
|
||||||
|
|
||||||
error_log("DeclarationTVA: Created declarationtva_config table");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
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;
|
return $accounts;
|
||||||
}
|
}
|
||||||
@ -384,7 +377,6 @@ class DeclarationTVA_Config
|
|||||||
foreach ($default_config as $key => $default_value) {
|
foreach ($default_config as $key => $default_value) {
|
||||||
$value = $this->get('bank_' . $key, $default_value);
|
$value = $this->get('bank_' . $key, $default_value);
|
||||||
$config[$key] = $value;
|
$config[$key] = $value;
|
||||||
error_log("DeclarationTVA: Retrieved bank config " . $key . ": " . $value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $config;
|
return $config;
|
||||||
@ -398,9 +390,7 @@ class DeclarationTVA_Config
|
|||||||
*/
|
*/
|
||||||
public function updateBankAccountConfiguration($bank_account_id)
|
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);
|
$result = $this->set('bank_bank_account', (int)$bank_account_id);
|
||||||
error_log("DeclarationTVA: Bank account update result: " . ($result ? 'success' : 'failed'));
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user