Commit 78586b31189f3b694a226cc35719dff00644a262

Authored by Marcelo Puebla
1 parent 6bea732d02
Exists in master

Agregada llamada a modales de forma de pago.

Showing 2 changed files with 22 additions and 4 deletions   Show diff stats
src/js/controller.js
... ... @@ -47,7 +47,7 @@ angular.module('focaCrearFactura').controller('facturaController', [
47 47 $timeout(function () {
48 48 focaBotoneraLateralService.showSalir(false);
49 49 focaBotoneraLateralService.showPausar(true);
50   - focaBotoneraLateralService.showGuardar(true, $scope.crearFactura);
  50 + focaBotoneraLateralService.showGuardar(true, $scope.seleccionarFormaDePago);
51 51 focaBotoneraLateralService.addCustomButton('Salir', salir);
52 52 });
53 53  
... ... @@ -95,9 +95,27 @@ angular.module('focaCrearFactura').controller('facturaController', [
95 95 });
96 96 }, true);
97 97  
98   - $scope.crearFactura = function () {
99   -
  98 + $scope.seleccionarFormaDePago = function () {
100 99 if (!validarGuardar()) return;
  100 + var modalInstance = $uibModal.open(
  101 + {
  102 + templateUrl: 'modal-forma-pago.html',
  103 + controller: 'focaModalFormaPagoController',
  104 + resolve: {
  105 + filters: function () { return null; },
  106 + },
  107 + size: 'lg',
  108 + }
  109 + );
  110 + modalInstance.result
  111 + .then(function (data) {
  112 + console.log(data);
  113 + $scope.crearFactura();
  114 + })
  115 + .catch(function (e) { console.error(e); });
  116 + };
  117 +
  118 + $scope.crearFactura = function () {
101 119  
102 120 var save = {
103 121 factura: {
src/views/factura.html
... ... @@ -163,7 +163,7 @@
163 163 <span
164 164 class="mr-3 ml-auto"
165 165 ng-class="saveLoading ? 'text-muted' : ''"
166   - ng-click="crearRemito()"
  166 + ng-click="seleccionarFormaDePago()"
167 167 ladda="saveLoading"
168 168 data-style="expand-left"
169 169 >Guardar</span>