mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 19:04:52 +00:00
Removed uneeded query to calculate account balance added account balance to edit expense and transfer
This commit is contained in:
@@ -44,11 +44,8 @@
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$account_id = $row['account_id'];
|
||||
$account_name = $row['account_name'];
|
||||
|
||||
$sql_accounts = mysqli_query($mysqli,"SELECT * FROM accounts WHERE account_id = $account_id");
|
||||
$row = mysqli_fetch_array($sql_accounts);
|
||||
$opening_balance = $row['opening_balance'];
|
||||
|
||||
|
||||
$sql_payments = mysqli_query($mysqli,"SELECT SUM(payment_amount) AS total_payments FROM payments WHERE account_id = $account_id");
|
||||
$row = mysqli_fetch_array($sql_payments);
|
||||
$total_payments = $row['total_payments'];
|
||||
@@ -82,11 +79,8 @@
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$account_id = $row['account_id'];
|
||||
$account_name = $row['account_name'];
|
||||
|
||||
$sql_accounts = mysqli_query($mysqli,"SELECT * FROM accounts WHERE account_id = $account_id");
|
||||
$row = mysqli_fetch_array($sql_accounts);
|
||||
$opening_balance = $row['opening_balance'];
|
||||
|
||||
|
||||
$sql_payments = mysqli_query($mysqli,"SELECT SUM(payment_amount) AS total_payments FROM payments WHERE account_id = $account_id");
|
||||
$row = mysqli_fetch_array($sql_payments);
|
||||
$total_payments = $row['total_payments'];
|
||||
|
||||
Reference in New Issue
Block a user