Commit f0cf6a667b227654c58f91b5faa7791b2eb584cf

Authored by Eric Fernandez
Exists in master

Merge branch 'master' into 'develop'

Master(mpuebla)

See merge request !3
... ... @@ -4,6 +4,7 @@
4 4 "description": "",
5 5 "main": "index.js",
6 6 "scripts": {
  7 + "refresh": "gulp uglify && cp tmp/foca-crear-factura.js ../wrapper-demo/node_modules/foca-crear-factura/dist/foca-crear-factura.min.js",
7 8 "test": "echo \"Error: no test specified\" && exit 1",
8 9 "compile": "gulp uglify",
9 10 "postinstall": "npm run compile && gulp clean-post-install",
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>