* Finish task #5123.
This commit is contained in:
@@ -1084,9 +1084,12 @@ class block extends control
|
||||
if($product->status == 'closed') $closed++;
|
||||
}
|
||||
|
||||
$this->view->total = $normal + $closed;
|
||||
$this->view->normal = $normal;
|
||||
$this->view->closed = $closed;
|
||||
$total = $normal + $closed;
|
||||
|
||||
$this->view->total = $total;
|
||||
$this->view->normal = $normal;
|
||||
$this->view->closed = $closed;
|
||||
$this->view->normalPercent = $total ? round(($normal / $total), 2) * 100 : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</style>
|
||||
<div class="panel-body table-row">
|
||||
<div class="col-6 text-middle text-center">
|
||||
<div class="progress-pie inline-block" data-value="<?php echo 100 * $normal/($closed + $normal);?>" data-doughnut-size="80">
|
||||
<div class="progress-pie inline-block" data-value="<?php echo $normalPercent;?>" data-doughnut-size="80">
|
||||
<canvas width="100" height="100" style="width: 100px; height: 100px;"></canvas>
|
||||
<div class="progress-info">
|
||||
<small><?php echo $lang->product->all;?></small>
|
||||
|
||||
Reference in New Issue
Block a user