<form action="#" autocomplete="off" @submit.prevent="generarPresupuesto" id="form_generar_presupuesto">
    <div class="modal fade" tabindex="-1" role="dialog" aria-hidden="true" id="modal_generar_presupuesto">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">Generar documento</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">
                        <label for="pre_serie">Serie:</label>
                        <select class="form-control" id="pre_serie" name="pre_serie">
                            <option value="" disabled>selecione una serie</option>
                            <?php foreach ($series as $row) : ?>
                                <option value="<?= $row['ser_id'] ?>"><?= $row['ser_descripcion'] ?></option>
                            <?php endforeach; ?>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="pre_almacen">Almacen:</label>
                        <select class="form-control" id="pre_almacen" name="pre_almacen">
                            <option value="" disabled>selecione una almacen</option>
                            <?php foreach ($almacenes as $row) : ?>
                                <option value="<?= $row['alm_id'] ?>"><?= $row['alm_nombre'] ?></option>
                            <?php endforeach; ?>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="pre_divisa">Divisa:</label>
                        <select class="form-control" id="pre_divisa" name="pre_divisa">
                            <option value="" disabled>selecione una divisa</option>
                            <?php foreach ($divisas as $row) : ?>
                                <option value="<?= $row['div_id'] ?>" <?= $row['div_predeterminado'] == 1 ? 'selected' : ''; ?>><?= $row['div_descripcion'] ?></option>
                            <?php endforeach; ?>
                        </select>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">Cerrar</button>
                    <button v-if="cargando" class="btn btn-sm btn-primary" disabled>
                        <i class="loader loader-info"></i> {{ this.cargando }}
                    </button>
                    <button v-else type="submit" class="btn btn-primary btn-sm">Registrar</button>
                </div>
            </div>
        </div>
    </div>
</form>
