From f979bffcaed5ff82a0d891cde9768ce1fc07dca7 Mon Sep 17 00:00:00 2001 From: fomichev Date: Wed, 18 Dec 2024 10:30:51 +0300 Subject: [PATCH] =?utf8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=BF?= =?utf8?q?=D0=BE=20=D0=BA=D0=BE=D0=BD=D1=81=D1=82=D0=B0=D0=BD=D1=82=D0=B0?= =?utf8?q?=D0=BC=20=D0=B8=20=D1=81=D1=82=D0=B0=D1=82=D1=83=D1=81=D0=B0?= =?utf8?q?=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/api2/controllers/DataController.php | 4 ++-- erp24/records/WaybillWriteOffs.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erp24/api2/controllers/DataController.php b/erp24/api2/controllers/DataController.php index 4297befe..7958046e 100644 --- a/erp24/api2/controllers/DataController.php +++ b/erp24/api2/controllers/DataController.php @@ -242,7 +242,7 @@ class DataController extends BaseController { try { $waybillWriteOffsErp = WaybillWriteOffs::find()->where(['in', 'id', $waybillWriteOffIds])->all(); foreach ($waybillWriteOffsErp as $waybillWriteOffsErpElem) { - $waybillWriteOffsErpElem->status = 3; + $waybillWriteOffsErpElem->status = WriteOffsErp::STATUS_SEND; $waybillWriteOffsErpElem->error_text = ''; $waybillWriteOffsErpElem->send_at = date('Y-m-d H:i:s'); $waybillWriteOffsErpElem->save(); @@ -358,7 +358,7 @@ class DataController extends BaseController { 'quantity', 'summ' ]) - ->where(['status' => WaybillWriteOffs::STATUS_NEW]) + ->where(['status' => WriteOffsErp::STATUS_CONFIRM]) ->asArray() ->all(); diff --git a/erp24/records/WaybillWriteOffs.php b/erp24/records/WaybillWriteOffs.php index 025e809e..22743302 100644 --- a/erp24/records/WaybillWriteOffs.php +++ b/erp24/records/WaybillWriteOffs.php @@ -34,7 +34,7 @@ use yii_app\helpers\DataHelper; */ class WaybillWriteOffs extends \yii\db\ActiveRecord { - public const STATUS_NEW = 1; + /** * {@inheritdoc} -- 2.39.5