Remove duplicate getAccountMappings() method declaration
Fixed: - Removed old getAccountMappings() method on line 615 - Kept the new version that joins with chart of accounts - This fixes the 'Cannot redeclare' PHP Fatal error The new method properly retrieves account labels from Dolibarr's accounting_account table.
This commit is contained in:
parent
5cbffd799a
commit
af58397793
@ -607,35 +607,6 @@ class DeclarationTVA
|
||||
return $result !== false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get account mappings
|
||||
*
|
||||
* @return array Account mappings
|
||||
*/
|
||||
public function getAccountMappings()
|
||||
{
|
||||
$sql = "SELECT ca3_line, account_code, account_label, vat_rate
|
||||
FROM " . MAIN_DB_PREFIX . "declarationtva_account_mappings
|
||||
WHERE entity = " . $this->entity . " AND is_active = 1
|
||||
ORDER BY ca3_line";
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
$mappings = array();
|
||||
|
||||
if ($result) {
|
||||
while ($obj = $this->db->fetch_object($result)) {
|
||||
$mappings[] = array(
|
||||
'ca3_line' => $obj->ca3_line,
|
||||
'account_code' => $obj->account_code,
|
||||
'account_label' => $obj->account_label,
|
||||
'vat_rate' => $obj->vat_rate
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return $mappings;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get period information
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user