Commit 39a5bd512702270f0ffdb3d217164dd167795ad6

Authored by Eric Fernandez
Exists in master

Merge branch 'master' into 'develop'

Master(efernandez)

See merge request !16
src/js/controller.js
... ... @@ -50,7 +50,7 @@ angular.module('focaCrearFactura').controller('facturaController', [
50 50 focaBotoneraLateralService.showSalir(false);
51 51 focaBotoneraLateralService.showPausar(true);
52 52 focaBotoneraLateralService.showGuardar(true, $scope.seleccionarFormaDePago);
53   - focaBotoneraLateralService.addCustomButton('Salir', salir);
  53 + focaBotoneraLateralService.addCustomButton('Salir', $scope.salir);
54 54 });
55 55  
56 56 init();
... ... @@ -536,19 +536,10 @@ angular.module('focaCrearFactura').controller('facturaController', [
536 536 PCD: 0,
537 537 RTO: ''
538 538 };
539   - // crearFacturaService.setearDespachoOcupado({
540   - // surtidor: articulo.SUR,
541   - // producto: articulo.PRO,
542   - // carga: articulo.CAR
543   - // })
544   - // .then(function () {
  539 +
545 540 $scope.factura.articulosFactura.push(articulo);
546 541 $scope.cambioEdit(articulo, 'cantidad');
547   - // })
548   - // .catch(function (err) {
549 542  
550   - // focaModalService.alert('El despacho esta en uso');
551   - // });
552 543 })
553 544 .catch(function (e) { console.error(e); });
554 545 };
... ... @@ -712,7 +703,7 @@ angular.module('focaCrearFactura').controller('facturaController', [
712 703 return relleno;
713 704 }
714 705  
715   - function salir() {
  706 + $scope.salir = function () {
716 707 var confirmacion = false;
717 708  
718 709 if (!angular.equals($scope.factura, $scope.inicial)) {
src/views/factura.html
... ... @@ -235,7 +235,7 @@
235 235 <div class="m-auto p-1">
236 236 <button
237 237 class="btn btn-outline-light"
238   - ng-click="quitarDespacho(key)"
  238 + ng-click="quitarDespacho(articulo, key)"
239 239 >
240 240 <i class="fa fa-trash"></i>
241 241 </button>