mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 17:05:46 +00:00
fix calculation of already receipt documents
This commit is contained in:
parent
42de7bb0c9
commit
35e6625601
|
@ -1049,7 +1049,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
print "<td width='20%'></td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
$stat = array('-1'=>0, '0'=>0, '1'=>0);
|
||||
$stat = array('-1'=>0, '0'=>0, '1'=>0, '2'=>0);
|
||||
foreach ($receiptStatus as $r) {
|
||||
$required = null;
|
||||
$is_recipient = false;
|
||||
|
@ -1104,13 +1104,15 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
<?php
|
||||
$this->contentContainerEnd();
|
||||
if($user->isAdmin()) {
|
||||
/* Do not count entries '2' as they are removed userѕ */
|
||||
$totalreceipts = $stat['-1'] + $stat['0'] + $stat['1'];
|
||||
?>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="progress">
|
||||
<div class="bar bar-success" style="width: <?php echo round($stat['1']/count($receiptStatus)*100); ?>%;"></div>
|
||||
<!-- div class="bar bar-warning" style="width: <?php echo round($stat['0']/count($receiptStatus)*100); ?>%;"></div -->
|
||||
<div class="bar bar-danger" style="width: <?php echo round($stat['-1']/count($receiptStatus)*100); ?>%;"></div>
|
||||
<div class="bar bar-success" style="width: <?php echo round($stat['1']/$totalreceipts*100); ?>%;"></div>
|
||||
<!-- div class="bar bar-warning" style="width: <?php echo round($stat['0']/$totalreceipts*100); ?>%;"></div -->
|
||||
<div class="bar bar-danger" style="width: <?php echo round($stat['-1']/$totalreceipts*100); ?>%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user