Commit 4aa13a42e362330e984bf7f2a2b1f83017d3c490
Exists in
master
Merge branch 'master' into 'develop'
Master(efernandez) See merge request !80
Showing
3 changed files
Show diff stats
src/js/controller.js
| ... | ... | @@ -101,7 +101,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 101 | 101 | articulosNotaPedido: [], |
| 102 | 102 | notaPedidoPlazo: [], |
| 103 | 103 | notaPedidoPuntoDescarga: { |
| 104 | - puntoDescarga: {} | |
| 104 | + puntoDescarga: {} | |
| 105 | 105 | } |
| 106 | 106 | }; |
| 107 | 107 | $scope.idLista = undefined; |
| ... | ... | @@ -736,8 +736,8 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 736 | 736 | for (var i = 0; i < articulosTablaTemp.length; i++) { |
| 737 | 737 | articulosTablaTemp[i].precio = articulosTablaTemp[i].precio * |
| 738 | 738 | $scope.notaPedido.cotizacion.VENDEDOR; |
| 739 | - articulosTablaTemp[i].precio = articulosTablaTemp[i].precio / | |
| 740 | - cotizacion.VENDEDOR; | |
| 739 | + articulosTablaTemp[i].precio = (articulosTablaTemp[i].precio / | |
| 740 | + cotizacion.VENDEDOR).toFixed(4); | |
| 741 | 741 | } |
| 742 | 742 | $scope.notaPedido.articulosNotaPedido = articulosTablaTemp; |
| 743 | 743 | $scope.notaPedido.cotizacion = cotizacion; |
| ... | ... | @@ -967,6 +967,13 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 967 | 967 | }); |
| 968 | 968 | } |
| 969 | 969 | |
| 970 | + if ($scope.notaPedido.articulosNotaPedido.length) { | |
| 971 | + $scope.notaPedido.articulosNotaPedido.forEach(function (articulo) { | |
| 972 | + articulo.precio = | |
| 973 | + (articulo.precio / $scope.notaPedido.cotizacion.VENDEDOR).toFixed(4); | |
| 974 | + }); | |
| 975 | + } | |
| 976 | + | |
| 970 | 977 | addArrayCabecera(cabeceras); |
| 971 | 978 | } |
| 972 | 979 |
src/js/service.js
| ... | ... | @@ -97,7 +97,9 @@ angular.module('focaCrearNotaPedido') |
| 97 | 97 | }, |
| 98 | 98 | getProveedorById: function(id) { |
| 99 | 99 | return $http.get(API_ENDPOINT.URL + '/proveedor/' + id); |
| 100 | + }, | |
| 101 | + getParametros: function() { | |
| 102 | + return $http.get(API_ENDPOINT.URL + '/parametros/' + 'notaPedido') | |
| 100 | 103 | } |
| 101 | - | |
| 102 | 104 | }; |
| 103 | 105 | }]); |
src/views/nota-pedido.html
| ... | ... | @@ -94,7 +94,7 @@ |
| 94 | 94 | ng-model="tmpPrecio" |
| 95 | 95 | class="form-control" |
| 96 | 96 | foca-tipo-input |
| 97 | - min="1" | |
| 97 | + min="0" | |
| 98 | 98 | step="0.0001" |
| 99 | 99 | foca-focus="articulo.editPrecio" |
| 100 | 100 | ng-keypress="editarArticulo($event.keyCode, articulo, tmpCantidad, tmpPrecio);" |
| ... | ... | @@ -163,14 +163,14 @@ |
| 163 | 163 | ng-model="articuloACargar.cantidad" |
| 164 | 164 | foca-focus="!cargando" |
| 165 | 165 | esc-key="resetFilter()" |
| 166 | - ng-keypress="agregarATabla($event.keyCode)" | |
| 166 | + ng-keypress="agregarATabla($event.keyCode)" | |
| 167 | 167 | teclado-virtual |
| 168 | 168 | > |
| 169 | 169 | </td> |
| 170 | 170 | <td class="col text-right"> |
| 171 | 171 | <input |
| 172 | 172 | class="form-control" |
| 173 | - ng-value="articuloACargar.precio | number: 2" | |
| 173 | + ng-value="articuloACargar.precio | number: 4" | |
| 174 | 174 | ng-show="idLista != -1" |
| 175 | 175 | readonly |
| 176 | 176 | > |