Commit 7f53f4514f93add05795015de632db3c0fa71bcf

Authored by Eric Fernandez
1 parent ae4b8d073e
Exists in master

paso forma de pago

Showing 1 changed file with 10 additions and 5 deletions   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) {