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
This commit is contained in:
parent
175a4bdc90
commit
f4bfa27433
@ -1452,39 +1452,6 @@ class DeclarationTVA
|
|||||||
return $account_code; // Fallback to account code
|
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)
|
* Submit declaration (create accounting entries and update status)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user