<html>
<head>
<style>
body{font-family:sans-serif,arial;font-size:10pt}
table{border-collapse:collapse;/*page-break-inside: avoid;*/}
div.table{page-break-inside: avoid;}
th,td{border:solid gray 1px;padding:5pt;vertical-align:top}
.nopagebreakinside{page-break-inside: avoid;}
div.page_break + div.page_break{
  page-break-before: always;
}
.cond8pt{font-size:9pt;}
.table-noborder{border:0}
.table-noborder>td{border:0;text-align:left;}
.table-border td{border:solid #666 1px}
/*.table-noborder td{border:solid #999 1px}*/
table{border-color:#666}
table td{border-color:#666}
table.2col50 td,table.2col50 th{width:50%}
table.3col33 td,table.3col33 th{width:33.33333%}
footer { position: fixed; bottom: -60px; left: 0px; right: 0px; font-size:9pt;text-align:center; height: 50px; }

</style>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
	<td style="border:0"><p style="margin:0;font-size:28pt;font-weight:bold;color:#999"><?php echo e($societe->enseigne); ?></p>
	</td>
	 <td width="" style="border:0"><p style="margin-top:0;font-size:16pt;text-align:right"><strong> Facture n°<?php echo e($demande->num_facture); ?></strong></p>
    <p style="text-align:right"><strong>Date</strong> : 
    <?php echo e(\Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $demande->date_facture,'UTC')->timezone('America/Martinique')->isoFormat('L')); ?>

    </p>
    </td>
	</tr>
	<tr class="table-noborder"><td>Emetteur</td><td>Adressé à :</td></tr>
  	<tr>
    <td width="" style="border:solid #ddd 1px;margin-right:10pt;background:#dedede">
    <p style="margin:0"><?php echo e($societe->raison_sociale); ?><br/><?php echo e($societe->adresse); ?><br/><?php echo e($societe->code_postal); ?> <?php echo e($societe->commune); ?><br/>
    Siret : <?php echo e($societe->siret); ?></p>
    </td>
    <td width="" style="border:solid #ddd 1px">
    <p style="margin:0"><?php echo e($demande->nomcomplet_client); ?><br/>
    <?php echo nl2br($demande->adressecomplete_client); ?>

    <?php if($demande->siret_client): ?>
    <br/>Siret : <?php echo e($demande->siret_client); ?>

    <?php endif; ?>
    </p>
    </td>
  </tr>
</table>
<h2 style="margin-bottom:0;padding-bottopm:0">Détail des travaux</h2>
<p style="font-size:9pt;margin-top:0"><?php echo nl2br($demande->intervention->descriptif); ?></p>
<table width="100%" style="margin-top:20pt;" border="1">
	<thead style="background:#ededed">
	<tr>
	<th>Désignation</th>
	<th style="text-align:right">puht</th>
	<th style="text-align:right">txTVA</th>
	<th style="text-align:right">TVA</th>
	<th style="text-align:right">montant TTC</th>
	
	</tr>
	</thead>
<tbody>
  <?php $__currentLoopData = $ligne_demandes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ligne_demande): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
	<tr>
		<td class="text-left"><?php echo e($ligne_demande['libelle']); ?></td>
		<td style="text-align:right"><?php echo e(number_format($ligne_demande['montant_ht'],2,',',' ')); ?></td>
		<td style="text-align:right"><?php echo e(number_format($ligne_demande['taux_tva'],2,',',' ')); ?>%</td>
		<td style="text-align:right"><?php echo e(number_format($ligne_demande['montant_tva'],2,',',' ')); ?></td>
		<td style="text-align:right"><?php echo e(number_format($ligne_demande['montant_ttc'],2,',',' ')); ?></td>
	</tr>
	<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
<table width="100%" cellspacing="0" cellpadding="0" cellspacing="0" style="padding:0;margin:0;cell-padding:0;cell-spacing:0" >
	<tr>
		<td class="table-noborder"><h3>Conditions de règlement</h3><p><?php echo e($demande->pcent_acompte); ?> % à la commande<br/>
		Solde à la réception des travaux</p>
		<p>
		Bon pour accord le <?php echo e(\Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $demande->date_facture,'UTC')->timezone('America/Martinique')->isoFormat('LL')); ?>

		<?php if(false && $image): ?>
		<img src="<?php echo e(storage_path('/app/documents/'.$image->nom_fichier)); ?>" />
		<?php endif; ?>
		</p>
		
		</td>
		<td class="table-noborder" style="padding:0;margin:0;">
        <h3 style="text-align:right;margin-bottom:6pt">Totaux</h3>
        <table width="100%" class="2col50">
        <tr>
        <td>Total HT</td>
        <td style="text-align:right;"><?php echo e(number_format($totalDemandeHT,2,","," ")); ?></td>
        </tr>
        </table>
        <div class="nopagebreakinside">
            <table width="100%" class="2col50">
            <?php $__currentLoopData = $totauxTVA; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $taux=>$montant_tva): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <tr>
            <td>TVA taux <?php echo e(number_format($taux,2,","," ")); ?>%</td>
            <td style="text-align:right;"><?php echo e(number_format($montant_tva,2,","," ")); ?></td>
            </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </table>
        </div>
        <table width="100%" class="2col50">
        <tr>
        <td><strong>Total TTC</strong></td>
        <td style="text-align:right;"><?php echo e(number_format($totalDemandeTTC,2,","," ")); ?></td>
        </tr>
        </table>
        <div class="nopagebreakinside">
            <h3 style="text-align:right;margin-bottom:6pt">Règlements</h3>
            <table width="100%" class="2col50" style="font-size:8pt">
            <thead>
            	<tr style="background:#ededed">
            		<th style="text-align:left">Date et mode paiement</th>
            		<th style="text-align:right">Montant réglé</th>
            	</tr>
        	</thead>
        	<tbody>
            <?php $__currentLoopData = $demande->paiements; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $paiement): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <tr>
            <td>
            	<?php echo e(\Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $paiement->date_paiement)->isoFormat('L')); ?>

    		 par <?php echo e($paiement->modePaiement->libelle); ?></td>
            <td style="text-align:right;"><?php echo e(number_format($paiement->montant,2,","," ")); ?></td>
            </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </tbody>
            </table>
        </div>
        </td>
    </tr>

</table>
<footer><?php echo e($societe->texte_reglementaire); ?></footer>
</body>
</html>
<?php /**PATH /home2/younguxc/hellodjo.younggeeks.co.in/resources/views/demandes/showFacturePDF.blade.php ENDPATH**/ ?>