From: fomichev Date: Wed, 29 Jan 2025 10:53:08 +0000 (+0300) Subject: Не начисляем бонусы тестовым телефонам X-Git-Tag: 1.7~28^2 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=77f5d22349b6c4edcdea82c7b84fad4721e3abba;p=erp24_rep%2Fyii-erp24%2F.git Не начисляем бонусы тестовым телефонам --- diff --git a/erp24/commands/CronController.php b/erp24/commands/CronController.php index 31bc4dfc..707ad91a 100644 --- a/erp24/commands/CronController.php +++ b/erp24/commands/CronController.php @@ -420,7 +420,11 @@ class CronController extends Controller ->andWhere(['tip_sale' => 'target']) ->andWhere(['date_start' => $kogortDate]) ->column(); + $testPhones = array_map('trim', explode(',', $messagesSettings->test_phones_list)); foreach ($kogortPhones as $key => $phone) { + if (in_array($phone, $testPhones)) { + continue; + } if (!in_array($phone, $userBonusExist)) { $userBonus4 = new UsersBonus(); $userBonus4->phone = '' . $phone;