THIS FIELD HAS TO BE CONFIGURED FIRST ".$editParamsBtn."";?> 0 ){ ?> $inp) { echo ""; } ?> $a) { //prepare td content $trStyle = ""; $tds = ""; foreach ($properties as $i => $inp) { $size = (isset($inp["size"])) ? "col-xs-".$inp["size"] : ""; $tds .= ""; } echo ""; echo $tds; if($mode != "r" && $mode != "pdf"){ ?> "; } } if($total > 0){ echo ""; echo ""; echo ""; echo ""; } if($totalFunded > 0){ echo ""; echo ""; echo ""; echo ""; } ?>
".$inp["placeholder"]." State
"; if( $i == "price" && isset($a[$i]) ){ $tds .= $a[$i]."€"; if(isset($percentDiv)){ $tds .= $percentDiv; $tds .= "
".floor($percentAmountFunded)."%"; $percentDiv = ""; $percentAmountFunded = 0; } } else if( $i == "financer" ) { $totalAmountFunded = 0; if( isset($a["financer"]) ) { //if(count($a["financer"])>1){} $totalAmountFunded = 0; $tds .= ""; foreach ($a["financer"] as $ix => $fin) { $tds .= ""; $tds .= ""; $tds .= ""; $tds .= ""; $tds .= ""; $tds .= ""; } $totalFunded += $totalAmountFunded; $tds .= "
"; if(!empty($fin["id"])){ $o = PHDB::findOne(Organization::COLLECTION,[ "_id" => new MongoId($fin["id"]) ], ["name","slug"]); $tds .= $o["name"]; } else if( isset( $fin["email"] ) && isset( $fin["name"] ) ){ $tds .= $fin["name"]."
".$fin["email"]; }else $tds .= "unkknown"; $tds .= "
"; if(!empty($fin["line"])) $tds .= $fin["line"]; $tds .= ""; if(!empty($fin["amount"])){ $tds .= $fin["amount"]."€"; $totalAmountFunded += (int)$fin["amount"]; } $tds .= ""; if(!empty($fin["amount"]) && isset($a["price"])){ $percent = $fin["amount"] * 100 / (int)$a["price"]; $tds .= " ".floor($percent)."%"; } $tds .= "
"; if($totalAmountFunded>0 && isset( $a["price"] )){ $percentAmountFunded = $totalAmountFunded * 100 / (int)$a["price"]; $total += (int)$a["price"]; $percol = "danger"; $trStyle = "background-color:#ffdada"; if( $percentAmountFunded >= 50 ){ $percol = "warning"; $trStyle = "background-color:#ffe7d1"; } if( $percentAmountFunded >= 100 ){ $percol = "success"; $trStyle = "background-color:#e5ffe5"; } $percentDiv = '
'. '
'. ''.$percentAmountFunded.'% Complete'. '
'. '
'; } } $tds .= "
". "
"; if($canEdit){ $tds .= " Ajouter un financeur"; } $tds .= "
"; } else if( isset($a[$i]) ) $tds .= $a[$i]; // else if( $i == "amount" && isset( $a["financer"]["amount"] ) ) // $tds .= $a["financer"]["amount"]; // else if( $i == "line" && isset( $a["financer"]["line"] ) ) // $tds .= $a["financer"]["line"]; $tds .= "
".$valbl.""; ?> ','', '')">$answer["_id"],"contextType"=>"answers", "path"=>$answer["_id"].$key.$q))?>
TOTAL À FINANCER : ".trim(strrev(chunk_split(strrev($total),3, ' ')))." €
TOTAL FINANCÉ: ".trim(strrev(chunk_split(strrev($totalFunded),3, ' ')))." €
= 100 ){ $percol = "success"; } echo "

Pourcentage de Financement Globale

". '
'. '
'. ''.$financedPercentage.'% Complete'. '
'. '
'; ?> $totalFunded){ ?>
Total à financer
Total financé
Pourcentage financé %
Reste à financer
% Reste à financer %