<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>devis</title>
</head>
<style>
    .page-break {
        page-break-after: always;
    }

    th {
        text-align: left;
    }

    td {
        text-align: center;
    }
</style>

<body>
    <img src="img/amea2.png" style="height:auto; width:150px; float: left !important">

    <div style="text-align: center; ">
        <h3 style="margin-right: 120px !important">Fiche Forfaitaire</h3>

    </div>
    <div style="margin-top: 60px;">

        <div>
            <table style="border: 1px solid;width: 48%;border-collapse: collapse;font-size:81%;">
                <tr>
                    <th style="border: 1px solid; width: 43%;"> ASSURANCE</th>
                    <th style="border: 1px solid;">{{ $dossier->company->company ?? null }}</th>
                </tr>
                {{-- <tr>
                    <th style="border: 1px solid;">REPARATEUR</th>
                    <td style="border: 1px solid;"></td>
                </tr> --}}
                <tr>
                    <th style="border: 1px solid;">Intermidiaire</th>
                    <td style="border: 1px solid;"> {{ $dossier->intermidiaire->company ?? null }}</td>
                </tr>
                <tr>
                    <th style="border: 1px solid;">NUMERO DE SINISTRE</th>
                    <td style="border: 1px solid;">{{ $dossier->numero_sinistre ?? null }}</td>
                </tr>
            </table>
        </div>
        <div>
            <table
                style="border:1px solid; width: 48%; border-collapse:collapse;font-size:81%; float: right; margin-top: -12.6% !important;">
                <tr>
                    <th style="border: 1px solid; width: 43%;">DATE Réception Mission</th>
                    <td style="border: 1px solid;">{{ $dossier->date_reception ?? null }}</td>
                </tr>
                <tr>
                    <th style="border: 1px solid;">Date D'expertise</th>
                    <td style="border: 1px solid;">{{ $dossier->lastmeet->date ?? null }}</td>
                </tr>
                <tr>
                    <th style="border: 1px solid;">Date du Sinistre</th>
                    <td style="border: 1px solid;">{{ $dossier->date_sinistre ?? null }}</td>
                </tr>
                <tr>
                    <th style="border: 1px solid;">Date devis Définitif</th>
                    <td style="border: 1px solid;">{{ $dossier->onedevis->created_at ?? null }}</td>
                </tr>
            </table>
        </div>
    </div>
    <div style="margin-top: 10px;">
        <div>
            <span style="float: left !imporant;"> EXPERTISER</span>
            <span style="float: right !imporant; margin-left:500px;"> ADVERSAIRE </span>
        </div>
        <div style="margin-top: 20px;">
            <table style="border: 1px solid;width: 48%;border-collapse: collapse; font-size:81%;">
                <tr>
                    <th style="border: 1px solid; width: 43%;">NOM</th>
                    <td style="border: 1px solid;">{{ $dossier->insured->name }}</td>
                </tr>
                <tr>
                    <th style="border: 1px solid;">NUMERO Police</th>
                    <td style="border: 1px solid;">{{ $dossier->numero_police }}</td>
                </tr>
                <tr>
                    <th style="border: 1px solid;">IMMATRICULATION</th>
                    <td style="border: 1px solid;">{{ $dossier->new_matricule ?? $dossier->matricule }}</td>
                </tr>
            </table>
        </div>
        <div>
            <table
                style="border: 1px solid;width: 48%;border-collapse: collapse;font-size:81%;float: right;margin-top: -8.2%;">
                <tr>
                    <th style="border: 1px solid; width: 43%;">NOM</th>
                    <td style="border: 1px solid;">{{ $dossier->opponent->name ?? null }}</td>

                </tr>
                <tr>
                    <th style="border: 1px solid;">COMPAGNIE</th>
                    <td style="border: 1px solid;">{{ $dossier->opponent->company->company ?? null }}</td>

                </tr>
                <tr>
                    <th style="border: 1px solid;">IMMATRICULATION</th>
                    <td style="border: 1px solid;">{{ $dossier->opponent->matricule ?? null }}</td>

                </tr>
                <tr>
                    <th style="border: 1px solid;">NUMERO POLICE</th>
                    <td style="border: 1px solid;">{{ $dossier->opponent->numero_attestation ?? null }}</td>
                </tr>
            </table>
        </div>
    </div>
    <div style="margin-top: 20px;">
        <div>
            <span style="float: left !imporant;"> IDENTIFICATION DU VEHICULE</span>
        </div>
        <div style="margin-top: 20px;">
            <table style="border: 1px solid;width: 48%;border-collapse: collapse; font-size:81%;">
                <tr>
                    <th style="border: 1px solid; width: 43%;">MARQUE</th>
                    <td style="border: 1px solid;">{{ $dossier->vehiculemodel->brand->brand ?? null }}</td>
                </tr>
                <tr>
                    <th style="border: 1px solid;">MODEL</th>
                    <td style="border: 1px solid;">{{ $dossier->vehiculemodel->name ?? null }}</td>
                </tr>
                <tr>
                    <th style="border: 1px solid;">GENRE</th>
                    <td style="border: 1px solid;">{{ $dossier->typevehicule->type ?? null }}</td>
                </tr>

            </table>
        </div>
        <div>
            <table
                style="border: 1px solid;width: 48%;border-collapse: collapse;font-size:81%;float: right;margin-top: -8%;">

                <tr>
                    <th style="border: 1px solid;">DMC </th>
                    <td style="border: 1px solid;">{{ $dossier->date_circulation ?? null }}</td>

                </tr>
                <tr>
                    <th style="border: 1px solid;">PUISSANCE</th>
                    <td style="border: 1px solid;">{{ $dossier->puissance_fiscale ?? null }}</td>

                </tr>
                <tr>
                    <th style="border: 1px solid;">ENERGIE</th>
                    <td style="border: 1px solid;">{{ $dossier->carburant->name ?? null }}</td>
                </tr>
                <tr>
                    <th style="border: 1px solid;">KILOMETRAGE </th>
                    <td style="border: 1px solid;">{{ $dossier->kilometrage ?? null }}</td>
                </tr>
            </table>
        </div>
    </div>
    {{-- <p style="margin-top:10px; ">Etat véhicule <input type="radio" name="" id="">
        <input type="radio" name="" id="">
        <input type="radio" name="" id="">
    </p> --}}
    <hr style="margin-top:40px; ">
    <span style="border:2px solid #000;">CIRCONSTANCE DE L'EXPERTISE/<span></span></span>
    <div style="margin-top: 40px;">
        <table style="width: 48%;font-size:81%;float: right;margin-top: -3%;">
            <tr style="margin:10px 0 !important;">
                <th style=" width: 43%;">lien de visite</th>
                <td style="border-bottom: 1px solid;">CHEZ L'ASSURE</td>
            </tr>
            <tr style="margin:10px 0 !important;">
                <th style=""></th>
                <td style="border-bottom: 1px solid; text-align: center;">

                </td>
            </tr>
        </table>
    </div>
    @if ($devis->taux)

        <span style="">TVA Récupérable <input type="checkbox"
                @if ($devis->taux) @if ($devis->taux->tva_deductible) checked @endif @endif
            name="" id=""></span>

    @endif

    <hr style="margin-top:15px">

    <div>
        <table style="width: 48%;border-collapse: collapse;font-size:81%;float: right;">
            {{-- <tr>
                <th style="border: 1px solid; width: 50%;">DEVIS INITIAL</th>
                <th style="border: 1px solid; width: 50%;">666</th>
            </tr> --}}
            <tr>
                <td>
                    <table style="border: 1px solid;border-collapse: collapse;font-size:90%; width: 100%;">
                        <tr>
                            <td style="border: 1px solid;" colspan="2">PIECES HT</td>
                        </tr>
                        <tr>
                            <td style="border: 1px solid;" colspan="2">MO</td>
                        </tr>
                        <tr>
                            <td style="border: 1px solid;" colspan="2">MO PEINTURE</td>
                        </tr>
                        <tr>
                            <td style="border: 1px solid;" colspan="2">INGREDIENTS</td>
                        </tr>
                        <tr>
                            <td colspan="2" style="border: 1px solid;font-weight:bold">Total HT</td>
                        </tr>
                    </table>
                </td>
                <td>
                        <table style="border: 1px solid;border-collapse:collapse;font-size:90%;width: 100%;">
                        <tr>
                            <td style="border: 1px solid;" colspan="2">{{ $ttlp ?? 0 }}</td>
                        </tr>
                        <tr>
                            <td style="border: 1px solid;" colspan="2">
                                &nbsp;{{ $forfait ?? 0 }}</td>
                        </tr>
                        <tr>
                            <td style="border: 1px solid;" colspan="2">
                                &nbsp;{{ $peinture ?? 0 }}</td>
                        </tr>
                        <tr>
                            <td style="border: 1px solid;" colspan="2">
                                &nbsp;{{ $ing ?? 0 }}
                            </td>
                        </tr>
                        <tr>
                            <td style="border: 1px solid;" colspan="2">0</td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td>
                    <table style="border: 1px solid;border-collapse:collapse;font-size:90%;width: 100%;">
                        <tr>
                            <td colspan="2" style="border: 1px solid;" colspan="2">TOTAL TTC</td>
                        </tr>
                        <tr>
                            <td colspan="2" style="border: 1px solid;">FRANCHISE</td>
                        </tr>
                    </table>
                </td>
                <td>
                    <table style="border: 1px solid black;border-collapse:collapse;font-size:90%;width: 100%;">
                        <tr>
                            <td colspan="2" style="border: 1px solid;">{{ $ttl ?? 0 }} {{ $dossier->currency->symbole ?? null }}</td>
                        </tr>
                        <tr>
                            <td colspan="2" style="border: 1px solid;">{{ $fr ?? 0 }}
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    <div style="border: #000 1px solid; margin-top: 190px !important; text-align: center;">

    </div>
    @if ($chock)
        <img style="width: 230px;height:160px;margin-top:-180px"
            src="{{ Storage::disk('s3')->temporaryUrl($chock->path, now()->addMinutes(30)) }}" alt="">
    @endif
    <div style="margin-top:40px;">
        <span style="">Accord</span>
        <span style="margin-left: 200px;">L'ASSURE</span>
        <span style="margin-left: 300px;">CIN</span>
    </div>
    <div>

        @if (Auth::user()->id == 4)
            <img style="width: 120px;height:80;float: left;" src="img/sign.png" alt="">
        @else
            @if ($sign > 0)
                <img style="width: 150px;height:80;float: left;" id="8.png" src="img/Amea signature/8.png" alt="">
            @endif
        @endif
    </div>

    <hr>

    <div class=" " style="text-align: center; margin-top:150px">
        <p style="margin: 0 auto;">Parc Plaza Bd.Yaakoub Al Mansour lmm.G2 28800 -Mohammedia <br>
            Tél : 052330564-Fax : 0523305672 -E-mail :amea.maroc@gmail.com <br>
            RC:12583 -TP: 39570820-IF:14392431 -CNSS:4472213-ICE:001376800000001 </p>
    </div>
</body>

</html>
