From da082259dab97f9563fb9b632b921e99043b67ee Mon Sep 17 00:00:00 2001 From: fomichev Date: Mon, 13 Jan 2025 10:55:56 +0300 Subject: [PATCH] =?utf8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5?= =?utf8?q?=D0=BD=D0=B8=D0=B5=20=D0=B2=D1=8B=D0=B1=D0=BE=D1=80=D0=BA=D0=B8?= =?utf8?q?=20=D0=BD=D0=BE=D0=BC=D0=B5=D1=80=D0=BE=D0=B2=20=D0=B4=D0=BB?= =?utf8?q?=D1=8F=20=D1=82=D0=B0=D1=80=D0=B3=D0=B5=D1=82=20=D0=BA=D0=BE?= =?utf8?q?=D0=B3=D0=BE=D1=80=D1=82=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/records/Users.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erp24/records/Users.php b/erp24/records/Users.php index c68c1ae9..a530a3df 100755 --- a/erp24/records/Users.php +++ b/erp24/records/Users.php @@ -459,6 +459,7 @@ class Users extends \yii\db\ActiveRecord $salesPhone = Sales::find() ->where(new \yii\db\Expression("TO_CHAR(date, 'MM-DD') = :monthDay", [':monthDay' => $monthDay])) + ->andWhere(['not', ['phone' => 0]]) ->distinct('phone') ->select('phone') ->column(); @@ -525,6 +526,7 @@ class Users extends \yii\db\ActiveRecord ->where(['>=', 'date', date('Y-m-d', strtotime("$targetDate -$step1 days"))]) ->andWhere(['<=', 'date', date('Y-m-d', strtotime("$targetDate -$step2 days"))]) ->andWhere(['phone' => $targetPhones]) + ->andWhere(['not', ['phone' => 0]]) ->distinct('phone') ->select('phone') ->column(); @@ -550,6 +552,7 @@ class Users extends \yii\db\ActiveRecord ->where(['>=', 'date', date('Y-m-d', strtotime("$targetDate -$step2 days"))]) ->andWhere(['<=', 'date', date('Y-m-d', strtotime("$targetDate -$step3 days"))]) ->andWhere(['phone' => $whatsappPhones]) + ->andWhere(['not', ['phone' => 0]]) ->distinct('phone') ->select('phone') ->column(); -- 2.39.5