Commit a19ec3a8786b42add74049e4ce701958b0e511d5
1 parent
056ea72544
Exists in
master
arreglo error array plazos vacio al guardar
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
src/js/controller.js
... | ... | @@ -162,7 +162,9 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
162 | 162 | dias: plazo.dias |
163 | 163 | }); |
164 | 164 | }); |
165 | - crearNotaPedidoService.crearPlazosParaNotaPedido(plazosACrear); | |
165 | + if(plazosACrear.length){ | |
166 | + crearNotaPedidoService.crearPlazosParaNotaPedido(plazosACrear); | |
167 | + } | |
166 | 168 | |
167 | 169 | notaPedidoBusinessService.addEstado(data.data.id, |
168 | 170 | $scope.notaPedido.vendedor.CodVen); |