@extends('layouts.pdf')

<title>Top Notch Quote {{$quote->id}}</title>

<style>
    * {
        font-size: 0.9rem;
    }
</style>

<div class="container-fluid pt-4 font-serif" style="">
    <div class="fw-bold">
        TOP NOTCH EMBROIDERY & DIGITIZING LTD.
    </div>
    <div>
        108-618 EAST KENT AVE. SOUTH <br>
        VANCOUVER BC <br>
        (604) 871-9991 <br>
        info@sewtopnotch.com <br>
        GST# 846025062RT0001 <br>
    </div>

    <div class="fs-3 fw-bold text-primary mt-2">
        QUOTE
    </div>

    <div class="d-flex flex-row">

        <div class="pe-4">
            <div class="fw-bold">
                DATE
            </div>
            <div>
                {{ $quote->date->format('Y-m-d') }}
            </div>
        </div>

        <div class="pe-4">
            <div class="fw-bold">
                CUSTOMER
            </div>
            <div>
                {{ $quote->customer->company_name ?? '' }}
            </div>
        </div>

        <div class="">
            <div class="fw-bold">
                NOTES
            </div>
            <div>
                {{ $quote->notes ?? '' }}
            </div>
        </div>
    </div>

    <hr>

    <table class="table table-sm table-striped">
        <tr>
            <th>Service</th>
            <th>Logo</th>
            <th>Placement</th>
            <th class="text-end">Quantity</th>
            <th class="text-end">Price</th>
        </tr>

        @foreach($quote->embroideryEntries as $entry)
            <tr>
                <td>Embroidery</td>
                <td>{{$entry->logo}}</td>
                <td>{{$entry->placement}}</td>
                <td class="text-end">{{$entry->quantity}}</td>
                <td class="text-end">${{number_format($entry->total_price, 2)}}</td>
            </tr>
        @endforeach

        @foreach($quote->screenPrintEntries as $entry)
            <tr>
                <td>Screen Printing</td>
                <td>{{$entry->logo}}</td>
                <td></td>
                <td class="text-end">{{$entry->quantity}}</td>
                <td class="text-end">${{number_format($entry->total_price, 2)}}</td>
            </tr>
        @endforeach

        @foreach($quote->heatTransferEntries as $entry)
            <tr>
                <td>Heat Transfer</td>
                <td>{{$entry->logo}}</td>
                <td></td>
                <td class="text-end">{{$entry->quantity}}</td>
                <td class="text-end">${{number_format($entry->price, 2)}}</td>
            </tr>
        @endforeach
    </table>

    <div class="d-flex flex-row-reverse mt-4">

        <div class="pe-4 text-end">
            <div class="fw-bold">
                Total price
            </div>
            <div>
                ${{ number_format($quote->total, 2) }}
            </div>
        </div>
    </div>

</div>

