Commit 27167fdf4384d0a7407b8111c492e44abc7e591d

Authored by Eric Fernandez
Exists in master and in 2 other branches develop, lab

Merge branch 'develop' into 'master'

Develop

See merge request !115
src/js/controller.js
... ... @@ -201,11 +201,13 @@ angular.module('focaCrearRemito').controller('remitoController',
201 201  
202 202 function valorPrecioCondicion() {
203 203 if (parseInt(notaPedido.idListaPrecio) > 0) {
204   - crearRemitoService.getListaPrecioById(parseInt(notaPedido.idListaPrecio))
  204 + crearRemitoService
  205 + .getListaPrecioById(parseInt(notaPedido.idListaPrecio))
205 206 .then(function (res) {
206 207 $scope.cabeceras.push({
207 208 label: 'Precios y Condiciones:',
208   - valor: parseInt(res.data[0].ID) + ' - ' + res.data[0].DES + ' ' +
  209 + valor: parseInt(res.data[0].ID) + ' - ' +
  210 + res.data[0].DES + ' ' +
209 211 remitoBusinessService
210 212 .plazoToString(notaPedido.notaPedidoPlazo)
211 213 });
... ... @@ -427,7 +429,7 @@ angular.module('focaCrearRemito').controller('remitoController',
427 429 if ($scope.notaPedido.id !== 0) {
428 430 $scope.idLista = parseInt($scope.notaPedido.idListaPrecio)
429 431 }
430   - if ($scope.remito.idListaPrecio === undefined) {
  432 + if ($scope.idLista === undefined) {
431 433 focaModalService.alert(
432 434 'Primero seleccione una lista de precio y condicion');
433 435 return;
... ... @@ -439,7 +441,7 @@ angular.module('focaCrearRemito').controller('remitoController',
439 441 controller: 'modalBusquedaProductosCtrl',
440 442 resolve: {
441 443 parametroProducto: {
442   - idLista: $scope.idLista || parseInt($scope.remito.idListaPrecio),
  444 + idLista: $scope.idLista,
443 445 cotizacion: $scope.remito.cotizacion.VENDEDOR,
444 446 simbolo: $scope.remito.cotizacion.moneda.SIMBOLO
445 447 }
... ... @@ -1191,6 +1193,7 @@ angular.module('focaCrearRemito').controller('remitoController',
1191 1193 },true);
1192 1194  
1193 1195 });
  1196 + $scope.idLista = parseInt(remito.idListaPrecio);
1194 1197 }
1195 1198 }
1196 1199  
... ... @@ -131,7 +131,7 @@ angular.module('focaCrearRemito')
131 131 ];
132 132 },
133 133 eliminarRemito: function (remito) {
134   - return $http.post(API_ENDPOINT.URL + '/remito/update', {remito: remito});
  134 + return $http.delete(API_ENDPOINT.URL + '/remito/anular/' + remito.id);
135 135 }
136 136 };
137 137 }]);