Commit c763583dd4831fc9e2c7ebc09ffee785ebc099b3

Authored by Eric Fernandez
1 parent 6e6c5fbdb9
Exists in master

valido que no venga null

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
src/js/controller.js
1 angular.module('focaModalEfectivo') 1 angular.module('focaModalEfectivo')
2 .controller('focaModalEfectivoController', 2 .controller('focaModalEfectivoController',
3 [ 3 [
4 '$scope', 4 '$scope',
5 '$uibModalInstance', 5 '$uibModalInstance',
6 function($scope, $uibModalInstance) { 6 function($scope, $uibModalInstance) {
7 $scope.aceptar = function(key) { 7 $scope.aceptar = function(key) {
8 if(key === 13) { 8 if(key === 13 && $scope.efectivo) {
9 var efectivo = parseFloat($scope.efectivo); 9 var efectivo = parseFloat($scope.efectivo);
10 $uibModalInstance.close(efectivo); 10 $uibModalInstance.close(efectivo);
11 } 11 }
12 }; 12 };
13 13
14 $scope.cancel = function() { 14 $scope.cancel = function() {
15 $uibModalInstance.dismiss('cancel'); 15 $uibModalInstance.dismiss('cancel');
16 }; 16 };
17 } 17 }
18 ] 18 ]
19 ); 19 );
20 20