Commit 2ed25ccc authored by thomas craipeau's avatar thomas craipeau
Browse files

Merge branch 'anatole' into 'master'

element & financement fix

See merge request !29
parents b6d5eed7 3f62851c
......@@ -368,7 +368,7 @@ costumInputs.elementparents = {
collection : "answers",
id : answerId,
arrayForm : true,
path : "answers.action.parents",
path : "answers.organizations",
value : {
type : data.type ,
id : data.id ,
......
......@@ -783,10 +783,30 @@
</div>
<?php
$totalBudg = 0;
$totalMapBudg = [];
foreach ( $properties as $i => $inp ) {
if(stripos($i, "amount") !== false ){
$totalMap[$i] = 0;
$totalMapBudg[$i] = 0;
}
}
if(isset($answer["answers"]["murir"]["budget"])){
foreach ( $answer["answers"]["murir"]["budget"] as $q => $a ) {
foreach ($totalMapBudg as $i => $tot) {
if(isset($a[$i]))
$totalMapBudg[$i] = $tot + $a[$i];
}
}
foreach ( $totalMapBudg as $i => $tot ) {
$totalBudg = $totalBudg + $tot ;
}
}
if( $mode != "pdf"){
$this->renderPartial( "survey.views.tpls.forms.costum.ctenat.equibudget" ,
[ "totalFin" => (isset($total)) ? $total : 0 ,
"totalBudg" => (isset($total)) ? $totalBudg : 0,
"totalBudg" => (isset($totalBudg)) ? $totalBudg : 0,
"titleColor" => $titleColor,
"kunik" => $kunik,
"mode" => $mode ] );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment