|
@@ -14,6 +14,7 @@ class ProductoController extends AuthController {
|
|
|
$id = trim($this->req->get("id", ""));
|
|
|
$buscar = trim($this->req->get("q", ""));
|
|
|
$padre = boolval($this->req->get("padre", false));
|
|
|
+ $idPadre = trim($this->req->get("idPadre", ""));
|
|
|
|
|
|
$query = $this->queryInicial;
|
|
|
|
|
@@ -21,6 +22,10 @@ class ProductoController extends AuthController {
|
|
|
$query->andWhere(["id" => $id]);
|
|
|
}
|
|
|
|
|
|
+ if ($idPadre !== "") {
|
|
|
+ $query->andWhere(["idPadre" => $idPadre]);
|
|
|
+ }
|
|
|
+
|
|
|
if ($buscar) {
|
|
|
$query->andWhere([
|
|
|
"OR",
|