Commit fa0fa8b7d444318865c6a3f592ccff7c1d19d4d6
Exists in
ultimos_despachos
Merge branch 'master' into 'develop'
Master(benjamin) See merge request !44
Showing
2 changed files
Show diff stats
src/js/controllerEstadoCuenta.js
| ... | ... | @@ -10,15 +10,20 @@ angular.module('focaCrearFactura') |
| 10 | 10 | situacion: false, |
| 11 | 11 | facturasVencidas: 0.0 |
| 12 | 12 | }; |
| 13 | - | |
| 14 | 13 | $scope.cliente = parametros; |
| 15 | 14 | |
| 16 | 15 | init(); |
| 17 | 16 | |
| 18 | 17 | function init() { |
| 18 | + | |
| 19 | 19 | crearFacturaService.getResumenCuenta(parametros.idCliente) |
| 20 | 20 | .then(function (res) { |
| 21 | - $scope.estadoCuenta = res.data; | |
| 21 | + $scope.estadoCuenta = res.data[0]; | |
| 22 | + if ($scope.estadoCuenta.saldo > 0) { | |
| 23 | + $scope.estadoCuenta.situacion = true; | |
| 24 | + } else { | |
| 25 | + $scope.estadoCuenta.situacion = false; | |
| 26 | + } | |
| 22 | 27 | }) |
| 23 | 28 | .catch(function (e) { console.error(e); }); |
| 24 | 29 | } |
src/views/modal-estado-cuenta.html
| ... | ... | @@ -24,10 +24,43 @@ |
| 24 | 24 | </div> |
| 25 | 25 | <div class="row border-top mb-2"> |
| 26 | 26 | <div class="col text-center"> |
| 27 | + <p class="m-0">Autorizado</p> | |
| 28 | + <p class="h5 m-0" ng-bind="estadoCuenta.autorizado | currency"></p> | |
| 29 | + </div> | |
| 30 | + </div> | |
| 31 | + <div class="row border-top mb-2"> | |
| 32 | + <div class="col text-center"> | |
| 33 | + <p class="m-0">Extracciones</p> | |
| 34 | + <p class="h5 m-0" ng-bind="estadoCuenta.extracciones | currency"></p> | |
| 35 | + </div> | |
| 36 | + </div> | |
| 37 | + <div class="row border-top mb-2"> | |
| 38 | + <div class="col text-center"> | |
| 27 | 39 | <p class="m-0">Saldo</p> |
| 28 | 40 | <p class="h5 m-0" ng-bind="estadoCuenta.saldo | currency"></p> |
| 29 | 41 | </div> |
| 30 | 42 | </div> |
| 43 | + <div class="row border-top mb-2"> | |
| 44 | + <div class="col text-center"> | |
| 45 | + <p class="m-0">Situacion</p> | |
| 46 | + <h4> | |
| 47 | + <p | |
| 48 | + ng-show="estadoCuenta.situacion" | |
| 49 | + class="badge badge-success m-0 px-3">Permitido | |
| 50 | + </p> | |
| 51 | + <p | |
| 52 | + ng-show="!estadoCuenta.situacion" | |
| 53 | + class="badge badge-danger m-0 px-3">No permitido | |
| 54 | + </p> | |
| 55 | + </h4> | |
| 56 | + </div> | |
| 57 | + </div> | |
| 58 | + <div class="row border-top mb-2"> | |
| 59 | + <div class="col text-center"> | |
| 60 | + <p class="m-0">Facturas Vencidas</p> | |
| 61 | + <p class="h5 m-0" ng-bind="estadoCuenta.facturasvencidas | currency"></p> | |
| 62 | + </div> | |
| 63 | + </div> | |
| 31 | 64 | <!-- <div class="row border-top"> |
| 32 | 65 | <div class="col text-center"> |
| 33 | 66 | <p class="m-0">Situacion</p> |