Ubuntu
'Internet','t'=>'Téléphonie','f'=>'Fibre']; // Internet, Telephonie
$Total_Rec = "0";
$Total_Fas = "0";
foreach($ArrType as $TypedeCommande=>$NomType) {
$cpte = count($_SESSION['AIRCMDV2']['Commande'][$TypedeCommande]);
if($cpte) echo "$NomType";
foreach($_SESSION['AIRCMDV2']['Commande'][$TypedeCommande] as $Etape=>$Produits) {
// Extrait uniquement l ID
foreach($Produits as $NoProduit=>$Dtl) {
if($Dtl['qte']) $qte = $Dtl['qte']; else $qte ="1";
//if($Dtl['confirme']=='OK') {
echo " ";
$NomProduit = $_SESSION['AIRCMDV2']['NomProduits'][$Dtl['id']]['nom'];
$Rec = $_SESSION['AIRCMDV2']['NomProduits'][$Dtl['id']]['rec']*$qte;
$Total_Rec += $Rec;
$Fas = $_SESSION['AIRCMDV2']['NomProduits'][$Dtl['id']]['fas']*$qte;
$Total_Fas += $Fas;
if ($Dtl['id'] > 0) {
${'Cpte' . $Type}++;
// Produit
if ($Etape == "1") {
$Array = ['Forfait ', $NomType, $NomProduit, $Rec, $Fas,$Dtl['qte'],$Dtl['id']];
FormatLignePanier($Array);
}
// Options
if ($Etape == "2") {
$Array = ['Opt.', $NomType, $NomProduit, $Rec, $Fas,$Dtl['qte'],$Dtl['id']];
FormatLignePanier($Array);
}
}
echo "
";
//}
}
// Avec REMISE
if ($_SESSION['AIRCMDV2']['CodePROMO']['remise']) $Remise456 = $_SESSION['AIRCMDV2']['CodePROMO']['remise'];
else $Remise456 ="";
$HTssR = $Total_Fas+$Total_Rec; // HT sans remise
$HT = $HTssR-($HTssR*$Remise456);
$TVA = ($HT*20/100);
$TTC = $HT+$TVA;
$_SESSION['AIRCMDV2']['TotalCmd'] = $TTC;
}
if ($cpte && empty(${'Cpte'.$Type})) echo "
Sélectionnez une offre
";
}
?>
Mise en service
=number_format($Total_Fas, 2, ',','')?> € HT
Abonnement
=number_format($Total_Rec, 2, ',','')?> € HT
Total HT
=number_format($HTssR, 2, ',','')?> € HT
Avec remise (-=$Remise456*100?>%)
€ HT
TVA (20%)
=number_format($TVA, 2, ',','')?> € HT
Total TTC
=number_format($TTC, 2, ',','')?> €
$Qte $array[0] " .utf8_encode($array[2]). "";
echo "" . number_format($array[3], 2, ',', '') . " €
";
// Si ID produit et <> de livraison express(42)
if ($array[3] && $array[6]<>'42' ) {
echo "1 Frais de mise en service
";
echo "" . number_format( $array[4], 2, ',', '') . " €
";
}
}
?>