$dateContrat[$key][] = $contratsPeriode[$key]['date_fin']; $nbContrats++; } } } $transactionContrat = array(); foreach ($dateContrat as $key => $value) { $transactionContrat[] = Transaction::recherchePeriode2($dateContrat[$key][0], $dateContrat[$key][1]); } $smarty->assign('transactionContrat', $transactionContrat); $smarty->assign('dateContrat', $dateContrat); $smarty->assign('nbContrats', $nbContrats); $tousContrats = TarifTransaction::decoupeContrat($contratsPeriode); $resultat = array(); foreach ($tousContrats as $key => $value) { $resultat[] = TarifTransaction::calculPrix($tousContrats[$key], $transactionContrat[$key][0]); } $prix = $resultat; $smarty->assign('prix', $prix); $totalPrix = 0; foreach ($prix as $key => $value) { $totalPrix = $totalPrix + $value; } $smarty->assign('totalPrix', $totalPrix); } /* require_once _PATH_ . "modele/controleTransaction.class.php"; if (!empty ( $post )) { echo var_dump($_POST); $date_deb = "$_POST[annee_deb]-$_POST[mois_deb]-$_POST[jour_deb]"; $date_fin = "$_POST[annee_fin]-$_POST[mois_fin]-$_POST[jour_fin]";