From 1d6ba7bafe7279e5e304c04c5b0f332746718249 Mon Sep 17 00:00:00 2001 From: Eric Fernandez Date: Thu, 25 Jul 2019 11:55:02 -0300 Subject: [PATCH] =?UTF-8?q?validaci=C3=B3n=20despachos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/controller.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/js/controller.js b/src/js/controller.js index 0c3d7ea..3436860 100644 --- a/src/js/controller.js +++ b/src/js/controller.js @@ -106,6 +106,7 @@ angular.module('focaCrearFactura').controller('facturaController', [ }); $scope.factura.vendedor = res.data; + $scope.inicial.vendedor = res.data; getProductosByPlanilla(res.data.NplVen); }) @@ -450,6 +451,13 @@ angular.module('focaCrearFactura').controller('facturaController', [ function getProductosByPlanilla(numeroPlanilla) { crearFacturaService.getProductosByPlanilla(numeroPlanilla).then(function (res) { + + if (!res.data.length) { + + focaModalService.alert('No hay despachos disponibles por el momento'); + return; + } + $scope.botoneraProductos.length = 0; res.data.forEach(function (producto) { -- 1.9.1