Current File : /home/karenpetzb/application/modules/default/views/scripts/user/facture.phtml
<?php
$facture = $this->facture;
?>
<style type="text/css">
.textTd1 {
	font-family: "Verdana";
	font-size: 11px;
	font-weight: normal;
	color: #000000;
	text-decoration: none;
}
.oldPromoPrice {
	font-size: 10px;
	font-weight: normal;
	color: #5e5e59;
	text-decoration: line-through;
}

.bill_body {
	clear: both;
	width: 800px;
	margin: 0 auto 0 auto;
}

.bill_header {
	float: clear : both;
	width: 800px;
}

.bill_company {
	float: left;
}
.bill_company_logo {
	margin: 10px 0 10px 10px;
	width: 94px;
	height: 121px;
}
.bill_idents {
	float: right;
	width: 550px;
}
.bill_idents_opt1{
	float:left;
	width:120px;
	height:50px;
	margin:0 0 0 10px;
}

.bill_idents_opt21{
	float:left;
	width:120px;
	height:25px;
	background-color: #e7e7e7;
	margin:0 0 0 0;
	text-align:center;
	border: solid 1px black;
	color: #000000;
	font-weight: bold;
}
.bill_idents_opt31{
	float:left;
	width:120px;
	height:24px;
	margin:1px 0 0 0;
	text-align:center;
	border: solid 1px black;
	color: #000000;
	font-weight: bold;
}

.bill_idents_opt22{
	float:left;
	width:250px;
	height:25px;
	background-color: #e7e7e7;
	margin:0 0 0 0;
	text-align:center;
	border: solid 1px black;
	color: #000000;
	font-weight: bold;
}
.bill_idents_opt32{
	float:left;
	width:250px;
	height:24px;
	margin:1px 0 0 0;
	text-align:center;
	border: solid 1px black;
	color: #000000;
	font-weight: bold;
}

.bill_text {
	color: #000000;
	font-weight: bold;
}
.bill_text2 {
	color: #000000;
	font-weight: bold;
	line-height:25px;
}
.bill_text3 {
	color: #000000;
	font-size:11px;
}
.bill_address {
	float: left;
	width: 800px; 
	margin:10px 0 0 0;
}

.bill_address_opt {
	float: left;
	width: 300px; 
	margin: 0 0 0 50px;
	
}
.bill_address_opt1{
	float:left;
	width:300px;
	height:25px;
	background-color: #e7e7e7;
	margin:0 0 0 0;
	text-align:center;
	border: solid 1px black;
	color: #000000;
	font-weight: bold;
}




.bill_address_opt2 {
	float:left;
	width:250px;
	margin: 10px 0 0 20px;
}

.bill_line {
	line-height:25px;
	text-align:center;
	font-weight:bold;
}
.bill_line2 {
	line-height:20px;
}

.bill_caddy {
	float: left;
	width:800px;
	height:auto;
}

.bill_facture{
	float: left;
	width:800px; 
}


.bill_buy{
	float: left;
	width:500px; 
}
 
.bill_user_paiement_box {
	width:450px;
	margin:5px 0 0 0;
	padding: 0 10px 10px 10px;
	border : 2px #000000 solid;
}


.bill_detail{
	float: right;
	width:250px;
	height:130px;
	border: solid 1px black;
	margin: 10px 0 0 0;
}
.bill_footer{
	float: left;
	width:800px;
	margin: 20px 0 0 0;
}
.bill_footer2{
	float: left;
	width:800px;
	text-align:center;
	margin: 0 0 20px 0;
}

.bill_linkd a:link,.bill_linkd a:visited,.bill_linkd a:active {
	font-family: "Arial";
	font-size: 12px;
	font-weight: normal;
	color: #000000;
	text-decoration: none;
}

.bill_linkd a:hover {
	text-decoration: underline;
}
</style>

<div class="spaceBG2" style="clear: both;"></div>
	<div class="col-xs-12 text-center hidden-print" style="margin-top: 20px; margin-bottom: 20px"><a class="btn btn-default" onclick="window.print();return false;" href="<?php echo $this->baseUrl; ?>/"><span class="fa fa-print"></span> Imprimer</a></div>
