Commit 2e2bc802fce45e61ecc080dec64fb9b84e87d121

Authored by Eric Fernandez
Exists in master

Merge branch 'master' into 'develop'

Master(efernandez)

See merge request !36
src/js/controllerUltimosDespachos.js
1 angular.module('focaCrearFactura') 1 angular.module('focaCrearFactura')
2 .controller('ultimosDespachosController', [ 2 .controller('ultimosDespachosController', [
3 '$filter', 3 '$filter',
4 '$scope', 4 '$scope',
5 '$uibModalInstance', 5 '$uibModalInstance',
6 'crearFacturaService', 6 'crearFacturaService',
7 'parametros', 7 'parametros',
8 function ($filter, $scope, $uibModalInstance, crearFacturaService, parametros) { 8 function ($filter, $scope, $uibModalInstance, crearFacturaService, parametros) {
9 9
10 config(); 10 config();
11 11
12 function config() { 12 function config() {
13 13
14 crearFacturaService.getUltimosDespachos(parametros.planilla).then(function (res) { 14 crearFacturaService.getUltimosDespachos(parametros.planilla).then(function (res) {
15 $scope.productos = res.data; 15 $scope.productos = res.data.slice(1, res.data.length);
16 }); 16 });
17 } 17 }
18 18
19 $scope.aceptar = function (despacho) { 19 $scope.aceptar = function (despacho) {
20 $uibModalInstance.close(despacho); 20 $uibModalInstance.close(despacho);
21 }; 21 };
22 22
23 $scope.cancel = function () { 23 $scope.cancel = function () {
24 $uibModalInstance.dismiss('cancel'); 24 $uibModalInstance.dismiss('cancel');
25 }; 25 };
26 26
27 } 27 }
28 ]); 28 ]);
29 29