<!doctype html>
<html class="no-js" lang="">

<head>
  <meta charset="utf-8">
  <title>Descargar Nota Electronica</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <style>
        *,
        *::before,
        *::after {
            box-sizing: border-box;
        }

        /**
        Use a more readable tab size (opinionated).
        */

        :root {
            -moz-tab-size: 4;
            tab-size: 4;
        }

        /**
        1. Correct the line height in all browsers.
        2. Prevent adjustments of font size after orientation changes in iOS.
        */

        html {
            line-height: 1.15; /* 1 */
            -webkit-text-size-adjust: 100%; /* 2 */
        }

        /*
        Sections
        ========
        */

        /**
        Remove the margin in all browsers.
        */

        body {
            margin: 0;
        }

        /**
        Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)
        */

        body {
            font-family:
                system-ui,
                -apple-system, /* Firefox supports this but not yet `system-ui` */
                'Segoe UI',
                Roboto,
                Helvetica,
                Arial,
                sans-serif,
                'Apple Color Emoji',
                'Segoe UI Emoji';
        }

        /*
        Grouping content
        ================
        */

        /**
        1. Add the correct height in Firefox.
        2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
        */

        hr {
            height: 0; /* 1 */
            color: inherit; /* 2 */
        }

        /*
        Text-level semantics
        ====================
        */

        /**
        Add the correct text decoration in Chrome, Edge, and Safari.
        */

        abbr[title] {
            text-decoration: underline dotted;
        }

        /**
        Add the correct font weight in Edge and Safari.
        */

        b,
        strong {
            font-weight: bolder;
        }

        /**
        1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)
        2. Correct the odd 'em' font sizing in all browsers.
        */

        code,
        kbd,
        samp,
        pre {
            font-family:
                ui-monospace,
                SFMono-Regular,
                Consolas,
                'Liberation Mono',
                Menlo,
                monospace; /* 1 */
            font-size: 1em; /* 2 */
        }

        /**
        Add the correct font size in all browsers.
        */

        small {
            font-size: 80%;
        }

        /**
        Prevent 'sub' and 'sup' elements from affecting the line height in all browsers.
        */

        sub,
        sup {
            font-size: 75%;
            line-height: 0;
            position: relative;
            vertical-align: baseline;
        }

        sub {
            bottom: -0.25em;
        }

        sup {
            top: -0.5em;
        }

        /*
        Tabular data
        ============
        */

        /**
        1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
        2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
        */

        table {
            text-indent: 0; /* 1 */
            border-color: inherit; /* 2 */
        }

        /*
        Forms
        =====
        */

        /**
        1. Change the font styles in all browsers.
        2. Remove the margin in Firefox and Safari.
        */

        button,
        input,
        optgroup,
        select,
        textarea {
            font-family: inherit; /* 1 */
            font-size: 100%; /* 1 */
            line-height: 1.15; /* 1 */
            margin: 0; /* 2 */
        }

        /**
        Remove the inheritance of text transform in Edge and Firefox.
        1. Remove the inheritance of text transform in Firefox.
        */

        button,
        select { /* 1 */
            text-transform: none;
        }

        /**
        Correct the inability to style clickable types in iOS and Safari.
        */

        button,
        [type='button'],
        [type='reset'],
        [type='submit'] {
            -webkit-appearance: button;
        }

        /**
        Remove the inner border and padding in Firefox.
        */

        ::-moz-focus-inner {
            border-style: none;
            padding: 0;
        }

        /**
        Restore the focus styles unset by the previous rule.
        */

        :-moz-focusring {
            outline: 1px dotted ButtonText;
        }

        /**
        Remove the additional ':invalid' styles in Firefox.
        See: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737
        */

        :-moz-ui-invalid {
            box-shadow: none;
        }

        /**
        Remove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.
        */

        legend {
            padding: 0;
        }

        /**
        Add the correct vertical alignment in Chrome and Firefox.
        */

        progress {
            vertical-align: baseline;
        }

        /**
        Correct the cursor style of increment and decrement buttons in Safari.
        */

        ::-webkit-inner-spin-button,
        ::-webkit-outer-spin-button {
            height: auto;
        }

        /**
        1. Correct the odd appearance in Chrome and Safari.
        2. Correct the outline style in Safari.
        */

        [type='search'] {
            -webkit-appearance: textfield; /* 1 */
            outline-offset: -2px; /* 2 */
        }

        /**
        Remove the inner padding in Chrome and Safari on macOS.
        */

        ::-webkit-search-decoration {
            -webkit-appearance: none;
        }

        /**
        1. Correct the inability to style clickable types in iOS and Safari.
        2. Change font properties to 'inherit' in Safari.
        */

        ::-webkit-file-upload-button {
            -webkit-appearance: button; /* 1 */
            font: inherit; /* 2 */
        }

        /*
        Interactive
        ===========
        */

        /*
        Add the correct display in Chrome and Safari.
        */

        summary {
            display: list-item;
        }
            </style>
        <style>
            body {
        font-size: 13px;
        }

        table {
        width: 100%;
        border-collapse: collapse;
        }

        table tr td {
        padding: 0;
        }

        table tr td:last-child {
        text-align: right;
        }

        .bold {
        font-weight: bold;
        }

        .right {
        text-align: right;
        }

        .large {
        font-size: 1.2em;
        }

        .total {
        font-weight: bold;
        color: #fb7578;
        }

        .logo-container {
        margin: 20px 0 30px 0;
        }

        .invoice-info-container {
        font-size: 0.875em;
        }
        .invoice-info-container td {
        padding: 4px 0;
        }

        .client-name {
        font-size: 1.5em;
        vertical-align: top;
        }

        .line-items-container {
        margin: 15px 0;
        font-size: 0.875em;
        }

        .line-items-container th {
        text-align: left;
        color: #999;
        border-bottom: 2px solid #ddd;
        padding: 10px 0 15px 0;
        font-size: 0.75em;
        text-transform: uppercase;
        }

        .line-items-container th:last-child {
        text-align: right;
        }

        .line-items-container td {
        padding: 5px 0;
        }

        /* .line-items-container tbody tr:first-child td {
        padding-top: 10px;
        } */

        .line-items-container.has-bottom-border tbody tr:last-child td {
        padding-bottom: 25px;
        border-bottom: 2px solid #ddd;
        }

        .line-items-container.has-bottom-border {
        margin-bottom: 0;
        }

        .line-items-container th.heading-quantity {
        width: 50px;
        }
        .line-items-container th.heading-price {
        text-align: right;
        width: 100px;
        }
        .line-items-container th.heading-subtotal {
        width: 100px;
        }

        .payment-info {
        width: 38%;
        font-size: 1em;
        line-height: 1.5;
        text-transform: uppercase;
        }

        .footer {
        margin-top: 30px;
        }

        .footer-thanks {
        font-size: 1.125em;
        }

        .footer-thanks img {
        display: inline-block;
        position: relative;
        top: 1px;
        width: 16px;
        margin-right: 4px;
        }

        .footer-info {
        float: right;
        margin-top: 5px;
        font-size: 0.75em;
        color: #ccc;
        }

        .footer-info span {
        padding: 0 5px;
        color: black;
        }

        .footer-info span:last-child {
        padding-right: 0;
        }

        .page-container {
        display: none;
        }
        .page-break {
            page-break-after: always;
        }

        .number-clausulas{
            /* display: -webkit-inline-box;
            display: -webkit-box; */
        }
        .number-clausulas p{
            margin: 0;
            text-align: justify;
            font-size: 0.76rem; /*0.68rem*/;
        }
        .number-clausulas strong{
            float: left;
            font-size: 0.76rem; /*0.68rem*/;
        }
        .number-clausulas ul li{
            font-size: 0.76rem; /*0.68rem*/;
        }
        .place-date{
            text-align: right;
        }
        .place-date p{
            /* font-size: small; */
            font-size: 0.6rem;
        }
  </style>
