Commit 72dd23d3d3dae2cc8af456f3ae0fd5c5a078916d
1 parent
00e6e331a6
Exists in
master
fix pausar con moneda extranjera
Showing
1 changed file
with
9 additions
and
8 deletions
Show diff stats
src/js/controller.js
... | ... | @@ -247,7 +247,15 @@ angular.module('focaCrearNotaPedido').controller('notaPedidoCtrl', |
247 | 247 | } |
248 | 248 | } |
249 | 249 | ); |
250 | - modalInstance.result.then(setearNotaPedido); | |
250 | + modalInstance.result.then(function(notaPedido) { | |
251 | + | |
252 | + notaPedido.articulosNotaPedido.forEach(function (articulo) { | |
253 | + articulo.precio = | |
254 | + (articulo.precio / notaPedido.cotizacion.VENDEDOR).toFixed(4); | |
255 | + }); | |
256 | + | |
257 | + setearNotaPedido(notaPedido); | |
258 | + }); | |
251 | 259 | }; |
252 | 260 | |
253 | 261 | $scope.seleccionarProductos = function () { |
... | ... | @@ -1028,13 +1036,6 @@ angular.module('focaCrearNotaPedido').controller('notaPedidoCtrl', |
1028 | 1036 | }); |
1029 | 1037 | } |
1030 | 1038 | |
1031 | - if ($scope.notaPedido.articulosNotaPedido.length) { | |
1032 | - $scope.notaPedido.articulosNotaPedido.forEach(function (articulo) { | |
1033 | - articulo.precio = | |
1034 | - (articulo.precio / $scope.notaPedido.cotizacion.VENDEDOR).toFixed(4); | |
1035 | - }); | |
1036 | - } | |
1037 | - | |
1038 | 1039 | addArrayCabecera(cabeceras); |
1039 | 1040 | } |
1040 | 1041 |