diff --git a/dashboard_financial.php b/dashboard_financial.php index 32dc8658..55fc47ff 100644 --- a/dashboard_financial.php +++ b/dashboard_financial.php @@ -1,13 +1,8 @@ - -window.location.href = \'dashboard_technical.php\';'); } if (isset($_GET['year'])) { @@ -103,800 +98,800 @@ $vendors_added = $row['vendors_added']; ?>
- +
-
- - -
-

-

Income

-
- Receivables: -
-
- -
-
-
- - -
- - -
-

-

Expenses

-
-
- -
-
-
- - -
- -
-
-

-

Profit

-
-
- -
+ -
- + -
- -
-
-

-

Monthly Recurring

-
-
- -
+ -
- + -
- -
-
-

-

Yearly Recurring

-
-
- -
-
-
- - - - - - - - - - - -
-
-
-

Cash Flow

-
- - - - +
+ +
+
+

+

Profit

+
+
+ +
-
-
- -
-
+ -
-
-
-

Income by Category

-
- +
+ +
+
+

+

Monthly Recurring

+
+
+ +
-
-
- -
-
+ -
-
-
-

Expenses by Category

-
- +
+ +
+
+

+

Yearly Recurring

+
+
+ +
-
-
- -
-
+ -
-
-
-

Expenses by Vendor

-
- + + + + + + + + + +
+
+
+

Cash Flow

+
+ + + + +
+
+
+ +
-
-
- -
-
-
-
-
-

Account Balances

-
- +
+
+
+

Income by Category

+
+ +
+
+
+ +
-
-
- - - - - - - - - - - -
-
-
-
-
-
-

Latest Income

-
- + +
+
+
+

Expenses by Category

+
+ +
+
+
+ +
-
-
- - - - - - - - - - - - - - - - - - - -
DateCustomerInvoiceAmount
-
-
-
-
-
-

Latest Expenses

-
- -
-
-
- - - - - - - - - - - - - - - - - - - -
DateVendorCategoryAmount
-
-
-
-
-
-
-

Trip Flow

-
- - - - +
+
+
+

Expenses by Vendor

+
+ +
+
+
+ +
+
+
+ +
+
+
+

Account Balances

+
+ +
+
+
+ + + + + + + + + + + +
+
+
+
+
+
+
+

Latest Income

+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + +
DateCustomerInvoiceAmount
+
+
+
+
+
+
+

Latest Expenses

+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + +
DateVendorCategoryAmount
+
+
+
+
+
+
+

Trip Flow

+
+ + + + +
+
+
+ +
-
-
- -
-
diff --git a/report_expense_summary.php b/report_expense_summary.php index 27939959..741cd84c 100644 --- a/report_expense_summary.php +++ b/report_expense_summary.php @@ -1,15 +1,15 @@ 0 AND company_id = $session_company_id ORDER BY expense_year DESC"); @@ -19,196 +19,196 @@ $sql_categories = mysqli_query($mysqli,"SELECT * FROM categories WHERE category_ ?>
-
-

Expense Summary

-
- +
+

Expense Summary

+
+ +
-
-
-
- + - + while ($row = mysqli_fetch_array($sql_expense_years)) { + $expense_year = $row['expense_year']; + ?> + - + - -
+ + - + -
- - - - - - - - - - - - - - - - - - - - - +
+
CategoryJanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecemberTotal
+ + + + + + + + + + + + + + + + + + + + - - + + - - + ?> + - + ?> - - + + - + ?> - - - + + 0 AND company_id = $session_company_id"); - $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; + 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 expense_vendor_id > 0 AND company_id = $session_company_id"); + $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; - ?> + ?> - - -01&dtt=-31"> + + ?> - - - -
CategoryJanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecemberTotal
-01&dtt=-31">-01&dtt=-31">
TotalTotal-01&dtt=-31">
+ + + + +
-
diff --git a/report_income_summary.php b/report_income_summary.php index 4d2bd05f..06053e4f 100644 --- a/report_income_summary.php +++ b/report_income_summary.php @@ -13,9 +13,9 @@ if (isset($_GET['year'])) { $year = date('Y'); } -$sql_payment_years = mysqli_query($mysqli,"SELECT DISTINCT YEAR(payment_date) AS payment_year FROM payments WHERE company_id = $session_company_id UNION SELECT DISTINCT YEAR(revenue_date) AS payment_year FROM revenues WHERE company_id = $session_company_id ORDER BY payment_year DESC"); +$sql_payment_years = mysqli_query($mysqli, "SELECT DISTINCT YEAR(payment_date) AS payment_year FROM payments WHERE company_id = $session_company_id UNION SELECT DISTINCT YEAR(revenue_date) AS payment_year FROM revenues WHERE company_id = $session_company_id ORDER BY payment_year DESC"); -$sql_categories = mysqli_query($mysqli,"SELECT * FROM categories WHERE category_type = 'Income' AND company_id = $session_company_id ORDER BY category_name ASC"); +$sql_categories = mysqli_query($mysqli, "SELECT * FROM categories WHERE category_type = 'Income' AND company_id = $session_company_id ORDER BY category_name ASC"); // Default values $largest_income_month = 0;