</head>
<body>

<div class="web-container">

  <!-- See invoice.html! It is injected here... -->
  <div class="page-container">
    Page
    <span class="page"></span>
    of
    <span class="pages"></span>
  </div>

  <div class="logo-container">
    <table>
        <tbody>
            <tr>
                <?php
                    $company = \App\Models\Company::first();
                ?>

                <td style="padding: 0 !important;border-bottom:none;vertical-align:top;">
                    <strong><?php echo e($company->razon_social ?? 'Mi Empresa'); ?></strong>
                    <br>
                    <?php if(!empty($company->razon_social_comercial)): ?>
                        <small><?php echo e($company->razon_social_comercial); ?></small>
                        <br>
                    <?php endif; ?>
                    <?php if(!empty($company->n_document)): ?>
                        <small>RUC: <?php echo e($company->n_document); ?></small>
                        <br>
                    <?php endif; ?>
                    <?php if(!empty($company->address)): ?>
                        <small><?php echo e($company->address); ?></small>
                        <br>
                    <?php endif; ?>
                    <?php if(!empty($company->phone)): ?>
                        <small>Tel: <?php echo e($company->phone); ?></small>
                        <br>
                    <?php endif; ?>
                    <?php if(!empty($company->email)): ?>
                        <small><?php echo e($company->email); ?></small>
                    <?php endif; ?>
                </td>
                <td style="padding: 0 !important;border-bottom:none; text-align:right; vertical-align:top;">
                    GUIA DE REMISIÓN: <strong><?php echo e($guia_remision->n_operacion); ?></strong>
                    <br>
                    <small><?php echo e($guia_remision->created_at->format('Y/m/d')); ?></small>
                </td>
            </tr>
        </tbody>
    </table>
  </div>
  <?php
    $MOTIVO_TRANSLADO = "";
    switch ($guia_remision->motivo_translado) {
        case '01':
            $MOTIVO_TRANSLADO = "Venta";
            break;
        case '02':
            $MOTIVO_TRANSLADO = "Compra";
            break;
        case '04':
            $MOTIVO_TRANSLADO = "Traslado entre establecimientos de la misma empresa";
             break;
        case '08':
            $MOTIVO_TRANSLADO = "Importación";
            break;
        case '09':
            $MOTIVO_TRANSLADO = "Exportación";
             break;
        case '13':
            $MOTIVO_TRANSLADO = "Otros";
            break;
        case '14':
            $MOTIVO_TRANSLADO = "Venta sujeta a confirmación del comprador";
             break;
        case '18':
            $MOTIVO_TRANSLADO = "Traslado emisor itinerante CP";
            break;
        default:
            break;
    }
  ?>
  <div style="clear:both;"></div>
  <table class="invoice-info-container">
    <tr>
        <td>
            MOTIVO DE TRANSLADO: <strong><?php echo e($MOTIVO_TRANSLADO); ?></strong>
            <?php if($guia_remision->motivo_translado == '08' || $guia_remision->motivo_translado == '09'): ?>
                <br>
                DAM: <?php echo e($guia_remision->num_dam); ?>

            <?php endif; ?>
        </td>

        <td>
          FECHA DE EMISIÓN: <?php echo e($guia_remision->created_at->format("Y/m/d")); ?>

        </td>
    </tr>
    <div class="" style="display: block;width:100%;border:1px solid black;height:1px;"></div>
    <tr>
      <td class="">
        <b>Datos del cliente: </b>
        <br>
        CLIENTE: <?php echo e($guia_remision->client->full_name); ?>

      </td>
      <td>
        <?php echo e($guia_remision->client->type_document); ?>:  <?php echo e($guia_remision->client->n_document); ?>

      </td>
    </tr>
    <div class="" style="display: block;width:100%;border:1px solid black;height:1px;"></div>
    <?php
        $punto_partida  = json_decode($guia_remision->punto_partida,true);
        $punto_llegada  = json_decode($guia_remision->punto_llegada,true);
        $transporte_datos  = json_decode($guia_remision->transporte_datos,true);
        $conductor_datos = json_decode($guia_remision->conductor_datos,true);
    ?>
    <tr>
      <td class="">
        <b>Datos del Translado: </b>
        <br>
        PUNTO DE PARTIDA: <?php echo e($punto_partida["region"]." / ".$punto_partida["provincia"]." / ".$punto_partida["distrito"]); ?>

      </td>
      <td>
        Dirección:  <?php echo e($punto_partida["address"]); ?>

      </td>
    </tr>
    <div class="" style="display: block;width:100%;border:1px solid black;height:1px;"></div>
    <tr>
      <td class="">
        PUNTO DE LLEGADA: <?php echo e($punto_llegada["region"]." / ".$punto_llegada["provincia"]." / ".$punto_llegada["distrito"]); ?>

      </td>
      <td>
        Dirección:  <?php echo e($punto_llegada["address"]); ?>

      </td>
    </tr>

    <div class="" style="display: block;width:100%;border:1px solid black;height:1px;"></div>
    <?php if($transporte_datos): ?>
        <tr>
            <td class="">
                <b>Datos del Transportista: </b>
                <br>
                RAZON SOCIAL: <?php echo e($transporte_datos["razon_social_transportista"]); ?>

            </td>
            <td>
                RUC:  <?php echo e($transporte_datos["n_document_ruc"]); ?>

            </td>
        </tr>
    <?php endif; ?>
    <?php if($conductor_datos): ?>
        <tr>
            <td class="">
                <b>Datos del Chofer: </b>
                <br>
                CONDUCTOR: <?php echo e($conductor_datos["full_name_conductor"]); ?>

                <br>
                PLACA VEHICULO: <?php echo e($conductor_datos["placa_vehiculo"]); ?>

            </td>
            <td>
                <?php echo e($conductor_datos["name_document"]); ?>:  <?php echo e($conductor_datos["n_document"]); ?>

                <br>
                LICENCIA:  <?php echo e($conductor_datos["n_licencia"]); ?>

            </td>
        </tr>
    <?php endif; ?>
  </table>

  <table class="line-items-container">
    <thead>
      <tr>
        <th class="heading-quantity">Qty</th>
        <th class="heading-description">Descripción</th>
        <th class="heading-price">Peso Unitario</th>
        <th class="heading-price">Peso Total</th>
      </tr>
    </thead>
    <tbody>
        <?php $__currentLoopData = $guia_remision->details; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $detail): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <tr>
                <td><?php echo e($detail->quantity); ?></td>
                <td>
                    <?php echo e($detail->product->title); ?><br>
                    Categoria: <?php echo e($detail->product->categorie->name); ?><br>
                    Descripción: <?php echo e($detail->description); ?>

                </td>
                <td class="right"> <?php echo e($detail->peso); ?></td>
                <td class="right"> <?php echo e($detail->total); ?> KGM</td>
                
            </tr>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </tbody>
  </table>


  <table class="line-items-container has-bottom-border">
    <thead>
      <tr>
        <th>Tipo de Transporte</th>
        <th>Fecha Emisión</th>
        <th>Información de Peso</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="payment-info">
            <?php echo e($guia_remision->type_transport == '01' ? 'TRANSPORTE PUBLICO' : 'TRANSPORTE PRIVADO'); ?>

        </td>
        <td class="large"><?php echo e($guia_remision->created_at ? Carbon\Carbon::parse($guia_remision->created_at)->format("Y/m/d h:i A") : NULL); ?></td>
        <td class="payment-info">
            <div>
              PESO TOTAL: <strong><?php echo e($guia_remision->total); ?> KGM</strong>
            </div>
            <div>
              N° DE BULTOS: <strong><?php echo e($guia_remision->quantity_total); ?></strong>
            </div>
        </td>
    </tbody>
  </table>

    <div class="footer">
        <div class="footer-info">
            <span> DESCRIPCIÓN MOTIVO: <?php echo e($guia_remision->description); ?> </span>
        </div>
    </div>

</div>


</body></html>
<?php /**PATH D:\fact\api-sistema-fe-grupo-02-master\resources\views/pdf_guia_remision.blade.php ENDPATH**/ ?>