Commit 52a149c47290b874c34cff17f3bb612578a1482e
1 parent
53ecd7a67d
Exists in
master
new route save, valid idListaPRecio
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
src/js/controller.js
1 | angular.module('focaModalDescarga') | 1 | angular.module('focaModalDescarga') |
2 | .controller('focaModalDescargaCtrl', [ | 2 | .controller('focaModalDescargaCtrl', [ |
3 | '$scope', | 3 | '$scope', |
4 | 'focaModalDescargasService', | 4 | 'focaModalDescargasService', |
5 | '$filter', | 5 | '$filter', |
6 | 'focaModalService', | 6 | 'focaModalService', |
7 | '$timeout', | 7 | '$timeout', |
8 | '$uibModalInstance', | 8 | '$uibModalInstance', |
9 | '$uibModal', | 9 | '$uibModal', |
10 | 'remito', | 10 | 'remito', |
11 | 'focaModalDetalleHojaRutaService', | 11 | 'focaModalDetalleHojaRutaService', |
12 | 'focaSeguimientoService', | 12 | 'focaSeguimientoService', |
13 | 'crearRemitoService', | 13 | 'crearRemitoService', |
14 | function ($scope, focaModalDescargasService, $filter, | 14 | function ($scope, focaModalDescargasService, $filter, |
15 | focaModalService, $timeout, $uibModalInstance, $uibModal, remito, | 15 | focaModalService, $timeout, $uibModalInstance, $uibModal, remito, |
16 | focaModalDetalleHojaRutaService, focaSeguimientoService, crearRemitoService) { | 16 | focaModalDetalleHojaRutaService, focaSeguimientoService, crearRemitoService) { |
17 | 17 | ||
18 | //#region variables | 18 | //#region variables |
19 | $scope.remito = {}; | 19 | $scope.remito = {}; |
20 | $scope.remito = remito; | 20 | $scope.remito = remito; |
21 | $scope.nroRecibo = 0; | 21 | $scope.nroRecibo = 0; |
22 | $scope.cisternas = remito.cisternas; | 22 | $scope.cisternas = remito.cisternas; |
23 | $scope.nroSucursal; | 23 | $scope.nroSucursal; |
24 | $scope.nroRemito; | 24 | $scope.nroRemito; |
25 | $scope.articulos = []; | 25 | $scope.articulos = []; |
26 | $scope.hasErrorSucursalRemito = false; | 26 | $scope.hasErrorSucursalRemito = false; |
27 | //#endregion | 27 | //#endregion |
28 | 28 | ||
29 | function init() { | 29 | function init() { |
30 | crearRemitoService.getNumeroRemito().then( | 30 | crearRemitoService.getNumeroRemito().then( |
31 | function (res) { | 31 | function (res) { |
32 | $scope.nroSucursal = res.data.sucursal; | 32 | $scope.nroSucursal = res.data.sucursal; |
33 | $scope.nroRemito = res.data.numeroRemito; | 33 | $scope.nroRemito = res.data.numeroRemito; |
34 | $scope.validateSucursalRemito($scope.nroSucursal, $scope.nroRemito); | 34 | $scope.validateSucursalRemito($scope.nroSucursal, $scope.nroRemito); |
35 | }, | 35 | }, |
36 | function (err) { | 36 | function (err) { |
37 | focaModalService.alert('La terminal no esta configurada correctamente'); | 37 | focaModalService.alert('La terminal no esta configurada correctamente'); |
38 | console.info(err); | 38 | console.info(err); |
39 | } | 39 | } |
40 | ); | 40 | ); |
41 | }; | 41 | }; |
42 | 42 | ||
43 | init(); | 43 | init(); |
44 | 44 | ||
45 | $scope.crearRemito = function () { | 45 | $scope.crearRemito = function () { |
46 | if (!$scope.remito.cliente) { | 46 | if (!$scope.remito.cliente) { |
47 | focaModalService.alert("No has seleccionado cliente"); | 47 | focaModalService.alert("No has seleccionado cliente"); |
48 | return; | 48 | return; |
49 | } | 49 | } |
50 | if (validarDescarga()) { | 50 | if (validarDescarga()) { |
51 | return; | 51 | return; |
52 | } | 52 | } |
53 | //#region OBJETO REMITO | 53 | //#region OBJETO REMITO |
54 | var remito = { | 54 | var remito = { |
55 | id: 0, | 55 | id: 0, |
56 | fechaRemito: new Date().toISOString().slice(0, 19).replace('T', ' '), | 56 | fechaRemito: new Date().toISOString().slice(0, 19).replace('T', ' '), |
57 | idCliente: $scope.remito.cliente.cod, | 57 | idCliente: $scope.remito.cliente.cod, |
58 | nombreCliente: $scope.remito.cliente.nom, | 58 | nombreCliente: $scope.remito.cliente.nom, |
59 | cuitCliente: $scope.remito.cliente.cuit, | 59 | cuitCliente: $scope.remito.cliente.cuit, |
60 | total: $scope.getTotal() * $scope.remito.cotizacion.VENDEDOR, | 60 | total: $scope.getTotal() * $scope.remito.cotizacion.VENDEDOR, |
61 | numeroNotaPedido: $scope.remito.numeroNotaPedido, | 61 | numeroNotaPedido: $scope.remito.numeroNotaPedido, |
62 | idVendedor: $scope.remito.cliente.ven, | 62 | idVendedor: $scope.remito.cliente.ven, |
63 | idProveedor: $scope.remito.proveedor.COD, | 63 | idProveedor: $scope.remito.proveedor.COD, |
64 | idDomicilio: 0, | 64 | idDomicilio: 0, |
65 | idCotizacion: $scope.remito.cotizacion.ID, | 65 | idCotizacion: $scope.remito.cotizacion.ID, |
66 | idListaPrecio: parseInt($scope.remito.cliente.mod), | 66 | idListaPrecio: parseInt($scope.remito.cliente.mod) || '', |
67 | flete: $scope.remito.flete, | 67 | flete: $scope.remito.flete, |
68 | fob: $scope.remito.fob, | 68 | fob: $scope.remito.fob, |
69 | bomba: $scope.remito.bomba, | 69 | bomba: $scope.remito.bomba, |
70 | kilometros: $scope.remito.kilometros, | 70 | kilometros: $scope.remito.kilometros, |
71 | domicilioStamp: $scope.remito.cliente.DOM, | 71 | domicilioStamp: $scope.remito.cliente.DOM, |
72 | observaciones: $scope.remito.observaciones, | 72 | observaciones: $scope.remito.observaciones, |
73 | numeroRemito: parseInt($scope.nroRemito), | 73 | numeroRemito: parseInt($scope.nroRemito), |
74 | sucursal: parseInt($scope.nroSucursal), | 74 | sucursal: parseInt($scope.nroSucursal), |
75 | responsabilidadIvaCliente: $scope.remito.cliente.iva, | 75 | responsabilidadIvaCliente: $scope.remito.cliente.iva, |
76 | descuento: 0,//TODO, | 76 | descuento: 0,//TODO, |
77 | importeNeto: getImporte('netoUnitario'), | 77 | importeNeto: getImporte('netoUnitario'), |
78 | importeExento: getImporte('exentoUnitario'), | 78 | importeExento: getImporte('exentoUnitario'), |
79 | importeIva: getImporte('ivaUnitario'), | 79 | importeIva: getImporte('ivaUnitario'), |
80 | importeIvaServicios: 0,//TODO | 80 | importeIvaServicios: 0,//TODO |
81 | importeImpuestoInterno: getImporte('impuestoInternoUnitario'), | 81 | importeImpuestoInterno: getImporte('impuestoInternoUnitario'), |
82 | importeImpuestoInterno1: getImporte('impuestoInterno1Unitario'), | 82 | importeImpuestoInterno1: getImporte('impuestoInterno1Unitario'), |
83 | importeImpuestoInterno2: getImporte('impuestoInterno2Unitario'), | 83 | importeImpuestoInterno2: getImporte('impuestoInterno2Unitario'), |
84 | percepcion: 0,//TODO | 84 | percepcion: 0,//TODO |
85 | percepcionIva: 0,//TODO | 85 | percepcionIva: 0,//TODO |
86 | redondeo: 0,//TODO | 86 | redondeo: 0,//TODO |
87 | anulado: false, | 87 | anulado: false, |
88 | planilla: $filter('date')($scope.now, 'ddMMyyyy'), | 88 | planilla: $filter('date')($scope.now, 'ddMMyyyy'), |
89 | lugar: parseInt($scope.puntoVenta), | 89 | lugar: parseInt($scope.puntoVenta), |
90 | cuentaMadre: 0,//TODO | 90 | cuentaMadre: 0,//TODO |
91 | cuentaContable: 0,//TODO | 91 | cuentaContable: 0,//TODO |
92 | asiento: 0,//TODO | 92 | asiento: 0,//TODO |
93 | e_hd: '',//TODO | 93 | e_hd: '',//TODO |
94 | c_hd: '', | 94 | c_hd: '', |
95 | numeroLiquidoProducto: 0,//TODO | 95 | numeroLiquidoProducto: 0,//TODO |
96 | estado: 0, | 96 | estado: 0, |
97 | destinoVenta: 0,//TODO | 97 | destinoVenta: 0,//TODO |
98 | operacionTipo: 0, //TODO | 98 | operacionTipo: 0, //TODO |
99 | idHojaRuta: $scope.remito.idHojaRuta | 99 | idHojaRuta: $scope.remito.idHojaRuta |
100 | } | 100 | } |
101 | //#endregion | 101 | //#endregion |
102 | focaModalDescargasService.crearRemito({ remito: remito, notaPedido: { id: 0 } }) | 102 | focaModalDescargasService.crearRemito({ remito: remito, notaPedido: { id: 0 } }) |
103 | .then(function (res) { | 103 | .then(function (res) { |
104 | remitoId = res.data.id | 104 | remitoId = res.data.id |
105 | descargar(remitoId); | 105 | descargar(remitoId); |
106 | focaModalDescargasService. | 106 | focaModalDescargasService. |
107 | addArticulos($scope.remito.articulosRemito, $scope.articulos, remitoId, 1); | 107 | addArticulos($scope.remito.articulosRemito, $scope.articulos, remitoId, 1); |
108 | focaModalService.alert("Descarga realizada") | 108 | focaModalService.alert("Descarga realizada") |
109 | .then(function () { | 109 | .then(function () { |
110 | $uibModalInstance.dismiss(); | 110 | $uibModalInstance.dismiss(); |
111 | }) | 111 | }) |
112 | }) | 112 | }) |
113 | .catch(function (e) { console.log(e); }) | 113 | .catch(function (e) { console.log(e); }) |
114 | 114 | ||
115 | }; | 115 | }; |
116 | $scope.getTotal = function () { | 116 | $scope.getTotal = function () { |
117 | var total = 0; | 117 | var total = 0; |
118 | $scope.cisternas.forEach(function (cisterna) { | 118 | $scope.cisternas.forEach(function (cisterna) { |
119 | 119 | ||
120 | total += cisterna.cisternaCarga.articulo.PreVen * cisterna.cisternaCarga.descargar; | 120 | total += cisterna.cisternaCarga.articulo.PreVen * cisterna.cisternaCarga.descargar; |
121 | cisterna.cisternaCarga.articulo.cantidad = cisterna.cisternaCarga.descargar; | 121 | cisterna.cisternaCarga.articulo.cantidad = cisterna.cisternaCarga.descargar; |
122 | $scope.articulos.push(cisterna.cisternaCarga.articulo); | 122 | $scope.articulos.push(cisterna.cisternaCarga.articulo); |
123 | }); | 123 | }); |
124 | return parseFloat(total.toFixed(2)); | 124 | return parseFloat(total.toFixed(2)); |
125 | }; | 125 | }; |
126 | function descargar(idRemito) { | 126 | function descargar(idRemito) { |
127 | 127 | ||
128 | for (var i = 0; i < $scope.cisternas.length; i++) { | 128 | for (var i = 0; i < $scope.cisternas.length; i++) { |
129 | var descarga = $scope.cisternas[i].cisternaCarga.descargar; | 129 | var descarga = $scope.cisternas[i].cisternaCarga.descargar; |
130 | var hojaRutaMovimientos = []; | 130 | var hojaRutaMovimientos = []; |
131 | var cisternaMovimientos = []; | 131 | var cisternaMovimientos = []; |
132 | var cisternaCargas = []; | 132 | var cisternaCargas = []; |
133 | var cisternaCarga = $scope.cisternas[i].cisternaCarga; | 133 | var cisternaCarga = $scope.cisternas[i].cisternaCarga; |
134 | if (!descarga) continue; | 134 | if (!descarga) continue; |
135 | cisternaCarga.cantidad -= descarga; | 135 | cisternaCarga.cantidad -= descarga; |
136 | 136 | ||
137 | //Guardar | 137 | //Guardar |
138 | var now = new Date(); | 138 | var now = new Date(); |
139 | var cisternaMovimiento = { | 139 | var cisternaMovimiento = { |
140 | fecha: now.toISOString().slice(0, 19).replace('T', ' '), | 140 | fecha: now.toISOString().slice(0, 19).replace('T', ' '), |
141 | cantidad: descarga, | 141 | cantidad: descarga, |
142 | metodo: 'descarga', | 142 | metodo: 'descarga', |
143 | idCisternaCarga: cisternaCarga.id, | 143 | idCisternaCarga: cisternaCarga.id, |
144 | idRemito: idRemito | 144 | idRemito: idRemito |
145 | }; | 145 | }; |
146 | var hojaRutaMovimiento = { | 146 | var hojaRutaMovimiento = { |
147 | reciboDescarga: $scope.nroRecibo, | 147 | reciboDescarga: $scope.nroRecibo, |
148 | idRemito: idRemito | 148 | idRemito: idRemito |
149 | }; | 149 | }; |
150 | 150 | ||
151 | cisternaCarga = angular.copy($scope.cisternas[i].cisternaCarga); | 151 | cisternaCarga = angular.copy($scope.cisternas[i].cisternaCarga); |
152 | 152 | ||
153 | delete cisternaCarga.articulo; | 153 | delete cisternaCarga.articulo; |
154 | delete cisternaCarga.descargar; | 154 | delete cisternaCarga.descargar; |
155 | cisternaCargas.push(cisternaCarga); | 155 | cisternaCargas.push(cisternaCarga); |
156 | cisternaMovimientos.push(cisternaMovimiento); | 156 | cisternaMovimientos.push(cisternaMovimiento); |
157 | hojaRutaMovimientos.push(hojaRutaMovimiento); | 157 | hojaRutaMovimientos.push(hojaRutaMovimiento); |
158 | } | 158 | } |
159 | var save = { | 159 | var save = { |
160 | cisternaCargas: cisternaCargas, | 160 | cisternaCargas: cisternaCargas, |
161 | cisternaMovimientos: cisternaMovimientos, | 161 | cisternaMovimientos: cisternaMovimientos, |
162 | hojaRutaMovimientos: hojaRutaMovimientos, | 162 | hojaRutaMovimientos: hojaRutaMovimientos, |
163 | articulo: $scope.articuloSeleccionado | 163 | articulo: $scope.articuloSeleccionado |
164 | }; | 164 | }; |
165 | focaModalDetalleHojaRutaService | 165 | focaModalDetalleHojaRutaService |
166 | .postMovimientoHojaRuta(save) | 166 | .postMovimientoHojaRuta(save) |
167 | .then(guardarSeguimiento) | 167 | .then(guardarSeguimiento) |
168 | .catch(function () { }); | 168 | .catch(function () { }); |
169 | function guardarSeguimiento(res) { | 169 | function guardarSeguimiento(res) { |
170 | focaSeguimientoService | 170 | focaSeguimientoService |
171 | .guardarPosicion( | 171 | .guardarPosicion( |
172 | 'Entrega de producto', | 172 | 'Entrega de producto', |
173 | res.data[0].id, | 173 | res.data[0].id, |
174 | ''); | 174 | ''); |
175 | $scope.aDescargar = []; | 175 | $scope.aDescargar = []; |
176 | }; | 176 | }; |
177 | }; | 177 | }; |
178 | function getImporte(propiedad) { | 178 | function getImporte(propiedad) { |
179 | var importe = 0; | 179 | var importe = 0; |
180 | $scope.remito.articulosRemito.forEach(function (articulo) { | 180 | $scope.remito.articulosRemito.forEach(function (articulo) { |
181 | if (articulo[propiedad]) { | 181 | if (articulo[propiedad]) { |
182 | importe += articulo[propiedad] * articulo.cantidad; | 182 | importe += articulo[propiedad] * articulo.cantidad; |
183 | } | 183 | } |
184 | return; | 184 | return; |
185 | }); | 185 | }); |
186 | return importe; | 186 | return importe; |
187 | }; | 187 | }; |
188 | function validarDescarga() { | 188 | function validarDescarga() { |
189 | 189 | ||
190 | if ($scope.nroRemito > 99999999) { | 190 | if ($scope.nroRemito > 99999999) { |
191 | focaModalService.alert('Numero remito mayor al permitido máximo 8'); | 191 | focaModalService.alert('Numero remito mayor al permitido máximo 8'); |
192 | return true; | 192 | return true; |
193 | } | 193 | } |
194 | 194 | ||
195 | if ($scope.nroSucursal > 9999) { | 195 | if ($scope.nroSucursal > 9999) { |
196 | focaModalService.alert('Numero sucursal mayor a la permitida máximo 4'); | 196 | focaModalService.alert('Numero sucursal mayor a la permitida máximo 4'); |
197 | return true; | 197 | return true; |
198 | } | 198 | } |
199 | 199 | ||
200 | for (var i = 0; i < $scope.cisternas.length; i++) { | 200 | for (var i = 0; i < $scope.cisternas.length; i++) { |
201 | if (parseInt($scope.cisternas[i].cisternaCarga.descargar) > | 201 | if (parseInt($scope.cisternas[i].cisternaCarga.descargar) > |
202 | $scope.cisternas[i].cisternaCarga.cantidad || | 202 | $scope.cisternas[i].cisternaCarga.cantidad || |
203 | parseInt($scope.cisternas[i].cisternaCarga.descargar) < 0) { | 203 | parseInt($scope.cisternas[i].cisternaCarga.descargar) < 0) { |
204 | focaModalService.alert("Cantidad de descarga ingresada erronea"); | 204 | focaModalService.alert("Cantidad de descarga ingresada erronea"); |
205 | return true; | 205 | return true; |
206 | } | 206 | } |
207 | } | 207 | } |
208 | return false; | 208 | return false; |
209 | }; | 209 | }; |
210 | $scope.seleccionarCliente = function () { | 210 | $scope.seleccionarCliente = function () { |
211 | var modalInstance = $uibModal.open( | 211 | var modalInstance = $uibModal.open( |
212 | { | 212 | { |
213 | ariaLabelledBy: 'Busqueda de Cliente', | 213 | ariaLabelledBy: 'Busqueda de Cliente', |
214 | templateUrl: 'foca-busqueda-cliente-modal.html', | 214 | templateUrl: 'foca-busqueda-cliente-modal.html', |
215 | controller: 'focaBusquedaClienteModalController', | 215 | controller: 'focaBusquedaClienteModalController', |
216 | resolve: { | 216 | resolve: { |
217 | vendedor: function () { return null; }, | 217 | vendedor: function () { return null; }, |
218 | cobrador: function () { return null; } | 218 | cobrador: function () { return null; } |
219 | }, | 219 | }, |
220 | size: 'lg' | 220 | size: 'lg' |
221 | } | 221 | } |
222 | ); | 222 | ); |
223 | modalInstance.result.then(function (cliente) { | 223 | modalInstance.result.then(function (cliente) { |
224 | $scope.remito.cliente = cliente; | 224 | $scope.remito.cliente = cliente; |
225 | }, function () { | 225 | }, function () { |
226 | //funcion ejecutada al cancelar modal | 226 | //funcion ejecutada al cancelar modal |
227 | }); | 227 | }); |
228 | }; | 228 | }; |
229 | $scope.validateSucursalRemito = function (sucursal, remito) { | 229 | $scope.validateSucursalRemito = function (sucursal, remito) { |
230 | if (!sucursal || !remito) { | 230 | if (!sucursal || !remito) { |
231 | $scope.hasErrorSucursalRemito = false; | 231 | $scope.hasErrorSucursalRemito = false; |
232 | return; | 232 | return; |
233 | } | 233 | } |
234 | 234 | ||
235 | focaModalDescargasService.validarSucursalRemito(sucursal, remito) | 235 | focaModalDescargasService.validarSucursalRemito(sucursal, remito) |
236 | .then(function (res) { | 236 | .then(function (res) { |
237 | if (res.data.data === 1) { | 237 | if (res.data.data === 1) { |
238 | $scope.hasErrorSucursalRemito = true; | 238 | $scope.hasErrorSucursalRemito = true; |
239 | } else { | 239 | } else { |
240 | $scope.hasErrorSucursalRemito = false; | 240 | $scope.hasErrorSucursalRemito = false; |
241 | } | 241 | } |
242 | }) | 242 | }) |
243 | .catch(function (e) { console.error(e); }); | 243 | .catch(function (e) { console.error(e); }); |
244 | }; | 244 | }; |
245 | $scope.cancelar = function () { | 245 | $scope.cancelar = function () { |
246 | $uibModalInstance.dismiss(); | 246 | $uibModalInstance.dismiss(); |
247 | }; | 247 | }; |
248 | function rellenar(relleno, longitud) { | 248 | function rellenar(relleno, longitud) { |
249 | relleno = '' + relleno; | 249 | relleno = '' + relleno; |
250 | while (relleno.length < longitud) { | 250 | while (relleno.length < longitud) { |
251 | relleno = '0' + relleno; | 251 | relleno = '0' + relleno; |
252 | } | 252 | } |
253 | return relleno; | 253 | return relleno; |
254 | }; | 254 | }; |
255 | } | 255 | } |
256 | ]); | 256 | ]); |
257 | 257 |
src/js/service.js
1 | angular.module('focaModalDescarga') | 1 | angular.module('focaModalDescarga') |
2 | .factory('focaModalDescargasService', ['$http', 'API_ENDPOINT', 'crearRemitoService', | 2 | .factory('focaModalDescargasService', ['$http', 'API_ENDPOINT', 'crearRemitoService', |
3 | function ($http, API_ENDPOINT, crearRemitoService) { | 3 | function ($http, API_ENDPOINT, crearRemitoService) { |
4 | var route = API_ENDPOINT.URL; | 4 | var route = API_ENDPOINT.URL; |
5 | return { | 5 | return { |
6 | crearRemito: function (remito) { | 6 | crearRemito: function (remito) { |
7 | return $http.post(route + '/remito/mobile', remito); | 7 | return $http.post(route + '/remito/guardar/mobile', remito); |
8 | }, | 8 | }, |
9 | validarSucursalRemito: function (sucursal, remito) { | 9 | validarSucursalRemito: function (sucursal, remito) { |
10 | return $http.get(route + '/remito/validar/' + | 10 | return $http.get(route + '/remito/validar/' + |
11 | sucursal + '/' + remito); | 11 | sucursal + '/' + remito); |
12 | }, | 12 | }, |
13 | addArticulos: function (articulosRemito, articulosBase, idRemito, cotizacion) { | 13 | addArticulos: function (articulosRemito, articulosBase, idRemito, cotizacion) { |
14 | 14 | ||
15 | for (var i = 0; i < articulosRemito.length; i++) { | 15 | for (var i = 0; i < articulosRemito.length; i++) { |
16 | 16 | ||
17 | var articuloReferencia = articulosBase.filter(function (articulo) { | 17 | var articuloReferencia = articulosBase.filter(function (articulo) { |
18 | return articulosRemito[i].idArticulo == articulo.id; | 18 | return articulosRemito[i].idArticulo == articulo.id; |
19 | })[0]; | 19 | })[0]; |
20 | 20 | ||
21 | delete articulosRemito[i].id | 21 | delete articulosRemito[i].id |
22 | delete articulosRemito[i].editCantidad; | 22 | delete articulosRemito[i].editCantidad; |
23 | delete articulosRemito[i].editPrecio; | 23 | delete articulosRemito[i].editPrecio; |
24 | 24 | ||
25 | articulosRemito[i].idRemito = articulosRemito[i].idRemito !== -1 ? | 25 | articulosRemito[i].idRemito = articulosRemito[i].idRemito !== -1 ? |
26 | idRemito : articulosRemito[i].idRemito; | 26 | idRemito : articulosRemito[i].idRemito; |
27 | 27 | ||
28 | articulosRemito[i].precio = articuloReferencia.PreVen * cotizacion; | 28 | articulosRemito[i].precio = articuloReferencia.PreVen * cotizacion; |
29 | articulosRemito[i].cantidad = articuloReferencia.cantidad; | 29 | articulosRemito[i].cantidad = articuloReferencia.cantidad; |
30 | articulosRemito[i].cantidadDescargada = articuloReferencia.cantidad; | 30 | articulosRemito[i].cantidadDescargada = articuloReferencia.cantidad; |
31 | 31 | ||
32 | delete articulosRemito[i].idNotaPedido; | 32 | delete articulosRemito[i].idNotaPedido; |
33 | crearRemitoService.crearArticulosParaRemito(articulosRemito[i]); | 33 | crearRemitoService.crearArticulosParaRemito(articulosRemito[i]); |
34 | } | 34 | } |
35 | } | 35 | } |
36 | }; | 36 | }; |
37 | }]); | 37 | }]); |
38 | 38 |