diff --git a/index.html b/index.html
index cdfe12d..1cf1e78 100644
--- a/index.html
+++ b/index.html
@@ -44,6 +44,7 @@
controller: 'focaModalNotaPedidoController',
size: 'lg',
resolve: {
+ usadoPor: 'remito',
parametroNotaPedido: {
idLista: -1,
cotizacion: 1,
diff --git a/src/js/controller.js b/src/js/controller.js
index eff51a6..d71b881 100644
--- a/src/js/controller.js
+++ b/src/js/controller.js
@@ -5,8 +5,9 @@ angular.module('focaModalNotaPedido')
'$scope',
'$uibModalInstance',
'focaModalNotaPedidoService',
+ 'usadoPor',
function($filter, $scope, $uibModalInstance,
- focaModalNotaPedidoService
+ focaModalNotaPedidoService, usadoPor
) {
$scope.filters = '';
@@ -24,7 +25,7 @@ angular.module('focaModalNotaPedido')
$scope.busquedaPress = function(key) {
if (key === 13) {
$scope.searchLoading = true;
- focaModalNotaPedidoService.getNotasPedido().then(llenarDatos);
+ focaModalNotaPedidoService.getNotasPedido(usadoPor).then(llenarDatos);
}
};
function llenarDatos(res) {
diff --git a/src/js/service.js b/src/js/service.js
index 1520e3d..fe523ff 100644
--- a/src/js/service.js
+++ b/src/js/service.js
@@ -4,8 +4,9 @@ angular.module('focaModalNotaPedido')
'API_ENDPOINT',
function($http, API_ENDPOINT) {
return {
- getNotasPedido: function() {
- return $http.get(API_ENDPOINT.URL + '/nota-pedido/listar/sin-remito');
+ getNotasPedido: function(usadoPor) {
+ sinRemito = usadoPor === 'remito' ? '/sin-remito' : '';
+ return $http.get(API_ENDPOINT.URL + '/nota-pedido/listar' + sinRemito);
}
};
}