Commit cb7f840a2295c6104586ac324c7c6ba666483323

Authored by Eric Fernandez
Exists in master

Merge branch 'master' into 'develop'

Master(efernandez)

See merge request !34
src/js/controller.js
... ... @@ -509,7 +509,9 @@ angular.module('focaCrearFactura').controller('facturaController', [
509 509 }
510 510  
511 511 $scope.botoneraProductos.length = 0;
512   - res.data.forEach(function (producto) {
  512 + $scope.topDespachos = res.data[0][0].CID;
  513 +
  514 + res.data.slice(1, res.data.length).forEach(function (producto) {
513 515  
514 516 $scope.botoneraProductos.push({
515 517 label: producto.DetArt,
... ... @@ -699,7 +701,8 @@ angular.module('focaCrearFactura').controller('facturaController', [
699 701 parametros: function () {
700 702 return {
701 703 despachos: producto.despachos,
702   - nombreProducto: producto.DetArt
  704 + nombreProducto: producto.DetArt,
  705 + topDespachos: $scope.topDespachos
703 706 };
704 707 }
705 708 },
src/js/controllerCombustibles.js
... ... @@ -41,6 +41,8 @@ angular.module('focaCrearFactura')
41 41  
42 42 $scope.mangueras.forEach(function (producto) {
43 43  
  44 + producto.despachos.splice(parametros.topDespachos, producto.despachos.length);
  45 +
44 46 producto.despachos.sort(function (a, b) {
45 47 return a.FEC - b.FEC;
46 48 });