Commit 4e78c16484f7cfe1edb35f41101096a246a3a17a
1 parent
27ccc80230
Exists in
master
lalalan
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
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 |