Commit fda5e31ffb6242705dc8ceb0d868c85a2c248347
Exists in
master
and in
1 other branch
Merge branch 'develop' of git.focasoftware.com:npm/foca-crear-factura
Showing
1 changed file
Show diff stats
src/js/controller.js
| ... | ... | @@ -103,20 +103,24 @@ angular.module('focaCrearFactura').controller('facturaController', [ |
| 103 | 103 | templateUrl: 'modal-forma-pago.html', |
| 104 | 104 | controller: 'focaModalFormaPagoController', |
| 105 | 105 | resolve: { |
| 106 | - filters: function () { return null; }, | |
| 106 | + parametros: function () { | |
| 107 | + return { | |
| 108 | + importe: $scope.getTotal() | |
| 109 | + }; | |
| 110 | + }, | |
| 107 | 111 | }, |
| 108 | 112 | size: 'lg', |
| 109 | 113 | } |
| 110 | 114 | ); |
| 111 | 115 | modalInstance.result |
| 112 | 116 | .then(function (data) { |
| 113 | - console.log(data); | |
| 114 | - $scope.crearFactura(); | |
| 117 | + | |
| 118 | + $scope.crearFactura(data); | |
| 115 | 119 | }) |
| 116 | 120 | .catch(function (e) { console.error(e); }); |
| 117 | 121 | }; |
| 118 | 122 | |
| 119 | - $scope.crearFactura = function () { | |
| 123 | + $scope.crearFactura = function (formaPago) { | |
| 120 | 124 | |
| 121 | 125 | var save = { |
| 122 | 126 | factura: { |
| ... | ... | @@ -172,7 +176,8 @@ angular.module('focaCrearFactura').controller('facturaController', [ |
| 172 | 176 | OBSERVACIONES: $scope.factura.observaciones |
| 173 | 177 | }, |
| 174 | 178 | cuerpo: $scope.articulosFiltro(), |
| 175 | - despachos: $scope.factura.despachos | |
| 179 | + despachos: $scope.factura.despachos, | |
| 180 | + formaPago: formaPago | |
| 176 | 181 | }; |
| 177 | 182 | |
| 178 | 183 | crearFacturaService.guardarFactura(save).then(function (res) { |