]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Правки по константам и статусам fezture_fomichev_erp-264_send_waybill_write_offs
authorfomichev <vladimir.fomichev@erp-flowers.ru>
Wed, 18 Dec 2024 07:30:51 +0000 (10:30 +0300)
committerfomichev <vladimir.fomichev@erp-flowers.ru>
Wed, 18 Dec 2024 07:30:51 +0000 (10:30 +0300)
erp24/api2/controllers/DataController.php
erp24/records/WaybillWriteOffs.php

index 4297befe2b750525286037e56d7199b5b972c414..7958046eb643b539bcd547bbfc2f9dd03f60998c 100644 (file)
@@ -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();
 
index 025e809e018aaaf451e19cf51075b51ab2e99039..227433029afee2447d6e4ef27cd3f86c994f6ecd 100644 (file)
@@ -34,7 +34,7 @@ use yii_app\helpers\DataHelper;
  */
 class WaybillWriteOffs extends \yii\db\ActiveRecord
 {
-    public const STATUS_NEW = 1;
+
 
     /**
      * {@inheritdoc}