ÿØÿà JFIF ` ` ÿþxØ
| Server IP : 109.234.164.53 / Your IP : 216.73.216.110 Web Server : Apache System : Linux cervelle.o2switch.net 4.18.0-553.32.1.lve.el8.x86_64 #1 SMP Thu Dec 19 13:14:03 UTC 2024 x86_64 User : computer3 ( 1098) PHP Version : 7.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/computer3/litsolide.com/ |
Upload File : |
<?php
//****************************************************************************************//
//************************************* Configuration ************************************//
//****************************************************************************************//
// Chargement fichiers de configuration.
require('libs/Smarty.class.php');
// Démarrage du moteur TPL.
$smarty = new Smarty;
// Chargement des Fonctions Globals.
require('fonctions.php');
// Commande
/*****************************************************************************************************************************************************************/
/*****************************************************************************************************************************************************************/
/*****************************************************************************************************************************************************************/
$sql = $GLOBALS['bdd']->prepare('SELECT o.*, MAX(os.status) AS status FROM orders o
INNER JOIN order_status os
ON os.id_order = o.id
WHERE o.id_order = :id_order');
$sql->execute(array('id_order' => $_GET['id']));
$order = $sql->fetch();
$format_ust = $order['date_insere'];
$order_date_insere = implode('-',array_reverse (explode('-',$format_ust)));
$order_status = $order['status'];
$order_id = $order['id_order'];
$id_client = $order["customer"];
$id_c = $order['id'];
/*****************************************************************************************************************************************************************/
/*****************************************************************************************************************************************************************/
/*****************************************************************************************************************************************************************/
// Customers
/***********/
$numero_client = $id_client;
$sqlc = $GLOBALS['bdd']->prepare('SELECT cle_pro,entreprise, remise_pro,siret FROM customers WHERE id = :id ');
$sqlc->execute(array('id' => $numero_client));
$client = $sqlc->fetch();
$cle_client_pro = $client['cle_pro'];
$entreprise_client_pro = $client['entreprise'];
$remise_client_pro = $client['remise_pro'];
$siret_client_pro = $client['siret'];
// Adresses client facture
/*************************/
$sql = $GLOBALS['bdd']->prepare('SELECT * FROM address WHERE id = :invoice');
$sql->execute(array('invoice' => $order['invoice_address']));
$client= $sql->fetch();
$invoice_id = $client['id'];
$invoice_firstname = $client['firstname'];
$invoice_lastname = strtoupper($client['lastname']);
$invoice_company = strtoupper($client['company']);
$invoice_phone = $client['phone'];
$invoice_address1 = $client['address1'];
$invoice_address2 = $client['address2'];
$invoice_city= strtoupper($client['city']);
$invoice_zip_code= $client['zip_code'];
$invoice_country= strtoupper($client['country']);
$invoice_id_country= $client['id_country'];
// Adresses client livraison
/***************************/
$sql = $GLOBALS['bdd']->prepare('SELECT * FROM address WHERE id = :delivery');
$sql->execute(array('delivery' => $order['delivery_address']));
$client= $sql->fetch();
$delivery_id = $client['id'];
$delivery_firstname = strtoupper($client['firstname']);
$delivery_lastname = strtoupper($client['lastname']);
$delivery_company = strtoupper($client['company']);
$delivery_phone = $client['phone'];
$delivery_address1 = $client['address1'];
$delivery_address2 = $client['address2'];
$delivery_city= strtoupper($client['city']);
$delivery_zip_code= $client['zip_code'];
$delivery_country= strtoupper($client['country']);
$delivery_id_country= $client['id_country'];
// Taux TVA dans Configuration
/*****************************/
$sql0 = $GLOBALS['bdd']->prepare('SELECT T_0_valeur, T_1_valeur, T_2_valeur, T_3_valeur FROM configuration WHERE id = :id');
$sql0->execute(array('id' => '1'));
$result0 = $sql0->fetch();
$T_0_valeur = $result0['T_0_valeur'];
$T_1_valeur = $result0['T_1_valeur'];
$T_2_valeur = $result0['T_2_valeur'];
$T_3_valeur = $result0['T_3_valeur'];
/*****************************************************************************************************************************************************************/
/*****************************************************************************************************************************************************************/
/*****************************************************************************************************************************************************************/
/*****************************************************************************************************************************************************************/
/*****************************************************************************************************************************************************************/
/*****************************************************************************************************************************************************************/
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta name="generator" content="Seomedias (www.seomedias.com)" />
<!-- Code projected by SeOmedias (fr) / Smarty ShapeBootstrap-SeOmedias. All Rights Reserved. -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><?php echo$shop_company . ' : ' . $id_c ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="language" content="fr, ca, ch, be, lu">
<meta name="http.language" content="French">
<meta name="copyright" content="Copyright seomedias.com">
<meta name="robots" content="noindex">
<!--Icon -->
<link rel="apple-touch-icon" sizes="57x57" href="favicon/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="favicon/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="favicon/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="favicon/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="favicon/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="favicon/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="favicon/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="favicon/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="favicon/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="favicon/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="favicon/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
<link rel="manifest" href="favicon/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="favicon/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="templates/shop/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" href="templates/shop/bootstrap/css/bootstrap-responsive.min.css" />
<link rel="stylesheet" href="templates/shop/bootstrap/css/bootstrap.min2.css" />
<!-- Font Awesome -->
<link rel="stylesheet" href="templates/shop/css/font-awesome/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="templates/shop/css/font-awesome/css/font-awesome.css" />
<link rel="stylesheet" href="templates/shop/css/style.css" />
<link rel="stylesheet" href="templates/shop/css/animate.min.css" />
<link type="text/css" rel="stylesheet" href="templates/shop/css/global.php" >
<link rel="stylesheet" href="templates/shop/css/global_end_3colonnes.css" />
<link rel="stylesheet" href="impression.css" type="text/css" media="print">
</head>
<body>
<div class="container" style="max-width:1000px;margin-top:20px;">
<div class="no_impress" style="text-align:right;margin-bottom:10px" >
<a href="javascript:window.print()">Imprimer le document</a>
</div>
<?php
if ($delivery_id == $delivery_id) {
?>
<table class="table table-bordered table-striped">
<tr>
<td valign="top" align="left" class="normal" style="width:50%">
<img src="templates/shop/img/<?php echo$Image_Logo ?>" alt="" /><br />
<?php if($order_status>0){ echo'<span style="font-size:18pt">Facture n° ' . $id_c . '</span>'; } else { echo'<span style="font-size:18pt">Commande n° ' . $id_c . '</span>';} ?>
<?php if($order_status>0){ echo'<br /><span style="font-size:13pt">Date Facture : ' .$order_date_insere. '</span>'; } else { echo'<br /><span style="font-size:13pt">Date Commande : ' .$order_date_insere. '</span>';} ?>
</td>
<td class="normal">
<div style="text-align:center;font-size:18pt">Adresse facturation</div>
<br />
<div style="text-align:left;margin-left:10%">
<?php
if ($cle_client_pro >0){
echo'<b>'. $entreprise_client_pro . '</b><br />';
}
echo'<b>'. $invoice_firstname . ' ' .$invoice_lastname .'</b><br />';
echo''. $invoice_address1 . '<br />';
if ($invoice_address2 !==''){echo''. $invoice_adress2 . '<br />';}
echo'<b>'. $invoice_zip_code . ' ' . $invoice_city .'</b><br />';
echo'<b>'. $invoice_country . '</b><br />';
echo''. $invoice_phone . '<br />';
echo strtolower($order["email"]);
?>
</div>
</td>
</tr>
</table>
<?php
} else {
?>
<table class="table table-bordered table-striped">
<tr>
<td valign="top" align="left" class="normal">
<img src="templates/shop/img/<?php echo$Image_Logo ?>" alt="" /><br />
<?php if($order_status>0){ echo'<span style="font-size:18pt">Facture n° ' . $id_c . '</span>'; } else { echo'<span style="font-size:18pt">Commande n° ' . $id_c . '</span>';} ?>
<?php if($order_status>0){ echo'<br /><span style="font-size:13pt">Date Facture : ' .$order_date_insere. '</span>'; } else { echo'<br /><span style="font-size:13pt">Date Commande : ' .$order_date_insere. '</span>';} ?>
</td>
<td class="normal">
<div style="text-align:center;font-size:18pt">Adresse facturation</div>
<br />
<?php
if ($cle_client_pro >0){
echo'<b>'. $entreprise_client_pro . '</b><br />';
}
echo'<b>'. $invoice_firstname . ' ' .$invoice_lastname .'</b><br />';
echo''. $invoice_address1 . '<br />';
if ($invoice_address2 !==''){echo''. $invoice_adress2 . '<br />';}
echo'<b>'. $invoice_zip_code . ' ' . $invoice_city .'</b><br />';
echo'<b>'. $invoice_country . '</b><br />';
echo''. $invoice_phone . '<br />';
echo strtolower($order["email"]);
?>
</td>
<td class="normal">
<div style="text-align:center;font-size:18pt">Adresse de livraison</div>
<br />
<?php
if ($cle_client_pro >0){
echo'<b>'. $entreprise_client_pro . '</b><br />';
}
echo'<b>'. $delivery_firstname . ' ' .$delivery_lastname .'</b><br />';
echo''. $delivery_address1 . '<br />';
if ($delivery_address2 !==''){ echo''. $delivery_adress2 . '<br />';}
echo'<b>'. $delivery_zip_code . ' ' . $delivery_city .'</b><br />';
echo'<b>'. $delivery_country . '</b><br />';
echo''. $delivery_phone . '<br />';
?>
</td>
</tr>
</table>
<?php
}
/**************************************************************************************************************/
/**************************************************************************************************************/
/**************************************************************************************************************/
?>
<table class="table table-bordered table-striped">
<tr>
<td>Modalité de paiement :</td>
<td><b><? echo $order["payment"]; ?></b></td>
</tr>
<tr>
<td>Statut de la commande :</td>
<td><b>
<?php
switch ($order['status']) {
case '1':
echo$comm_1;
break;
case '2':
echo$comm_2;
break;
case '3':
echo$comm_3;
break;
default:
echo$comm_4;
break;
}
?></b>
</td>
</tr>
</table>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th class="span2 center" style="text-align:center">Réf.</th>
<th class="span2 center" style="text-align:center">TVA Taux</th>
<th class="span3 center" style="text-align:center">Désignation</th>
<th class="span1 center" style="text-align:center">Quantité</th>
<th class="span2 center" style="text-align:center">Prix HT</th>
<th class="span2 center" style="text-align:center">Prix TTC</th>
<th class="span2 center" style="text-align:center">Total HT</th>
<th class="span2 center" style="text-align:center">Total TTC</th>
</tr>
</thead>
<tbody>
<?php
// Produits
/*****************************************************************************************************************************************************************/
/*****************************************************************************************************************************************************************/
/*****************************************************************************************************************************************************************/
$sqlss = $bdd->prepare('SELECT op.*, p.id AS id_product, p.reference, p.cle_tva, p.name, p.tva FROM orders_products op
INNER JOIN products p
ON op.id_product = p.id
WHERE id_order= :id_order');
$sqlss->execute(array('id_order' => $id_c));
$products = $sqlss->fetchAll();
// debut roulette MISE A JOUR VENTE EN LOT
/*****************************************************************************************************************************************************************/
/*****************************************************************************************************************************************************************/
/*****************************************************************************************************************************************************************/
$total_tb = "0";
$total_tb_httt ="0";
foreach ($products as $product) {
// Si groupage existant pour cet article prix par attribut unique
/*****************************************************************************************************************************************************************/
if ($act_agp >0){
/*************************************************************************/
// seconde roulette cherche le prix pour article idem sur plusieurs lignes
/*************************************************************************/
foreach ($products as $roulette_agp) {
$cherche = $product['id_product'];
$command = $id_c;
$quantity_tot = 0;
$sqlaa = $bdd->prepare('SELECT quantity FROM orders_products
WHERE id_order= :id_order AND id_product = :id_product ');
$sqlaa->execute(array('id_order' => $id_c, 'id_product' => $cherche));
$productsrr = $sqlaa->fetchAll();
for($i=0; $i<count($productsrr); $i++) {
$quantity_tot = $quantity_tot + $productsrr[$i]['quantity'];
}
$sql23 = $GLOBALS['bdd']->prepare('SELECT *, MIN(prix) AS pprix FROM lot_list
WHERE nombre <= :quantitee AND id_produit = :id_produit ORDER BY nombre ASC LIMIT 1');
$sql23->execute(array('id_produit' => $cherche, 'quantitee' => $quantity_tot));
$result23 = $sql23->fetch();
$tarif_lot = $result23['pprix'];
//echo'eeeeeeeeeee'.$tarif_lot;
if ($tarif_lot >0){ $product['price'] = $tarif_lot;} else { $product['price'] =$product['price'];}
}
/*************************************************************************/
// FIN roulette cherche le prix pour article idem sur plusieurs lignes
/*************************************************************************/
}
/*****************************************************************************************************************************************************************/
?>
<tr>
<td style="text-align: center;">
<?php if(isset($product["reference"])) echo $product["reference"];
?>
<?php if($product["date_dispo"] !=="0000-00-00") {
$array_debut_us=explode("-", $product['date_dispo']);
$date_debut_fr=$array_debut_us[2]."-".$array_debut_us[1]."-".$array_debut_us[0];
$date_dispo_fr= str_replace('-','/', $date_debut_fr);
echo'<br /><span style="color:#cc3300">Livrer à partir du <br /> '.$date_dispo_fr.'</span>';
}
/*****************************************************************************************************************************************************************/
/*****************************************************************************************************************************************************************/
/*****************************************************************************************************************************************************************/
// Retrouve taux TVA
$sqlyt = $GLOBALS['bdd']->prepare('SELECT T_0_valeur,T_1_valeur,T_2_valeur,T_3_valeur FROM configuration
WHERE id = :id');
$sqlyt->execute(array('id' => '1'));
$resultyt = $sqlyt->fetch();
$T_0_valeur = $resultyt['T_0_valeur'];
$T_1_valeur = $resultyt['T_1_valeur'];
$T_2_valeur = $resultyt['T_2_valeur'];
$T_3_valeur = $resultyt['T_3_valeur'];
if ($product["cle_tva"] == '0') { $tauxx_tva = 'sans'; }
if ($product["cle_tva"] == '1') { $tauxx_tva = $T_1_valeur; }
if ($product["cle_tva"] == '2') { $tauxx_tva = $T_2_valeur;}
if ($product["cle_tva"] == '3') { $tauxx_tva = $T_3_valeur;}
?>
</td>
<td style="text-align: center;">
<?php echo $tauxx_tva . ' %';
if ($product["cle_tva"] == '0') { $tauxx_tva = $T_0_valeur; }
?>
</td>
<td style="text-align: left;">
<?php echo stripcslashes($product["name"]); ?>
<?php if ($product['attributes'] !=='') { ?>
[<?php echo $product['attributes']; ?>]
<?php } ?>
<?php
if ($product['discount'] != 0)
{
?>
<br>
<span style="padding-left: 10px;">
Remise de <?php echo number_format($product['discount'], 2, ",", " "); ?>
% incluse
</span>
<?php
}
?>
<br /> <span style="padding-left: 0;">
<?php echo $product['observations']; ?>
</span>
</td>
<td style="text-align: center;">
<?php echo $product["quantity"]; ?>
</td>
<?php
/*****************************************************************************************************************************************************************/
/*****************************************************************************************************************************************************************/
/*****************************************************************************************************************************************************************/
echo'<td style="text-align: center;">';
if ($product["cle_tva"] > '0') {
$diviseur = ($tauxx_tva / 100) + 1;
$le_px_ht = $product['price'] / $diviseur;
}
else {
$le_px_ht = $product['price'];
}
/*********************************************************************************************/
//$product["price"] = $le_px_ht;
//echo$diviseur; echo'<br />'; echo$le_px_ht ; echo'<br />';
/*********************************************************************************************/
echo number_format($le_px_ht, 2, ",", " ") . '€</td>';
?>
<td style="text-align: center;">
<?php
echo number_format($product["price"], 2, ",", " ");
?> €
</td>
<td style="text-align: center;">
<?php
$total_httt = $le_px_ht * $product["quantity"];
echo number_format($total_httt, 2, ",", " ");
?> €
</td>
<?php
$total_tb_httt = $total_tb_httt + $total_httt ;
?>
<td style="text-align: center;">
<?php
$total = $product["price"] * $product["quantity"];
echo number_format($total, 2, ",", " ");
?> €
</td>
</tr>
<?php
$total_tb = $total_tb + $total ;
}
?>
<?php
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
?>
<tr>
<td colspan="6" style="text-align: left;">
<b>Totaux BRUT</b></td>
<td style="text-align: center;">
<b><? echo number_format($total_tb_httt, 2, ",", " "); ?> €</b>
</td>
<td style="text-align: center;">
<b><? echo number_format($total_tb, 2, ",", " "); ?> €</b>
</td>
</tr>
<?php
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
$totaux_remise = 0;
///////////////////////////////////////////////////////////
if($order['discount'] != 0)
{
?>
<tr>
<td colspan="7" style="text-align: left;">
<b>Remise Code PROMO s/TTC : <?php echo $order['txt_discount']; ?>
: </b>
</td>
<td style="text-align: center;">
- <? echo number_format($order['discount'], 2, ",", " "); ?>
€
</td>
</tr>
<?php
$totaux_remise = $totaux_remise + $order['discount'];
}
?>
<?php
///////////////////////////////////////////////////////////
if($order['bienvenue_taux'] > 0) { ?>
<tr>
<td colspan="7" style="text-align: left;">
<b>Remise de bienvenue sur TTC (<?php echo number_format($order['bienvenue_taux'], 2, ",", " "); ?>
%)</b>
</td>
<td style="text-align: center;">
-<?php echo number_format($order['bienvenue_ttc'], 2, ",", " "); ?>
€
</td>
</tr>
<?php
$totaux_remise = $totaux_remise + $order['bienvenue_ttc'];
}
///////////////////////////////////////////////////////////
?>
<?php
///////////////////////////////////////////////////////////
if($order['fidelite_taux'] > 0) { ?>
<tr>
<td colspan="7" style="text-align: left;">
<b>Remise Fidélité comprise sur TTC (<?php echo number_format($order['fidelite_taux'], 2, ",", " "); ?>
%)</b>
</td>
<td style="text-align: center;">
- <?php echo number_format($order['fidelite_ttc'], 2, ",", " "); ?>
€
</td>
</tr>
<?php
$totaux_remise = $totaux_remise + $order['fidelite_ttc'];
}
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
?>
<?php
///////////////////////////////////////////////////////////
if($totaux_remise > 0) {
$leNet = $total_tb - $totaux_remise;
$tva_0 = $order['tva_0'];
$tva_1 = $order['tva_1'];
$tva_2 = $order['tva_2'];
$tva_3 = $order['tva_3'];
$total_tva = $tva_0 + $tva_1 + $tva_2 + $tva_3;
$total_ht = $leNet - $total_tva;
?>
<tr>
<td colspan="6" style="text-align: left;">
<b>Totaux après remise(s)</b>
</td>
<td style="text-align: center;">
<b><?php echo number_format($total_ht, 2, ",", " "); ?> €</b>
</td>
<td style="text-align: center;">
<b><?php echo number_format($leNet, 2, ",", " "); ?> €</b>
</td>
</tr>
<?php
} else {
$leNet = $total_tb ;
$tva_0 = $order['tva_0'];
$tva_1 = $order['tva_1'];
$tva_2 = $order['tva_2'];
$tva_3 = $order['tva_3'];
$total_tva = $tva_0 + $tva_1 + $tva_2 + $tva_3;
$total_ht = $leNet - $total_tva;
}
///////////////////////////////////////////////////////////
?>
<tr>
<td colspan="7" style="background:#ddd;text-align: left;">
<font color="#000"><b>TOTAL NET HT (hors transport éventuel)</b></font>
</td>
<td style="background:#ddd;text-align: center;">
<font color="#000"><b><? echo number_format($total_ht, 2, ",", " "); ?>
€</b></font>
</td>
</tr>
<tr>
<?php
/////////////////////////////////////////////////////////
if (($tva_1 < 0.0001) AND ($tva_2 < 0.0001) AND ($tva_3 < 0.0001)) { ?>
<td colspan="7" style="text-align: left;">
<b>TVA : (<?php echo$order['txt_tva0']; ?>)</b>
</td>
<td style="text-align: center;">
<? echo number_format($order['tva_0'], 2, ",", " "); ?> €
</td>
</tr>
<?php } ?>
<?php if ($tva_1 > 0) { ?>
<td colspan="7" style="text-align: left;">
Cumul TVA 1 : (<?php echo$order['txt_tva1']; ?>)
</td>
<td style="text-align: center;">
<? echo number_format($order['tva_1'], 2, ",", " "); ?> €
</td>
</tr>
<?php } ?>
<?php if ($tva_2 > 0) { ?>
<td colspan="7" style="text-align: left;">
Cumul TVA 2 : (<?php echo$order['txt_tva2']; ?>)
</td>
<td style="text-align: center;">
<? echo number_format($order['tva_2'], 2, ",", " "); ?> €
</td>
</tr>
<?php } ?>
<?php if ($tva_3 > 0) { ?>
<td colspan="7" style="text-align: left;">
Cumul TVA 3 : (<?php echo$order['txt_tva3']; ?>) </td>
<td style="text-align: center;">
<? echo number_format($order['tva_3'], 2, ",", " "); ?> €
</td>
</tr>
<?php }
//////////////////////////////////////////////////////////////////////////
$total_de_la_tva = $order['tva_1'] + $order['tva_2'] + $order['tva_3'] + 0;
?>
<td colspan="7" style="text-align: left;">
<font color="#000"><b>TOTAL TVA (hors transport éventuel)</b></font>
</td>
<td style="text-align: center;">
<font color="#000"><b><? echo number_format($total_de_la_tva, 2, ",", " "); ?>
€</b></font>
</td>
</tr>
<td colspan="7" style="background:#ddd;text-align: left;">
<font color="#000"><b>TOTAL NET TTC (hors transport
éventuel)</b></font>
</td>
<td style="background:#ddd;text-align: center;">
<font color="#000"><b><?php echo number_format($leNet, 2, ",", " "); ?>
€</b></font>
</td>
</tr>
<tr>
<td colspan="7" style="text-align: left;">
</td>
<td style="text-align: center;">
</td>
</tr>
<?php
$p_transp = $order['px_transport'];
$coefT_2 = $T_1_valeur / 100; $coefT = $coefT_2 + 1;
$mont_tva_transport += ($p_transp / $coefT) * $coefT_2;
$mont_tva_transport = number_format($mont_tva_transport, 2, ",", " ");
?>
<tr>
<td colspan="7" style="text-align: left;">
<?php if ($order['carrier_price'] > 0) { ?>
<b>Port TTC </b>(dont TVA <?php echo$order['txt_tva1']; ?>
soit : <?php echo$mont_tva_transport; ?> €)
<br /><font color="#FF0000"><?php echo$order["carrier"] ; ?></font>
<?php } else { ?>
<b>Port NET </b>(sans TVA)
<br /> <font color="#FF0000"><?php echo$order["carrier"] ; ?></font>
<?php } ?>
</td>
<td style="text-align: center;">
<b><? echo number_format($p_transp, 2, ",", " "); ?> €</b>
</td>
</tr>
<tr>
<td colspan="7" style="background:#ddd;text-align: left;">
<font color="#000"><b>Total NET TTC A PAYER</b></font>
</td>
<td style="background:#ddd;text-align: center;">
<font color="#000" size="3"><b><? echo number_format($order['total'], 2, ",", " "); ?>
€</b></font>
</td>
</tr>
</tbody>
</table>
<p align="center">
<b>
<?php
if (!empty($shop_company)){ echo$shop_company . ' - '; }
if (!empty($shop_address)){ echo$shop_address. ' - '; }
if (!empty($shop_zip_code)){ echo$shop_zip_code. ' '; }
if (!empty($shop_town)){ echo$shop_town. ' '; }
if (!empty($shop_phone)){ echo$shop_phone. ' '; }
if (!empty($shop_fax)){ echo$shop_fax. ''; }
if (!empty($shop_email_contact)){ echo'<br />' . $shop_email_contact. ''; }
?>
</b>
<br /><br />
<span style="font-size:11pt"><?php echo$tva_intra ?> - <?php echo$siren ?></span><span style="font-size:10pt"><br /> <?php echo$txt_fact ?></span>
</body>
</html>