From: fomichev Date: Wed, 18 Dec 2024 07:30:51 +0000 (+0300) Subject: Правки по константам и статусам X-Git-Tag: 1.7~151^2~4 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=f979bffcaed5ff82a0d891cde9768ce1fc07dca7;p=erp24_rep%2Fyii-erp24%2F.git Правки по константам и статусам --- 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}