Commit cd5efe0953c01ff8deb6a5f546443ef324fc797e

Authored by Marcelo Puebla
1 parent ee34395a29
Exists in master

Agregada validacion para busqueda de productos.

Showing 1 changed file with 8 additions and 5 deletions   Show diff stats
src/js/controller.js
... ... @@ -4,8 +4,7 @@ angular.module('focaCrearFactura').controller('facturaController', [
4 4 '$localStorage', 'APP', 'focaLoginService',
5 5 function (
6 6 $scope, $uibModal, $location, $filter, crearFacturaService, $timeout, focaModalService,
7   - crearRemitoService, $rootScope, focaBotoneraLateralService, $localStorage, APP, loginServ)
8   - {
  7 + crearRemitoService, $rootScope, focaBotoneraLateralService, $localStorage, APP, loginServ) {
9 8  
10 9 config();
11 10  
... ... @@ -466,15 +465,19 @@ angular.module('focaCrearFactura').controller('facturaController', [
466 465 image: producto.nombreImagen,
467 466 imageDefault: 'productoDefault.png'
468 467 });
469   -
470   -
  468 +
471 469 crearFuncionesProductos(producto);
472   -
473 470 });
474 471 });
475 472 }
476 473  
477 474 $scope.seleccionarBusquedaProductos = function () {
  475 +
  476 + if (angular.equals({}, $scope.factura.vendedor)) {
  477 +
  478 + focaModalService.alert('Seleccione Vendedor');
  479 + return false;
  480 + }
478 481  
479 482 var modalInstance = $uibModal.open(
480 483 {