mirror of https://github.com/itflow-org/itflow
Fixed Calculation in expense report same issue as below
This commit is contained in:
parent
2e1a9ae7c7
commit
a6373678e8
|
|
@ -98,7 +98,7 @@ $sql_categories = mysqli_query($mysqli,"SELECT * FROM categories WHERE category_
|
|||
<?php
|
||||
|
||||
for($month = 1; $month<=12; $month++) {
|
||||
$sql_expenses = mysqli_query($mysqli,"SELECT SUM(expense_amount) AS expense_total_amount_for_month FROM expenses WHERE YEAR(expense_date) = $year AND MONTH(expense_date) = $month AND category_id > 0");
|
||||
$sql_expenses = mysqli_query($mysqli,"SELECT SUM(expense_amount) AS expense_total_amount_for_month FROM expenses WHERE YEAR(expense_date) = $year AND MONTH(expense_date) = $month AND vendor_id > 0");
|
||||
$row = mysqli_fetch_array($sql_expenses);
|
||||
$expense_total_amount_for_month = $row['expense_total_amount_for_month'];
|
||||
$total_expense_for_all_months = $expense_total_amount_for_month + $total_expense_for_all_months;
|
||||
|
|
|
|||
Loading…
Reference in New Issue