Skip to content

Commit

Permalink
Hago consultas por orden de precio, agrego bootstrap. TODO: ordenar p…
Browse files Browse the repository at this point in the history
…or precio total
  • Loading branch information
fede2001 committed Jun 30, 2015
1 parent dc5bcd1 commit aae7009
Show file tree
Hide file tree
Showing 20 changed files with 14,294 additions and 1 deletion.
15 changes: 15 additions & 0 deletions api/controllers/InventarioController.js
Expand Up @@ -10,6 +10,21 @@ module.exports = {
Inventario.find().exec(function(err, item){
res.view('inventario/findall',{inventario : item});
});
},
ordenAlfabetico : function(req,res){
Inventario.find().sort({item:1}).exec(function(err, item){
res.view('inventario/findall',{inventario : item});
});
},
ordenPrecio : function(req,res){
Inventario.find().sort({precio1:-1}).exec(function(err, item){
res.view('inventario/findall',{inventario : item});
});
},
ordenPrecioTotal : function(req,res){
Inventario.find().sort({total:-1}).exec(function(err, item){
res.view('inventario/findall',{inventario : item});
});
},
editarDetalle : function(req, res){
Inventario.findOneById(req.param('id')).exec(function(err, item){
Expand Down

0 comments on commit aae7009

Please sign in to comment.