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