<!DOCTYPE html>
<html lang="en">
   <head>
      <meta charset="utf-8">
      <title>quote _{{$quote['Ref']}}</title>
      <link rel="stylesheet" href="{{public_path('css/pdf_style.css')}}" media="all" />
   </head>

   <body>
      <header style="text-align: center;">
         <img src="{{public_path('/images/'.$societe_logo)}}" width="100%">
      </header>
      
      <table style="width: 100%;">
         <tr>
            
            @if($societe->name=='FUNCHAL TRANS SARL' || $societe->name=='TRANSLOGIA SARL')
               <td>
                  @if($societe->name=='FUNCHAL TRANS SARL')
                  <span style="font-size: 15px; font-weight: 700;">FUNCHAL TRANS SARL</span><br/>
                  Résidence habiba 2 etg n°56 Tanger.<br/>
                  R.C:85291 -T.P:57102685<br/>
                  IF : 24934253 - CNSS : 5668308
                  @endif
               </td>
               <td style="width: 60%;" rowspan="2">
                  <div style="border: {{ $societe->name=='FUNCHAL TRANS SARL' ? '1':'3' }}px solid black; font-size: 16px; font-weight: 700; padding: 20px">
                     Client : {{$quote['client_name']}}<br/>
                     ICE : {{$quote['client_tax']}} @if($societe->name=='FUNCHAL TRANS SARL')<br/>
                     ADRESSE : {{$quote['client_adr']}}@endif
                  </div>
               </td>
            @endif

         </tr>
         <tr>
            <td>
               <span style="font-size: 16px; font-weight: 700; padding: 20px">
                  BL : {{ $quote['Ref'] }}
               </span>
            </td>
         </tr>
      </table>

      <br/>

      <div style="min-height: {{ $societe->name=='TRANSLOGIA SARL' ? '400':'500' }}px;">
         <table style="width: 100%; border-collapse: collapse;">
            <tr style="border: 1px solid black;">
               <th style="width: 12%; text-align: left; border-right: 1px solid black;">Date</th>
               <th style="width: 55%; text-align: left; border-right: 1px solid black;">Désignation</th>
               <th style="width: 18%; text-align: left; border-right: 1px solid black;">Non Taxable</th>
               <th style="width: 15%; text-align: left;">Taxable</th>
            </tr>
            @foreach ($details as $detail)
               <tr style="border: 1px solid black;">
                  <td style="border-right: 1px solid black;">{{ $detail['date'] }}</td>
                  <td style="border-right: 1px solid black;">{{ $detail['name'] }}</td>
                  <td style="border-right: 1px solid black;">{{ $detail['taxe'] }}</td>
                  <td>{{ $detail['total'] }}</td>
               </tr>
            @endforeach
            <tr style="border: none;">
               <td></td>
               <td></td>
               <td style="border: 1px solid black;"><span>Total en euro</span></td>
               <td style="border: 1px solid black;"><span>{{ $quote['DisplayGrandTotal'] }}</span></td>
            </tr>
            <tr style="border: none;">
               <td></td>
               <td></td>
               <td style="border: 1px solid black;"><span>TVA 0%</span></td>
               <td style="border: 1px solid black;"><span></span></td>
            </tr>
            <tr style="border: none;">
               <td></td>
               <td></td>
               <td style="border: 1px solid black;"><span>Net a Payer En DH</span></td>
               <td style="border: 1px solid black;"><span>{{ $quote['GrandTotal'] }}</span></td>
            </tr>
         </table>
      </div>
      
      <br/>
      <br/>

      <table style="width: 100%; text-align: center;">
         <tr>
            <td style="60%;"><span style="font-size: 16px; font-weight:600;">Arrêtée la présente Facture à la somme de :</span></td>
            <td style="40%;"><span style="color: white;">---------------------------</span></td>
         </tr>
         <tr>
            <td><span style="font-size: 18px; font-weight:800;">{{ $quote['GrandTotalWord'] }} DH.</span></td>
            <td></td>
         </tr>
      </table>

      <br/>
      <br/>

      <div style="text-align: center;">
         @if($societe->name=='FUNCHAL TRANS SARL')
            FUNCHAL TRANS SARL<br/>
            E-MAIL :funchaltrans@gmail.com -Tél: 0689821150<br/>
            RIB: 007 640 0013685000000074 39 (Attijariwafabank) CODE SWIFT :BCMAMAMC <br/>
            ICE: 001977783000008
         @endif
         @if($societe->name=='FLORENCIA TRANS SARL')
            FLORENCIA TRANS SARL<br/> 
            E-MAIL : florenciatrans2021@gmail.com-Tél: 0689821150<br/>
            RIB: 007 640 0013689000000145 97 (Attijariwafabank) CODE SWIFT : BCMAMAMC<br/> 
            ICE : 002745451000029
         @endif
         @if($societe->name=='TRANSLOGIA SARL')
            TRANSLOGIA SARL<br/>
            E-MAIL : translogia2022@gmail.com – TEL : 0689821150<br/>
            RIB: 007 640 0013688000000218 77 (Attijariwafabank) CODE SWIFT : BCMAMAMC<br/>
            ICE : 003115954000058
         @endif
      </div>
   </body>
</html>
