Commit 8a51c92b3a28116548c644ed2c58e94816752e73
1 parent
a085b8d453
Exists in
master
Arreglo cambio precio y condicion.
Showing
1 changed file
with
11 additions
and
1 deletions
Show diff stats
src/js/controller.js
... | ... | @@ -584,7 +584,16 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
584 | 584 | focaModalService.alert('Primero seleccione un cliente'); |
585 | 585 | return; |
586 | 586 | } |
587 | - if (validarNotaRemitada()) { | |
587 | + if ($scope.notaPedido.articulosNotaPedido.length !== 0) { | |
588 | + focaModalService.confirm('Se perderan los productos ingresados').then(function(data) { | |
589 | + if (data) { | |
590 | + abrirModal(); | |
591 | + } | |
592 | + }); | |
593 | + } else if (validarNotaRemitada()) { | |
594 | + abrirModal(); | |
595 | + } | |
596 | + function abrirModal() { | |
588 | 597 | var modalInstance = $uibModal.open( |
589 | 598 | { |
590 | 599 | ariaLabelledBy: 'Busqueda de Precio Condición', |
... | ... | @@ -598,6 +607,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
598 | 607 | } |
599 | 608 | } |
600 | 609 | ); |
610 | + | |
601 | 611 | modalInstance.result.then( |
602 | 612 | function(precioCondicion) { |
603 | 613 | var cabecera = ''; |