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) {