Ver código fonte

add tester (id=8000)

David 9 anos atrás
pai
commit
bfdc8be063
2 arquivos alterados com 3 adições e 3 exclusões
  1. 1 1
      back/db.py
  2. 2 2
      controllers/editPedidoCtrl.js

+ 1 - 1
back/db.py

@@ -71,7 +71,7 @@ class db():
 		ret=[]
 		if _id is None:
 			cur = self.get_cursor()
-			cur.execute("SELECT id, nombre, precio, stock > 0 as disponible, stock < 25 as low, stock FROM productos where (id between 1000 and 2999 and id not in (1019, 1014, 2014, 1015, 2015, 1047, 2038, 2030)) or (id between 9000 and 9006)")
+			cur.execute("SELECT id, nombre, precio, stock > 0 as disponible, stock < 25 as low, stock FROM productos where (id between 1000 and 2999 and id not in (1019, 1014, 2014, 1015, 2015, 1047, 2038, 2030)) or (id between 9000 and 9006) or id = 8000")
 			for row in cur.fetchall():
 				row["cantidad"]=0
 				ret.append(row)

+ 2 - 2
controllers/editPedidoCtrl.js

@@ -36,8 +36,8 @@ app.controller('editPedidoCtrl', function ($scope, $http, $routeParams, notify,
 		} else {
 
 			$http.get('back/productos/' + $routeParams.hash).success(function(data) {
-				var first = data.filter(function(el) { return el.id < 9000 });
-				var sec = data.filter(function(el) { return el.id >= 9000 });
+				var first = data.filter(function(el) { return el.id < 8000 });
+				var sec = data.filter(function(el) { return el.id >= 8000 });
 		   		$scope.listaproductos = first.sort(function(a,b) {
 					if (a.id % 1000 === b.id % 1000)
 						return (a.id > b.id ? 1 : -1);