diff --git a/api/common/Controller/Consolidados.php b/api/common/Controller/Consolidados.php index dfff5c8..5940570 100644 --- a/api/common/Controller/Consolidados.php +++ b/api/common/Controller/Consolidados.php @@ -48,6 +48,6 @@ class Consolidados { error_log($e); throw $e; } - return $this->withJson($response); + return $this->withJson($response, []); } } diff --git a/api/src/Consolidado.php b/api/src/Consolidado.php index 2c20a72..087a971 100644 --- a/api/src/Consolidado.php +++ b/api/src/Consolidado.php @@ -42,10 +42,7 @@ class Consolidado extends Model { $this->periodo = CarbonInterval::getDateIntervalSpec($periodo); return $this; } - public function saldo(DateTimeInterface $fecha = null) { - if ($fecha === null) { - $fecha = $this->fecha(); - } - return $this->cuenta()->moneda()->cambiar($fecha, $this->saldo); + public function saldo() { + return $this->saldo; } } diff --git a/api/src/Cuenta.php b/api/src/Cuenta.php index c75d2e2..96a1277 100644 --- a/api/src/Cuenta.php +++ b/api/src/Cuenta.php @@ -133,7 +133,7 @@ class Cuenta extends Model { if ($consolidado->fecha() >= $date) { continue; } - $saldo += $consolidado->saldo($date); + $saldo += $consolidado->saldo(); } return $saldo; } diff --git a/ui/public/assets/scripts/categorias.list.js b/ui/public/assets/scripts/categorias/list.js similarity index 100% rename from ui/public/assets/scripts/categorias.list.js rename to ui/public/assets/scripts/categorias/list.js diff --git a/ui/public/assets/scripts/tipos_categorias.list.js b/ui/public/assets/scripts/categorias/tipos/list.js similarity index 100% rename from ui/public/assets/scripts/tipos_categorias.list.js rename to ui/public/assets/scripts/categorias/tipos/list.js diff --git a/ui/public/assets/scripts/cuentas.list.js b/ui/public/assets/scripts/cuentas/list.js similarity index 100% rename from ui/public/assets/scripts/cuentas.list.js rename to ui/public/assets/scripts/cuentas/list.js diff --git a/ui/public/assets/scripts/cuentas.show.js b/ui/public/assets/scripts/cuentas/show.js similarity index 99% rename from ui/public/assets/scripts/cuentas.show.js rename to ui/public/assets/scripts/cuentas/show.js index 11464e2..96057f9 100644 --- a/ui/public/assets/scripts/cuentas.show.js +++ b/ui/public/assets/scripts/cuentas/show.js @@ -209,6 +209,7 @@ const transacciones = { select.append( $('').attr('value', el.id).html(el.nombre + ' (' + el.categoria.nombre + ')') ) + select.dropdown() }) }) this.get().monedas().then(() => { diff --git a/ui/public/assets/scripts/tipos_cuentas.list.js b/ui/public/assets/scripts/cuentas/tipos/list.js similarity index 100% rename from ui/public/assets/scripts/tipos_cuentas.list.js rename to ui/public/assets/scripts/cuentas/tipos/list.js diff --git a/ui/public/assets/scripts/uploads.list.js b/ui/public/assets/scripts/uploads/list.js similarity index 100% rename from ui/public/assets/scripts/uploads.list.js rename to ui/public/assets/scripts/uploads/list.js diff --git a/ui/resources/views/categorias/list.blade.php b/ui/resources/views/categorias/list.blade.php index 88f6340..50a1d96 100644 --- a/ui/resources/views/categorias/list.blade.php +++ b/ui/resources/views/categorias/list.blade.php @@ -28,7 +28,7 @@ @endsection @push('scripts') - + + + + - + +