Commit 7dffb0c68ad07b63561555d44e26c8657e29e1bc

Authored by Eric Fernandez
Exists in master

Merge branch 'master' into 'develop'

Master

See merge request !67
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 && varlidarRemitoFacturado()) {
  643 + abrirModal();
  644 + }
  645 + });
  646 + } else {
  647 + abrirModal();
  648 + }
  649 +
  650 + function abrirModal() {
640 651 var modalInstance = $uibModal.open(
641 652 {
642 653 ariaLabelledBy: 'Busqueda de Precio Condición',