Commit bfc34ac167e6c22ed5ebcd2f0d3695655d74ccdf
1 parent
ace9850816
Exists in
master
Mensaje de alerta
Showing
1 changed file
with
12 additions
and
1 deletions
Show diff stats
src/js/controller.js
... | ... | @@ -636,7 +636,18 @@ angular.module('focaCrearRemito') .controller('remitoController', |
636 | 636 | focaModalService.alert('Primero seleccione un cliente'); |
637 | 637 | return; |
638 | 638 | } |
639 | - if (varlidarRemitoFacturado()) { | |
639 | + | |
640 | + if ($scope.remito.articulosRemito !== 0) { | |
641 | + focaModalService.confirm('Se perderan los productos ingresados').then(function(data) { | |
642 | + if (data) { | |
643 | + abrirModal(); | |
644 | + } | |
645 | + }); | |
646 | + } else if (varlidarRemitoFacturado()) { | |
647 | + abrirModal(); | |
648 | + } | |
649 | + | |
650 | + function abrirModal() { | |
640 | 651 | var modalInstance = $uibModal.open( |
641 | 652 | { |
642 | 653 | ariaLabelledBy: 'Busqueda de Precio Condición', |