THIS FIELD HAS TO BE CONFIGURED FIRST ".$editParamsBtn.""; ?> 0 ){ ?> $inp) { echo ""; } ?> $a) { $trStyle = ""; $tds = ""; $todoDone = 0; $todo = 0; foreach ($properties as $i => $inp) { $tds .= ""; } ?> "; echo $tds; if($mode != "r" && $mode != "pdf"){ ?>
".$inp["placeholder"]."
"; if( $i == "worker" ) { $valbl = "?"; $class= "btn btn-default"; if( isset( $a["worker"] ) ) { $o = PHDB::findOne(Organization::COLLECTION,["_id"=>new MongoId($a["worker"]["id"])],["name","slug"]); $valbl = $o["name"]; $class=""; } $tds .= "".$valbl.""; } if( $i == "todo" ) { $valbl = ""; $class= "btn btn-default"; if( isset( $a["todo"] ) ){ $valbl = count( $a["todo"] ); $totalTodos += count($a["todo"]); foreach ($a["todo"] as $tix => $do) { if(isset($do["done"]) && $do["done"]=="1") $todoDone++; else $todo++; } $totalTodosDone += $todoDone; $valbl = $todoDone."/".count( $a["todo"] ); } $tds .= "".$valbl.""; } else if( $i == "line" && isset( $a["financer"]["line"] ) ) $tds .= $a["financer"]["line"]; else if( $i == "workType" && isset( $a["worker"]["workType"] ) ) $tds .= $a["worker"]["workType"]; else if( $i == "progress"){ if(isset($a["todo"])){ $progress = floor($todoDone*100/count($a["todo"])); } else { $progress = (!empty($a["progress"]) ) ? (int)$a["progress"] : 0; } $totalProgress += $progress; $percol = "warning"; if( $progress == 100 ){ $percol = "success"; } $tds .= "".$progress."%"; $tds .= '
'. '
'. ''.$progress.'% Complete'. '
'. '
'; } else if( $i == "total"){ $total = 0; $totalPayedHere = 0; $amounts = (isset($this->costum["form"]["params"][$budgetKey]["amounts"])) ? $this->costum["form"]["params"][$budgetKey]["amounts"] : ["price" => "Price"] ; foreach ( $amounts as $k => $l) { if(!empty($a[$k])) $total += (int)$a[$k]; } $bigTotal += $total; $color = "default"; if(isset($a["payed"])){ if($a["payed"]["status"] == "total"){ $color = "success"; $totalPayedHere = $total; $payedWork++; } else if($a["payed"]["status"] == "partly"){ $color = "warning"; $totalPayedHere = $a["payed"]["amount"]; } else if($a["payed"]["status"] == "accompte"){ $color = "warning"; $totalPayedHere = $a["payed"]["amount"]; } $totalPayed += $totalPayedHere; } $tds .= "".$total."€"; $percol = "default"; $payedPercent = 0; if($totalPayedHere != 0){ $payedPercent = $totalPayedHere * 100 / $total; $percol = "warning"; } if( $payedPercent == 100 ){ $percol = "success"; } $tds .= '
'. '
'. ''.$payedPercent.'% Complete'. '
'. '
'; } else if( $i == "validation"){ $color = "default"; $valbl = "?"; $tool= "En attente de validation"; if( isset($a["validFinal"]) ){ if( $a["validFinal"]["valid"] == "validated" ){ $color = "success"; $valbl = "V"; $trStyle = "background-color:#e5ffe5"; $validWork++; $tool="Validé sans réserve"; } else if( $a["validFinal"]["valid"] == "reserved" ){ $color = "warning"; $valbl = "R"; $tool="Validé avec réserves"; } else if( $a["validFinal"]["valid"] == "refused" ){ $color = "danger"; $valbl = "NV"; $tool="Non validé"; } } $tds .= "".$valbl.""; }else if( isset( $a[$i] ) && is_array($a[$i]) ) $tds .= implode(" , ", $a[$i]); else if( isset( $a[$i] ) ) $tds .= $a[$i]; $tds .= "
','', '')">$answer["_id"],"contextType"=>"answers", "path"=>$answer["_id"].$key.$q))?>
Pourcentage d'avancement Globale". '
'. '
'. ''.$totalProgress.'% Complete'. '
'. '
'; ?>
Pourcentage d'avancement %
Resta à faire %
Nombres de Travaux Validés
Nombres de Taches Cloturés
Suivi des dépenses Globale". '
'. '
'. ''.$bigTotalPercent.'% Complete'. '
'. '
'; ?>
BUDGET TOTAL
TRAVAUX PAYÉS
DELTA
Nombres de Travaux Cloturés