From f4bfa274333893557519dbbca6844998bfa68384 Mon Sep 17 00:00:00 2001 From: Frank Cools Date: Thu, 9 Oct 2025 00:45:04 +0200 Subject: [PATCH] Remove duplicate getBankAccountDetails method - Remove the duplicate getBankAccountDetails method that was causing fatal error - The method already exists at line 1415 with proper implementation - Fixes 'Cannot redeclare DeclarationTVA::getBankAccountDetails()' error --- core/class/declarationtva.class.php | 33 ----------------------------- 1 file changed, 33 deletions(-) diff --git a/core/class/declarationtva.class.php b/core/class/declarationtva.class.php index 9c5af20..735063a 100644 --- a/core/class/declarationtva.class.php +++ b/core/class/declarationtva.class.php @@ -1452,39 +1452,6 @@ class DeclarationTVA return $account_code; // Fallback to account code } - /** - * Get bank account details - * - * @param int $bank_account_id Bank account ID - * @return array|false Bank account details or false if not found - */ - private function getBankAccountDetails($bank_account_id) - { - // Get bank account info and its linked accounting account - $sql = "SELECT ba.rowid, ba.label, ba.number, ba.bank, ba.account_number - FROM " . MAIN_DB_PREFIX . "bank_account ba - WHERE ba.rowid = " . (int)$bank_account_id . " - AND ba.entity = " . $this->entity; - - $result = $this->db->query($sql); - if ($result && $this->db->num_rows($result) > 0) { - $obj = $this->db->fetch_object($result); - - // Get the accounting account label for the account code - $account_label = $this->getAccountLabel($obj->account_number); - - return array( - 'rowid' => $obj->rowid, - 'label' => $obj->label, - 'number' => $obj->number, - 'bank' => $obj->bank, - 'account_code' => $obj->account_number, // Use the linked accounting account code - 'account_label' => $account_label - ); - } - - return false; - } /** * Submit declaration (create accounting entries and update status)