<div class="modal fade" tabindex="-1" role="dialog" id="modal-factor-producto">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">Factor divisa</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <div class="input-group">
                        <div class="input-group-append">
                            <span class="input-group-text">
                                <i class="fa fa-calendar"></i>
                            </span>
                        </div>
                        <input type="date" class="form-control" v-model="fecha_factor" aria-label="" aria-describedby="basic-addon1">
                        <div class="input-group-prepend">
                            <button class="btn btn-black btn-border" type="button" @click="buscarFactores">
                                <i class="fa fa-search"></i>
                            </button>
                        </div>
                    </div>
                </div>
                <div class="form-group form-floating-label">
                    <select class="form-control input-border-bottom" v-model="selectedFactor" id="selectFactor" required="" @change="agregarFactor">
                        <option value="" disabled>&nbsp;</option>
                        <option v-for="row in selectFactores" :value="row.id">{{ row.fecha }}</option>
                    </select>
                    <label for="selectFactor" class="placeholder">Factores</label>
                </div>
                <div v-if="factoresBitacora.length > 0">
                    <div class="text-center">
                        <strong>{{ factoresBitacora[0].fecha }}</strong>
                        <span @click="eliminarFactorProducto" style="cursor: pointer;"><i class="fa fa-trash"></i></span>
                    </div>
                    <table class="table table-sm">
                        <thead>
                            <tr>
                                <th>Divisa Master</th>
                                <th>Divisa buscada</th>
                                <th>Factor</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="row in factoresBitacora">
                                <td>{{ row.div_master_nombre }}</td>
                                <td>{{ row.div_buscada }}</td>
                                <td><strong>{{ row.factor }}</strong></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div class="form-row">
                    <div class="col-12">
                        <div class=" alert alert-warning" role="alert" v-for="row in errorForm">
                            {{ row }}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>