<div class="bill_body">
	<div class="bill_header">
		<div class="bill_company">
			<div class="bill_company_logo"> 
				<a href="<?php echo $this->baseUrl; ?>/"><img alt="Directement � la source de la qualit�" src="<?php echo $this->baseUrl; ?>/business/image/logo.png" style="border: none;"/></a>
			</div>
		</div>
		<div class="bill_idents">
			<div class="bill_idents_opt1">
				<div class="bill_idents_opt21">
					<span class="bill_line"><?php if ($facture['STATUT'] == 1 || $facture['STATUT'] == 2 || $facture['STATUT'] == 3) { echo 'Facture';} else {echo 'Devis';} ?></span>
				</div>
				<div class="bill_idents_opt31">
					<span class="bill_line"><?php echo $facture['REFERENCE']; ?></span>
				</div>
			</div>
			<div class="bill_idents_opt1">
				<div class="bill_idents_opt21">
					<span class="bill_line"><?php echo 'Date'; ?></span>
				</div>
				<div class="bill_idents_opt31">
					<span class="bill_line">
					<?php 
					try {
					$myDate = new Zend_Date(strtotime($facture['DATESTART']));
					
					$mois = array('','Jan.', 'F�v.', 'Mars', 'Avril', 'Mai', 'Juin', 'Juil.', 'Ao�t', 'Sept.', 'Oct.', 'Nov.', 'D�c.');
				$moisComplet = array('','Janvier', 'F�vrier', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Ao�t', 'Septembre', 'Octobre', 'Novembre', 'D�cembre');
				
					echo $myDate->toString("dd").' '.$mois[(int)$myDate->toString('MM')].' '.$myDate->toString("YYYY");
					} catch(Zend_Exception $e) { } 
					?>
					</span>
				</div>
			</div>
			<div class="bill_idents_opt1">
				<div class="bill_idents_opt22">
					<span class="bill_line"><?php echo 'Client'; ?></span>
				</div>
				<div class="bill_idents_opt32">
				<span class="bill_line"><?php echo $facture['USER_EMAIL']; ?></span>
				</div>
			</div> 
		</div>
		<div style="float: left;width:800px ">
			<?php if (!empty($facture['USER_NUMCOMPTE'])) {?>
			<span class="bill_text">Compte : <?php echo $facture['USER_NUMCOMPTE']; ?></span><br>
			<?php } ?>
			<span class="bill_text">Tel : <?php echo $this->tel_contact; ?></span><br>
			<span class="bill_text">Email : <?php  echo $this->serviceClient_Mail;?></span>
		</div>
	</div>
	<div class="bill_address">
		<div class="bill_address_opt">
			<div class="bill_address_opt1">
				<span class="bill_line">Adresse de Facturation</span>
			</div>
			<div class="bill_address_opt2">
				<span class="bill_text2"><?php echo $facture['FACT_RAISONSOCIAL']; ?></span><br>
				<span class="bill_text2"><?php echo $facture['FACT_ADRESSE']; ?></span><br>
				<span class="bill_text2"><?php echo $facture['FACT_CP'].' '.$facture['FACT_VILLE']; ?></span><br>
				<span class="bill_text2"><?php echo $facture['FACT_PAYS']; ?></span>
			</div>
		</div>
		<div class="bill_address_opt">	
			<div class="bill_address_opt1">
				<span class="bill_line">Adresse de Livraison</span>
			</div>
			<div class="bill_address_opt2">
				<span class="bill_text2"><?php echo $facture['LIV_RAISONSOCIAL']; ?></span><br>
				<span class="bill_text2"><?php echo $facture['LIV_ADRESSE']; ?></span><br>
				<span class="bill_text2"><?php echo $facture['LIV_CP'].' '.$facture['LIV_VILLE']; ?></span><br>
				<span class="bill_text2"><?php echo $facture['LIV_PAYS']; ?></span>
			</div>
		</div>
	</div>
	<div class="bill_caddy">
		<table style="border:1px solid black;"  border="0" cellpadding="0" cellspacing="0" width="100%">
			<tr align="center" style="background-color: #e7e7e7;">
				<th class="bill_line" >R�f�rence</th>
				<th class="bill_line">D�signation</th>
				<th class="bill_line" style="width: 60px">Dispo.</th>
				<th class="bill_line">Quantit�</th>
				<th class="bill_line"  style="text-align: center">P.U. HT</th>
				<th class="bill_line"  style="display: none;">Prix Remis�</th>
				<th class="bill_line" >Montant HT</th>
			</tr>
			<?php 
			$index = 1;
			$i = 0;
			$caddy = $facture['CADDY'];
			foreach($caddy as $row) {
				?>
			<tr >
				<td colspan="6" height="1px" style="background-color: #868686"></td>
			</tr>
			<tr align="center"  height="25px" >
				<td class="textTd1" width="110px" style="text-align:center;white-space: nowrap;">
					<?php echo $this->escape($row['REFERENCE']);?>
				</td>
				<td  width="450px" class="bill_linkd" style="text-align: left;">
					<a target="_blank"  href="<?php echo $this->baseUrl; ?>/<?php echo Utils_Tool::getFormattedUrlProduct($row['NAVNOM_URLPARENTS'], $row['NAVPRODUCTNOM'], $row['PRODUCTID']); ?>"><?php echo $row['DESIGNATION'];?></a>
					<?php if (!empty($row['SELECTEDOPTION'])) { 
						echo '<br/>'.$row['SELECTEDOPTION'].'<br/>';
					} ?>
				</td> 
				<td class="textTd1" > 
					<?php if ((int)$row['STOCK'] == 1) { ?>
					<img alt="Disponible" title="Disponible" src="<?php echo $this->baseUrl; ?>/business/image/admin/stock11.png" />
					<?php } else if ((int)$row['STOCK'] == 2) { ?>
					<img alt="Disponible sous 8 jours" title="Disponible sous 8 jours" src="<?php echo $this->baseUrl; ?>/business/image/admin/stock22.png" />
					<?php } else if ((int)$row['STOCK'] == 3) { ?>
					<img alt="Nous contacter" title="Nous contacter" src="<?php echo $this->baseUrl; ?>/business/image/admin/stock33.png" />
					<?php }?> 	
				</td>
				<td class="textTd1" >
					<?php echo $row['QUANTITY']; ?>	
				</td>
				<td class="textTd1" width="150px">
						<?php $this->currentData = $row;
						echo $this->render("/produits/ajaxshowpromoprice.phtml"); ?>
				</td>
				<td width="120px"  style="display: none;">
				<?php if ($row['isPROMO'] == 1 && $row['REMISEPRIX'] > 0) { ?>
					<span class="textTd1" >
						<?php
							if ((int)$row['REMISEPRIXTAUXP'] > 0) {
									echo number_format($row['REMISEPRIX'], 2, ',', ' ').' &#8364; <br>('.$this->escape($row['REMISEPRIXTAUXP']).' %)';
								} else {
									echo number_format($row['REMISEPRIX'], 2, ',', ' ').' &#8364;';
								}
							?>
					</span>
					<?php } ?>
				</td>
				<td width="120px">
					<span class="textTd1" style="float: right;" >
						<?php if ($row['isDEVIS'] == 1) { 
							echo number_format($row['PRIXTOTAL'], 2, ',', ' ').' &#8364;';
						} ?>
					</span>
				</td>
			</tr>
			<?php $i++; } ?>
<?php
	$caddyfidelite = $facture['CADDYFIDELITE'];
	foreach($caddyfidelite as $row) {
		?>
    <tr>
      <td colspan="6">
        <div style="font-weight: bold;margin:10px;">
          <?php echo 'Carte de fid�lit� : '.$row['NOM'].' ('.$row['NBPOINT'].' points)'; ?>
        </div>
      </td>
    </tr>
  <?php } ?>			
		</table>
	</div>
	<div class="bill_facture"> 
		<div class="bill_buy">   
				<?php switch ($facture['USER_MODEPAIEMENT_TYPE']) {
						case 1 : ?>
						<div class="bill_user_paiement_box">
							<div class="bill_text2" style="text-align:center">Mode de paiement : Par ch�que</div>
							<div style="margin-left:10px">- Veuillez libeller votre ch�que � l�ordre de <?php echo $this->siteName; ?></div>
							<div style="margin-left:10px">- Inscrivez le num�ro de votre commande au dos de votre ch�que</div>
							<div style="margin-left:10px">- Puis envoyez votre r�glement � l�adresse suivante :</div>
							<br/>
							<div class="bill_text" style="text-align:center"><?php echo $this->siteName; ?></div>
							<br/>
							<div class="bill_text" style="text-align:center"><?php echo $this->site_addresse3_title; ?></div>
							<div class="bill_text" style="text-align:center"><?php echo $this->site_addresse3_address; ?></div>
							<div class="bill_text" style="text-align:center"><?php echo $this->site_addresse3_cp; ?></div>
							<br/>
							<div style="font-size:10px;text-align:center">A noter : Les produits sont exp�di�s � r�ception du ch�que</div> 
						</div> 
						<?php  break;
							case 2 : ?>  
						<div class="bill_user_paiement_box">
							<div class="bill_text2" style="text-align:center">Mode de paiement : Par virement</div>
							<div >- La commande sera exp�di�e d�s le virement pr�sent sur notre compte bancaire.</div> 
							<div class="bill_text">- Inscrivez votre num�ro de commande sur le formulaire de virement</div> 
							<div >- Vous disposez d�un <span style="font-weight: bold;">d�lai de 15 jours</span> pour effectuer le virement sur notre compte ci-dessous indiqu�, au d�l� de ce d�lai votre commande sera automatiquement annul�e.</div> 
							<br/>
							<div class="bill_text">RIB : <?php echo $this->site_rib_numbers; ?></div> 
							<div class="bill_text">No IBAN : <?php echo $this->site_rib_iban; ?></div> 
							<div class="bill_text">Code BIC : <?php echo $this->site_rib_bic; ?></div> 
							<div class="bill_text">Nom du compte : <?php echo $this->siteName; ?></div> 
							<div class="bill_text">Nom et domiciliation de la banque : <?php echo $this->site_rib_bankname; ?></div>  
						</div> 
				<?php 	break;
						default : ?>
							<span class="bill_text2">
							<?php if (empty($facture['USER_MODEPAIEMENT_LABEL'])) { ?> Mode de reglement :
							<?php 
								switch ($facture['USER_MODEPAIEMENT']) {
									case 1 : echo " Paiement s�curis� en ligne"; break;
									case 2 : echo " Contre remboursement";break;
									case 3 : echo " Paiement diff�r� - 30 jours";break;
									case 4 : echo " Paiement diff�r� - 45 jours";break;
									case 5 : echo " Paiement diff�r� - 60 jours";break;
									case 6 : echo " A r�ception de la facture";break;
								}
							} else { 
								echo $facture['USER_MODEPAIEMENT_LABEL'];
							} ?>
							</span>	 
						<?php 
						break;  
				} ?>  
		</div> 
		<div class="bill_detail">
			<table border="0" cellpadding="0" cellspacing="0" width="100%">
				<tr align="right">
					<td class="bill_line2">Total HT</td>
					<td  class="bill_line2"><?php echo number_format($facture['PRIXTOTALHTHR'], 2, ',', ' '); ?> &#8364;</td>
				</tr>	
				<tr align="right">
					<td  class="bill_line2" >Remise <?php if (isset($facture['CODEREDUCTION']) && !empty($facture['CODEREDUCTION']) ) { echo " ( ".$facture['CODEREDUCTION']." ) "; } ?></td>
					<td  class="bill_line2" ><?php echo number_format($facture['PRIXREMISEEUR'], 2, ',', ' '); ?> &#8364;</td>
				</tr>	
				<tr align="right"> 
					<td  class="bill_line2">
						<?php if (strcasecmp($facture['LIV_PAYS'], "FRANCE") != 0) { ?>
						Prix d�part 	
						<?php } else {
							if (isset($facture['LIV_NOM']) && !empty($facture['LIV_NOM']) ) { echo 'Livraison en '.$facture['LIV_NOM']; } else { echo 'Frais de port'; } 
						} ?>
					</td>
					
					<td class="bill_line2"><?php echo number_format($facture['PRIXFRAISPORT'], 2, ',', ' '); ?> &#8364;</td>
				</tr>
				<tr >
					<td colspan="2" height="1px" style="background-color: #868686"></td>
				</tr>
				<tr align="right">
					<td class="bill_text2">Net HT</td>
					<td class="bill_text2"><?php echo number_format($facture['PRIXTOTALHTFP'], 2, ',', ' '); ?> &#8364;</td>
				</tr>
				<tr align="right">
					<td  class="bill_line2">Total TVA</td>
					<td  class="bill_line2"><?php echo number_format($facture['PRIXTOTALTVA'], 2, ',', ' '); ?> &#8364;</td>
				</tr>
				<tr >
					<td colspan="2" height="1px" style="background-color: #868686"></td>
				</tr>
				<tr align="right">
					<td class="bill_text2">NET A PAYER TTC</td>
					<td class="bill_text2"><?php echo number_format($facture['PRIXTOTALTTC'], 2, ',', ' '); ?> &#8364;</td>
				</tr>
			</table>
		</div>
	</div>
	
	
	<div class="bill_footer">
			<span class="link18">
				<input type="checkbox" checked="checked" disabled="disabled"/>
				J'ai pris connaissance des Conditions G�n�rales de Vente et les accepte sans r�serves.
			</span>
			<br /><br />
			<span class="bill_text3">
			P�nalit�s de retard (taux annuel) : 9,00% 
			</span><br>
			<span class="bill_text3">
			<b>RESERVE DE PROPRIETE</b> : Nous nous r�servons la propri�t� des marchandises jusqu'au paiement du prix par l'acheteur. Notre droit de revendication porte aussi bien sur les marchandises que sur leur prix si elles ont d�j� �t� revendues (Loi du 12 mai 1980). 
			</span><br><br>
	</div>
	
		<div class="bill_footer2" >
				<span class="bill_text3">
			<?php echo $this->site_addresse; ?>
			</span><br>
			<span class="bill_text3">
			<?php echo $this->site_actualshort; ?>
			</span>
		</div >
</div>