<div id="appFooterptv">
    <div class="modal fade" tabindex="-1" role="dialog" aria-hidden="true" id="modal-precio-global">
        <div class="modal-dialog modal-dialog-centered" role="document">
            <div class="modal-content">
                <div class="modal-header" style="border: 0px ;">
                    <h5 class="modal-title">Obtener Precio</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <?php if ($permiso_dollar) : ?>
                        <div class="row mt-2 mb-4">
                            <div class="col">
                                <input type="text" id="dol" name="dol" class="form-control" style="text-align: right; font-size: 40px;color: #1269db;" value="$ 1 = <?= $dollar ?>" disabled="true">
                            </div>
                        </div>
                    <?php endif; ?>
                    <input id="producto_cos_generico" type="text" class="form-control" placeholder="Buscar productos" @keyup="obtenerPrecioProducto">
                    <section class="card" :class="cargando">
                        <div class="list-group list-group-messages list-group-flush">
                            <div class="list-group-item unread" v-for="row in productos" @click="seleccionarProducto(row)">
                                <div class="list-group-item-figure">
                                    <a href="#" class="user-avatar">
                                        <div class="avatar">
                                            <img v-if="row.imagen" :src="row.imagen" alt="Producto" class="avatar-img rounded-circle">
                                            <span v-else class="avatar-title rounded-circle border border-white bg-info">{{ row.nombre.charAt() }}</span>
                                        </div>
                                    </a>
                                </div>
                                <div class="list-group-item-body pl-3 pl-md-4">
                                    <div class="row">
                                        <div class="col-12 col-lg-10">
                                            <h5 class="list-group-item-title">
                                                {{ row.descripcion }}
                                            </h5>
                                            <p class="list-group-item-text text-truncate"> Fabricante: {{ row.fabricante }}</p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </section>

                    <div id="view_datos_producto" v-if="Object.keys(precios).length > 0">
                        <div class="row">
                            <div class="col text-center" style="padding: .95rem;">
                                <span class="text-muted">{{ producto }}</span>
                            </div>
                        </div>
                        <table class="table table-sm table-striped">
                            <thead>
                                <tr>
                                    <th>Divisa</th>
                                    <th class="text-right">Precio</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr v-for="row in precios">
                                    <td style="padding: .95rem;">{{ row.divisa.nombre }}</td>
                                    <td style="padding: .95rem;" class="text-right">{{ row.precio }}</td>
                                </tr>
                            </tbody>
                        </table>

                        <table class="table table-sm table-striped">
                            <thead>
                                <tr>
                                    <th>Almacen</th>
                                    <th class="text-right">Cantidad</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr v-for="row in almacenes">
                                    <td style="padding: .95rem;">{{ row.nombre }}</td>
                                    <td style="padding: .95rem;" class="text-right">{{ row.cantidad }}</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>