From d7a7e22e5a57c9ea9c3c36723d8f3cb84842f03f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Mon, 17 Jun 2024 21:16:46 +0200 Subject: [PATCH] Fixed lessThanDesired Constraint for postgresql --- .../Filters/Constraints/Part/LessThanDesiredConstraint.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DataTables/Filters/Constraints/Part/LessThanDesiredConstraint.php b/src/DataTables/Filters/Constraints/Part/LessThanDesiredConstraint.php index 87292106..eb96ad33 100644 --- a/src/DataTables/Filters/Constraints/Part/LessThanDesiredConstraint.php +++ b/src/DataTables/Filters/Constraints/Part/LessThanDesiredConstraint.php @@ -48,9 +48,9 @@ class LessThanDesiredConstraint extends BooleanConstraint //If value is true, we want to filter for parts with stock < desired stock if ($this->value) { - $queryBuilder->andHaving( $this->property . ' < minamount'); + $queryBuilder->andHaving( $this->property . ' < part.minamount'); } else { - $queryBuilder->andHaving($this->property . ' >= minamount'); + $queryBuilder->andHaving($this->property . ' >= part.minamount'); } } }