Commit 19736cccf785976337cc3268868a3d5a930b20e0
Exists in
master
and in
2 other branches
Merge branch 'master' into 'develop'
Master(efernandez) See merge request !105
Showing
1 changed file
Show diff stats
src/js/controller.js
| ... | ... | @@ -277,8 +277,16 @@ angular.module('focaCrearRemito').controller('remitoController', |
| 277 | 277 | resolve: { usadoPor: function () { return 'remito'; } } |
| 278 | 278 | } |
| 279 | 279 | ); |
| 280 | - modalInstance.result.then( | |
| 281 | - setearRemito, function () { | |
| 280 | + modalInstance.result.then(function(remito) { | |
| 281 | + | |
| 282 | + remito.remito.articulosRemito.forEach(function (articulo) { | |
| 283 | + articulo.precio = | |
| 284 | + (articulo.precio / remito.cotizacion.VENDEDOR).toFixed(4); | |
| 285 | + }); | |
| 286 | + | |
| 287 | + setearRemito(remito); | |
| 288 | + | |
| 289 | + }, function () { | |
| 282 | 290 | // funcion ejecutada cuando se cancela el modal |
| 283 | 291 | } |
| 284 | 292 | ); |
| ... | ... | @@ -1203,12 +1211,6 @@ angular.module('focaCrearRemito').controller('remitoController', |
| 1203 | 1211 | } |
| 1204 | 1212 | $scope.remitoIsDirty = false; |
| 1205 | 1213 | |
| 1206 | - if (remito.articulosRemito && $scope.remito.articulosRemito.length) { | |
| 1207 | - $scope.remito.articulosRemito.forEach(function (articulo) { | |
| 1208 | - articulo.precio = | |
| 1209 | - (articulo.precio / $scope.remito.cotizacion.VENDEDOR).toFixed(4); | |
| 1210 | - }); | |
| 1211 | - } | |
| 1212 | 1214 | |
| 1213 | 1215 | addArrayCabecera(cabeceras); |
| 1214 | 1216 | } |