mirror of
https://github.com/itflow-org/itflow
synced 2026-03-04 12:54:51 +00:00
Fix Rounding Percents for tasks and tickets
This commit is contained in:
@@ -66,7 +66,7 @@ if (isset($_GET['project_id'])) {
|
|||||||
$closed_ticket_count = mysqli_num_rows($sql_closed_tickets);
|
$closed_ticket_count = mysqli_num_rows($sql_closed_tickets);
|
||||||
|
|
||||||
if($ticket_count) {
|
if($ticket_count) {
|
||||||
$tickets_closed_percent = ($closed_ticket_count / $ticket_count) * 100;
|
$tickets_closed_percent = round(($closed_ticket_count / $ticket_count) * 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get All Tasks
|
// Get All Tasks
|
||||||
@@ -89,7 +89,7 @@ if (isset($_GET['project_id'])) {
|
|||||||
|
|
||||||
// Tasks Completed Percent
|
// Tasks Completed Percent
|
||||||
if($task_count) {
|
if($task_count) {
|
||||||
$tasks_completed_percent = ($completed_task_count / $task_count) * 100;
|
$tasks_completed_percent = round(($completed_task_count / $task_count) * 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Get Total Ticket Time
|
//Get Total Ticket Time
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
// Ticket Closed Percent
|
// Ticket Closed Percent
|
||||||
if($ticket_count) {
|
if($ticket_count) {
|
||||||
$tickets_closed_percent = ($closed_ticket_count / $ticket_count) * 100;
|
$tickets_closed_percent = round(($closed_ticket_count / $ticket_count) * 100);
|
||||||
}
|
}
|
||||||
// Get All Tasks
|
// Get All Tasks
|
||||||
$sql_tasks = mysqli_query($mysqli,
|
$sql_tasks = mysqli_query($mysqli,
|
||||||
@@ -182,7 +182,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
// Tasks Completed Percent
|
// Tasks Completed Percent
|
||||||
if($task_count) {
|
if($task_count) {
|
||||||
$tasks_completed_percent = ($completed_task_count / $task_count) * 100;
|
$tasks_completed_percent = round(($completed_task_count / $task_count) * 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -274,7 +274,7 @@ if (isset($_GET['ticket_id'])) {
|
|||||||
|
|
||||||
// Tasks Completed Percent
|
// Tasks Completed Percent
|
||||||
if($task_count) {
|
if($task_count) {
|
||||||
$tasks_completed_percent = ($completed_task_count / $task_count) * 100;
|
$tasks_completed_percent = round(($completed_task_count / $task_count) * 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get all Assigned ticket Users as a comma-separated string
|
// Get all Assigned ticket Users as a comma-separated string
|
||||||
|
|||||||
Reference in New Issue
Block a user