From: Vladimir Fomichev Date: Wed, 17 Dec 2025 07:07:57 +0000 (+0300) Subject: Сортировки документов и статус X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=626b1925319116dd9820c2eb10b73b1bf7e5c03b;p=erp24_rep%2Fyii-erp24%2F.git Сортировки документов и статус --- diff --git a/erp24/controllers/ReplacementInvoiceController.php b/erp24/controllers/ReplacementInvoiceController.php index beea5132..a130b861 100644 --- a/erp24/controllers/ReplacementInvoiceController.php +++ b/erp24/controllers/ReplacementInvoiceController.php @@ -23,7 +23,7 @@ class ReplacementInvoiceController extends Controller { $dataProvider = new ActiveDataProvider([ 'query' => ReplacementInvoice::find() - ->orderBy('id desc'), + ->orderBy('created_at DESC'), 'pagination' => [ 'pageSize' => 20, ], diff --git a/erp24/controllers/WaybillIncomingController.php b/erp24/controllers/WaybillIncomingController.php index 97d79e7a..147f0d91 100644 --- a/erp24/controllers/WaybillIncomingController.php +++ b/erp24/controllers/WaybillIncomingController.php @@ -11,7 +11,8 @@ class WaybillIncomingController extends Controller { public function actionIndex() { $dataProvider = new ActiveDataProvider([ - 'query' => WaybillIncoming::find(), + 'query' => WaybillIncoming::find() + ->orderBy('created_at DESC'), ]); return $this->render('index', compact('dataProvider')); } diff --git a/erp24/controllers/WaybillWriteOffsController.php b/erp24/controllers/WaybillWriteOffsController.php index 3693ba38..c6a755e3 100644 --- a/erp24/controllers/WaybillWriteOffsController.php +++ b/erp24/controllers/WaybillWriteOffsController.php @@ -11,7 +11,8 @@ class WaybillWriteOffsController extends \yii\web\Controller public function actionIndex() { $dataProvider = new ActiveDataProvider([ - 'query' => WaybillWriteOffs::find(), + 'query' => WaybillWriteOffs::find() + ->orderBy('created_at DESC'), 'pagination' => [ 'pageSize' => 20, ], diff --git a/erp24/records/WriteOffsErp.php b/erp24/records/WriteOffsErp.php index 2ebdce42..e9f73daf 100644 --- a/erp24/records/WriteOffsErp.php +++ b/erp24/records/WriteOffsErp.php @@ -132,7 +132,7 @@ class WriteOffsErp extends \yii\db\ActiveRecord const WRITE_OFFS_TYPE_RESORTING_DOES_NOT_COUNT_TOWARDS_COST = 'Пересорт, не идет в затраты'; public const STATUSES = [ - self::STATUS_CREATED => "Создан", + self::STATUS_CREATED => "Создан в ERP", self::STATUS_CONFIRM => "Одобрен", self::STATUS_SEND => "Отправлен в 1С", self::STATUS_CREATED_1C => "Создан в 1С",