Untitled

 avatar
unknown
plain_text
9 months ago
7.2 kB
7
Indexable
<!doctype html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Otpremnica kupcu</title>
    <style>
        @page {
            margin: 100px 60px;
        }
        header {
            position: fixed;
            top: -60px;
            left: 0px;
            right: 0px;
            height: 50px;
            text-align: center;
        }
        footer {
            position: fixed; 
            bottom: -90px; 
            left: 0px; 
            right: 0px;
            height: 50px;
            border-top: solid 1px black;
            padding-top: 10px;
            color: black;
            text-align: center;            
            font-size: 0.5rem;
        }
        body {
            font-family: 'DejaVu Sans';
        }
        h4 {
            margin: 0;
        }
        .center {
            text-align: center;
        }
        .info {
            font-size: 0.7rem;
        }
        .bottom {
            width: 100%;
            position: fixed;
            bottom: 0;
            padding-top: 1rem;
            padding-bottom: 1rem;
            background-color: rgb(241 245 249);
        }
        .w-full {
            width: 100%;
        }
        .w-half {
            width: 50%;
        }
        .w-tri {
            width: 32%;
        }
        .margin-top {
            margin-top: 2.25rem;
        }
        .margin-first {
            margin-top: 4.25rem;
        }
        table {
            width: 100%;
            border-spacing: 0;
        }
        table.products {
            font-size: 0.7rem;
            text-align: left;
        }
        table.products th {
            background-color: gray;
            color: #ffffff;
            padding: 0.5rem;
            font-weight: bold;
        }
        table tr.items {
            background-color: rgb(241 245 249);
        }
        table tr.items td {
            padding: 0.5rem;
        }
        table tr.total td {
            padding: 0.5rem;
        }
        table tr.total td.totalAmount {
            background-color: #dce1e6;
        }
        table tr.total td.totalAmountText {
            text-align: right;
        }
        .notes {
            text-align: left;
            margin-top: 1rem;
            font-size: 0.7rem;
        }
        .gray-overlay {
            background-color: gray;
            color: white;
            padding-left: 0.5rem;
            padding-right: 0.5rem;
            border-radius: 0.2rem;
        }
    </style>
</head>
<body>

    <!-- Define header and footer blocks before your content -->
    <header>
        <table class="w-full" style="border-bottom: solid 1px black">
            <tr>
                <td class="col">
                    <img src="{{ asset('images/omnius-art-logo.png') }}" alt="Omnius Art" width="200" />
                </td>
                <td class="col-6">
                    <h2>Otpremnica kupcu br: <span class="gray-overlay">{{ $order->id }}</span></h2>
                </td>
            </tr>
        </table>
    </header>

    <footer>
        <div class="center footer-content">
            <div><b>Omnius Art</b>, obrt za proizvodnju i usluge, vl. Martina Vinkešević | Adresa vlasnika: <b>Vladimira Nazora 83, Šljivoševci</b> | OIB: <b>69219061360</b></div>
            <div>Porezni broj: <b>HR69219061360</b> | Žiro račun IBAN: <b>HR6523400091160738307</b> otvoren u: <b>Privredna Banka Zagreb</b></div>
        </div>
    </footer>

    <div class="margin-first">
        <table class="w-full info">
            <tr>
                <td class="w-tri">
                    <div><h4>Kupac:</h4></div>
                    <div>{{ App\Models\Customer::find($order->customer_id)->name }}</div>
                    <div>{{ $order->delivery_address }}</div>
                    <div>{{ $order->delivery_city }}, {{ $order->delivery_postal }}</div>
                    <div>{{ App\Models\Country::find($order->delivery_country_id)->country_name }}</div>
                </td>
                <td class="w-tri">
                    <div><h4>Datum isporuke:</h4></div>
                    <div>{{ \Carbon\Carbon::parse($order->date_ordered)->format('d.m.Y') }}</div>
                </td>
                <td class="w-tri">
                </td>
            </tr>
        </table>
    </div>

    <div class="margin-top">
        <table class="products">
            <tr>
                <th>Šifra</th>
                <th>Količina</th>
                <th>Naziv</th>
                <th>Cijena</th>
                <th>Iznos</th>
            </tr>

            {{-- Order items loop --}}
            @foreach ($orderItemList as $item)
                <tr class="items">
                    <td>{{ $item->product_id }}-{{ $item->color_id }}</td>
                    <td>
                        @if (App\Models\Product::find($item->product_id)->unit == 'kom')
                            {{ number_format(str_replace(',', '.', $item->amount), 0) }} {{ App\Models\Product::find($item->product_id)->unit }}
                        @else
                            {{ $item->amount }} {{ App\Models\Product::find($item->product_id)->unit }}
                        @endif
                    </td>
                    <td>
                        {{ App\Models\Product::find($item->product_id)->product_name }}<br>
                        <span style="font-size:70%">Boja: {{ App\Models\Color::find($item->color_id)->color_name }}</span>
                    </td>
                    <td>{{ App\Http\Controllers\DoomPDFController::itemTotal($item->price) }} €</td>
                    <td>{{ App\Http\Controllers\DoomPDFController::itemTotal($item->id) }} €</td>
                </tr>
            @endforeach

            {{-- Delivery service --}}
            <tr class="items">
                <td></td>
                <td></td>
                <td><b>Dostava:</b> {{ $deliveryService->name }}</td>
                <td></td>
                <td>{{ $deliveryCost }} €</td>  
            </tr>

            {{-- Total --}}
            <tr class="total">
                <td></td>
                <td></td>
                <td></td>
                <td class="totalAmountText">Sveukupno: </td>
                <td class="totalAmount"><b>{{ $total }} €</b></td>
            </tr>

        </table>
    </div>

    <div class="notes">
        <p><b>Napomena:</b> Oslobođeno PDV-a temeljem članka 90. st. 2 Zakona o PDV-u</p>
    </div>

    <div class="margin-first">
        <table class="w-full info">
            <tr>
                <td class="w-tri center">
                    <div style="border-top: solid 1px black;">Robu izdao</div>
                </td>
                <td class="w-tri center">
                    M.P.
                </td>
                <td class="w-tri center">
                    <div style="border-top: solid 1px black;">Robu zaprimio</div>
                </td>
            </tr>
        </table>
    </div>

</body>
</html>
Editor is loading...
Leave a Comment