diff --git a/src/js/controller.js b/src/js/controller.js index 373fb60..ce15589 100644 --- a/src/js/controller.js +++ b/src/js/controller.js @@ -4,8 +4,7 @@ angular.module('focaCrearFactura').controller('facturaController', [ '$localStorage', 'APP', 'focaLoginService', function ( $scope, $uibModal, $location, $filter, crearFacturaService, $timeout, focaModalService, - crearRemitoService, $rootScope, focaBotoneraLateralService, $localStorage, APP, loginServ) - { + crearRemitoService, $rootScope, focaBotoneraLateralService, $localStorage, APP, loginServ) { config(); @@ -466,15 +465,19 @@ angular.module('focaCrearFactura').controller('facturaController', [ image: producto.nombreImagen, imageDefault: 'productoDefault.png' }); - - + crearFuncionesProductos(producto); - }); }); } $scope.seleccionarBusquedaProductos = function () { + + if (angular.equals({}, $scope.factura.vendedor)) { + + focaModalService.alert('Seleccione Vendedor'); + return false; + } var modalInstance = $uibModal.open( {