diff --git a/src/js/controllerEstadoCuenta.js b/src/js/controllerEstadoCuenta.js index 0b60236..1ddd1e5 100644 --- a/src/js/controllerEstadoCuenta.js +++ b/src/js/controllerEstadoCuenta.js @@ -10,15 +10,21 @@ angular.module('focaCrearFactura') situacion: false, facturasVencidas: 0.0 }; - $scope.cliente = parametros; init(); function init() { + crearFacturaService.getResumenCuenta(parametros.idCliente) .then(function (res) { - $scope.estadoCuenta = res.data; + $scope.estadoCuenta = res.data[0]; + if ($scope.estadoCuenta.saldo > 0) { + $scope.estadoCuenta.situacion = true; + } else { + $scope.estadoCuenta.situacion = false; + } + console.log($scope.estadoCuenta.situacion) }) .catch(function (e) { console.error(e); }); } diff --git a/src/views/modal-estado-cuenta.html b/src/views/modal-estado-cuenta.html index b7f2f2c..24014dd 100644 --- a/src/views/modal-estado-cuenta.html +++ b/src/views/modal-estado-cuenta.html @@ -24,10 +24,43 @@
+

Autorizado

+

+
+
+
+
+

Extracciones

+

+
+
+
+

Saldo

+
+
+

Situacion

+

+

Permitido +

+

No permitido +

+

+
+
+
+
+

Facturas Vencidas

+

+
+