Commit 6779863bb9ca5904fa7890f958c29232bc646d59
1 parent
f4a128faac
Exists in
master
and in
2 other branches
unit test services, route
Showing
3 changed files
with
11 additions
and
6 deletions
Show diff stats
package.json
| ... | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | "description": "Listado y ABM nota de remitos", |
| 5 | 5 | "main": "index.js", |
| 6 | 6 | "scripts": { |
| 7 | - "test": "echo \"Error: no test specified\" && exit 1", | |
| 7 | + "test": "test.html", | |
| 8 | 8 | "compile": "gulp uglify", |
| 9 | 9 | "gulp-pre-commit": "gulp pre-commit", |
| 10 | 10 | "postinstall": "npm run compile && gulp clean-post-install", |
| ... | ... | @@ -31,6 +31,7 @@ |
| 31 | 31 | "angular": "^1.7.5", |
| 32 | 32 | "angular-cookies": "^1.7.5", |
| 33 | 33 | "angular-ladda": "^0.4.3", |
| 34 | + "angular-mocks": "^1.7.7", | |
| 34 | 35 | "angular-route": "^1.7.5", |
| 35 | 36 | "bootstrap": "^4.1.3", |
| 36 | 37 | "foca-botonera-facturador": "git+http://git.focasoftware.com/npm/foca-botonera-facturador.git", |
src/js/app.js
src/js/controller.js
| ... | ... | @@ -83,7 +83,7 @@ angular.module('focaCrearRemito') .controller('remitoController', |
| 83 | 83 | $scope.inicial = angular.copy($scope.remito); |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - $scope.$watch('remito', function(newValue, oldValue) { | |
| 86 | + $scope.$watch('remito', function(newValue) { | |
| 87 | 87 | focaBotoneraLateralService.setPausarData({ |
| 88 | 88 | label: 'remito', |
| 89 | 89 | val: newValue |
| ... | ... | @@ -239,7 +239,9 @@ angular.module('focaCrearRemito') .controller('remitoController', |
| 239 | 239 | } else if (!$scope.remito.proveedor) { |
| 240 | 240 | focaModalService.alert('Ingrese Proveedor'); |
| 241 | 241 | return; |
| 242 | - } else if (!$scope.remito.cotizacion.moneda.id && !$scope.remito.cotizacion.moneda.ID) { | |
| 242 | + } else if (!$scope.remito.cotizacion.moneda.id && | |
| 243 | + !$scope.remito.cotizacion.moneda.ID) | |
| 244 | + { | |
| 243 | 245 | focaModalService.alert('Ingrese Moneda'); |
| 244 | 246 | return; |
| 245 | 247 | } else if (!$scope.remito.cotizacion.ID) { |
| ... | ... | @@ -699,9 +701,11 @@ angular.module('focaCrearRemito') .controller('remitoController', |
| 699 | 701 | return { |
| 700 | 702 | flete: $scope.remito.flete ? '1' : |
| 701 | 703 | ($scope.remito.fob ? 'FOB' : |
| 702 | - ($scope.remito.flete === undefined ? null : '0')), | |
| 704 | + ($scope.remito.flete === undefined ? | |
| 705 | + null : '0')), | |
| 703 | 706 | bomba: $scope.remito.bomba ? '1' : |
| 704 | - ($scope.remito.bomba === undefined ? null : '0'), | |
| 707 | + ($scope.remito.bomba === undefined ? | |
| 708 | + null : '0'), | |
| 705 | 709 | kilometros: $scope.remito.kilometros |
| 706 | 710 | }; |
| 707 | 711 | } |