lvhao пре 5 дана
родитељ
комит
7a4662b959
1 измењених фајлова са 5 додато и 5 уклоњено
  1. 5 5
      core/CoreApp/controllers/Specialstock.php

+ 5 - 5
core/CoreApp/controllers/Specialstock.php

@@ -795,9 +795,11 @@ class Specialstock extends Start_Controller {
             {
                 $where  .= " and purchase = '$purchase'";
             }
-			if($state)
+			if(isset($state))
             {
-                $where  .= " and state = '$state'";
+				if($state >-1){
+					$where  .= " and state = '$state'";
+				}
             }
 			if($ktime && $jtime)
             {
@@ -982,9 +984,7 @@ class Specialstock extends Start_Controller {
             }
 			if($state)
             {
-                if($state >-1){
-					$where  .= " and state = '$state'";
-				}
+                $where  .= " and state = '$state'";
             }
 			if($ktime && $jtime)
             {