Fix duplicate getAccountMappings() method
Fixed: - Removed duplicate getAccountMappings() method declaration - Kept the original method that includes vat_rate field - Resolves PHP Fatal error: Cannot redeclare method
This commit is contained in:
parent
56ed838601
commit
308b8c701d
@ -510,33 +510,6 @@ class DeclarationTVA
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get account mappings for CA-3 lines
|
|
||||||
*
|
|
||||||
* @return array Account mappings
|
|
||||||
*/
|
|
||||||
public function getAccountMappings()
|
|
||||||
{
|
|
||||||
$sql = "SELECT ca3_line, account_code, account_label
|
|
||||||
FROM " . MAIN_DB_PREFIX . "declarationtva_account_mappings
|
|
||||||
WHERE entity = " . $this->entity . " AND is_active = 1
|
|
||||||
ORDER BY ca3_line, account_code";
|
|
||||||
|
|
||||||
$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
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $mappings;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create CA-3 line record
|
* Create CA-3 line record
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user