Switched to DB controlled Account Types
This commit is contained in:
+10
-10
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
require_once("inc_all_reports.php");
|
||||
validateAccountantRole();
|
||||
require_once("inc_all_reports.php");
|
||||
validateAccountantRole();
|
||||
|
||||
// Fetch Accounts and their balances
|
||||
$sql_accounts = "
|
||||
// Fetch Accounts and their balances
|
||||
$sql_accounts = "
|
||||
SELECT
|
||||
a.account_id,
|
||||
a.account_name,
|
||||
@@ -21,12 +21,12 @@ $sql_accounts = "
|
||||
GROUP BY a.account_id
|
||||
ORDER BY a.account_type, a.account_name ASC";
|
||||
|
||||
$result_accounts = mysqli_query($mysqli, $sql_accounts);
|
||||
$result_accounts = mysqli_query($mysqli, $sql_accounts);
|
||||
|
||||
$total_assets = 0;
|
||||
$total_liabilities = 0;
|
||||
$total_equity = 0;
|
||||
$currency = $session_company_currency;
|
||||
$total_assets = 0;
|
||||
$total_liabilities = 0;
|
||||
$total_equity = 0;
|
||||
$currency = $session_company_currency;
|
||||
?>
|
||||
|
||||
<div class="card card-dark">
|
||||
@@ -155,7 +155,7 @@ function echoAccountRow($accountRow, $balance) {
|
||||
30 => "Equity"
|
||||
];
|
||||
$account_type_string = $account_type_strings[$accountRow['account_type']] ?? "Unknown";
|
||||
$account_name_encoded = urlencode($accountRow['account_name']);
|
||||
$account_name_encoded_numml = urlencode($accountRow['account_name']);
|
||||
echo "
|
||||
<tr>
|
||||
<td>$account_type_string</td>
|
||||
|
||||
Reference in New Issue
Block a user