General refactoring/tidy spacing
This commit is contained in:
+35
-40
@@ -1,13 +1,8 @@
|
||||
<?php include("inc_all.php");
|
||||
|
||||
// Quick fix to prevent non-admins (i.e. techs) seeing financials - redirect to client list
|
||||
// To be removed when we have a proper technical dashboard for techs
|
||||
if ($_SESSION['user_role'] != 3) { ?>
|
||||
<script type="text/javascript">
|
||||
window.location.href = 'dashboard_technical.php';
|
||||
</script>
|
||||
<?php
|
||||
exit();
|
||||
// Enforce accountant / admin role for the financial dashboard
|
||||
if ($_SESSION['user_role'] != 3 && $_SESSION['user_role'] != 1) {
|
||||
exit('<script type="text/javascript">window.location.href = \'dashboard_technical.php\';</script>');
|
||||
}
|
||||
|
||||
if (isset($_GET['year'])) {
|
||||
@@ -464,13 +459,13 @@ $vendors_added = $row['vendors_added'];
|
||||
|
||||
<?php include("footer.php"); ?>
|
||||
<script>
|
||||
// Set new default font family and font color to mimic Bootstrap's default styling
|
||||
Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
|
||||
Chart.defaults.global.defaultFontColor = '#292b2c';
|
||||
// Set new default font family and font color to mimic Bootstrap's default styling
|
||||
Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
|
||||
Chart.defaults.global.defaultFontColor = '#292b2c';
|
||||
|
||||
// Area Chart Example
|
||||
var ctx = document.getElementById("cashFlow");
|
||||
var myLineChart = new Chart(ctx, {
|
||||
// Area Chart Example
|
||||
var ctx = document.getElementById("cashFlow");
|
||||
var myLineChart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
||||
@@ -653,15 +648,15 @@ var myLineChart = new Chart(ctx, {
|
||||
display: true
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Set new default font family and font color to mimic Bootstrap's default styling
|
||||
Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
|
||||
Chart.defaults.global.defaultFontColor = '#292b2c';
|
||||
// Set new default font family and font color to mimic Bootstrap's default styling
|
||||
Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
|
||||
Chart.defaults.global.defaultFontColor = '#292b2c';
|
||||
|
||||
// Area Chart Example
|
||||
var ctx = document.getElementById("tripFlow");
|
||||
var myLineChart = new Chart(ctx, {
|
||||
// Area Chart Example
|
||||
var ctx = document.getElementById("tripFlow");
|
||||
var myLineChart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
||||
@@ -730,15 +725,15 @@ var myLineChart = new Chart(ctx, {
|
||||
display: false
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Set new default font family and font color to mimic Bootstrap's default styling
|
||||
Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
|
||||
Chart.defaults.global.defaultFontColor = '#292b2c';
|
||||
// Set new default font family and font color to mimic Bootstrap's default styling
|
||||
Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
|
||||
Chart.defaults.global.defaultFontColor = '#292b2c';
|
||||
|
||||
// Pie Chart Example
|
||||
var ctx = document.getElementById("incomeByCategoryPieChart");
|
||||
var myPieChart = new Chart(ctx, {
|
||||
// Pie Chart Example
|
||||
var ctx = document.getElementById("incomeByCategoryPieChart");
|
||||
var myPieChart = new Chart(ctx, {
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
labels: [
|
||||
@@ -787,15 +782,15 @@ var myPieChart = new Chart(ctx, {
|
||||
position: 'right'
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Set new default font family and font color to mimic Bootstrap's default styling
|
||||
Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
|
||||
Chart.defaults.global.defaultFontColor = '#292b2c';
|
||||
// Set new default font family and font color to mimic Bootstrap's default styling
|
||||
Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
|
||||
Chart.defaults.global.defaultFontColor = '#292b2c';
|
||||
|
||||
// Pie Chart Example
|
||||
var ctx = document.getElementById("expenseByCategoryPieChart");
|
||||
var myPieChart = new Chart(ctx, {
|
||||
// Pie Chart Example
|
||||
var ctx = document.getElementById("expenseByCategoryPieChart");
|
||||
var myPieChart = new Chart(ctx, {
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
labels: [
|
||||
@@ -844,11 +839,11 @@ var myPieChart = new Chart(ctx, {
|
||||
position: 'right'
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Pie Chart Example
|
||||
var ctx = document.getElementById("expenseByVendorPieChart");
|
||||
var myPieChart = new Chart(ctx, {
|
||||
// Pie Chart Example
|
||||
var ctx = document.getElementById("expenseByVendorPieChart");
|
||||
var myPieChart = new Chart(ctx, {
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
labels: [
|
||||
@@ -897,6 +892,6 @@ var myPieChart = new Chart(ctx, {
|
||||
position: 'right'
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@@ -133,13 +133,13 @@ $sql_categories = mysqli_query($mysqli,"SELECT * FROM categories WHERE category_
|
||||
<?php include("footer.php"); ?>
|
||||
|
||||
<script>
|
||||
// Set new default font family and font color to mimic Bootstrap's default styling
|
||||
Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
|
||||
Chart.defaults.global.defaultFontColor = '#292b2c';
|
||||
// Set new default font family and font color to mimic Bootstrap's default styling
|
||||
Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
|
||||
Chart.defaults.global.defaultFontColor = '#292b2c';
|
||||
|
||||
// Area Chart Example
|
||||
var ctx = document.getElementById("cashFlow");
|
||||
var myLineChart = new Chart(ctx, {
|
||||
// Area Chart Example
|
||||
var ctx = document.getElementById("cashFlow");
|
||||
var myLineChart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
||||
@@ -209,6 +209,6 @@ var myLineChart = new Chart(ctx, {
|
||||
display: false
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user