<div class="row">
    <div class="col-lg-6">
        <div class="card">
            <div class="card-body">
               <!--<form  id="form_mes_busqueda">-->
                    <div class="form-row">
                        <div class="col-sm-6">
                            <div class="form-group input-group form-floating-label">
                                <select id="mes_anio" name="mes_anio" class="form-control input-border-bottom" v-model="anio" onchange="obtenerIngresosDiariosComprasMes()" @click.prevent="buscarVentapormes()">
                                    <?php for ($m = date('o'); $m >= 2018; $m--) {
                                        if ($m == date('o')) {
                                            echo '<option value="' . $m . '" selected>' . $m . '</option>';
                                        } else {
                                            echo '<option value="' . $m . '">' . $m . '</option>';
                                        }
                                    }
                                    ?>
                                </select>
                                <label for="mes_divisas" class="placeholder">Año</label>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group input-group form-floating-label">
                                <select id="mes_divisas" class="form-control input-border-bottom" v-model="divisa_mes" onchange="obtenerIngresosDiariosComprasMes()" @click.prevent="buscarVentapormes()">
                                    <option value="0">Todas</option>
                                    <?php foreach ($divisas as $row) : ?>
                                        <option value="<?= $row['div_id'] ?>"><?= $row['div_descripcion'] ?></option>
                                    <?php endforeach; ?>
                                </select>
                                <label for="mes_divisas" class="placeholder">Divisa</label>
                            </div>
                        </div>
                        <!--<div class="col-sm-4">
                            <div class="form-group">
                                <button type="submit" class="btn btn-border btn-info btn-sm mr-2">Buscar</button>
                            </div>
                        </div>-->
                    </div>
                    <div class="row">
                        <div class="col-12">
                            <div class=" alert alert-warning" role="alert" v-for="row in errorForm">
                                {{ row }}
                            </div>
                        </div>
                    </div>
               <!-- </form>-->
            </div>
        </div>
    </div>
    <div class="col-lg-6">
        <div class="card">
            <div class="card-body">
                <canvas id="ventasSemanalescompraMes" height="230"></canvas>
            </div>
        </div>
    </div>
    <div class="col-12">
        <div class="card">
            <div class="card-body" :cargando="cargando_tabla">
                <div class="table-responsive">
                    <table class="display nowrap table table-striped table-hover dataTable table-head-bg-primary table-bordered-bd-primary" id="tabla_meses">
                        <thead>
                            <tr>
                                <th class="text-center">Mes</th>
                                <th class="text-center">Cant. Art</th>
                                <th class="text-left">Costo</th>
                                <th class="text-left">Venta</th>
                                <th class="text-left">Ganancia</th>
                                <th class="text-left">Porcentaje</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="row in meses_ventas">
                                <td class="text-center">{{ row.mes }}</td>
                                <td class="text-center">{{ row.cantidad }}</td>
                                <td class="text-right">{{ moneda(row.costo, row.div_locale, row.div_simbolo) }}</td>
                                <td class="text-right">{{ moneda(row.venta, row.div_locale, row.div_simbolo) }}</td>
                                <td class="text-right">{{ moneda(row.ganancia, row.div_locale, row.div_simbolo) }}</td>
                                <td class="text-right">{{ decimal(row.porcentaje, row.div_locale) }}%</td>
                            </tr>
                        </tbody>
                        <tfoot>
                            <tr>
                                <th class="text-center">Total</th>
                                <th class="text-center">{{ art_total_m }}</th>
                                <th class="text-right">{{ costo_m }}</th>
                                <th class="text-right">{{ venta_m }}</th>
                                <th class="text-right">{{ ganancia_m }}</th>
                                <th class="text-right">{{ porcentaje_m }}</th>
                            </tr>
                        </tfoot>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>