]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Изменение формирования списка файлов на удаление до одного месяца. Старше одного...
authorAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Tue, 24 Feb 2026 19:12:23 +0000 (22:12 +0300)
committerAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Tue, 24 Feb 2026 19:12:23 +0000 (22:12 +0300)
erp24/commands/WriteOffsAttachmentsController.php
erp24/records/WriteOffsErp.php

index 089161fff44509c1a1edab8d20c9d164f1775ebb..23a87113d58299c97cfba387c52e97bc052681fc 100644 (file)
@@ -18,7 +18,7 @@ class WriteOffsAttachmentsController extends Controller
     {
         $data = [
             'generated_at' => date('Y-m-d H:i:s'),
-            'border_date' => date('Y-m-d H:i:s', strtotime('-2 month')),
+            'border_date' => date('Y-m-d H:i:s', strtotime('-1 month')),
             'items' => WriteOffsErp::getAttachmentsOlderThanMonth(),
         ];
 
index e9f73daf66859d758e403622ca39281e007e3710..5a10637e2a02f2303640d953ef95621ceb7599f2 100644 (file)
@@ -875,7 +875,7 @@ class WriteOffsErp extends \yii\db\ActiveRecord
      */
     public static function getAttachmentsOlderThanMonth(?string $borderDate = null): array
     {
-        $borderDate = $borderDate ?: date('Y-m-d H:i:s', strtotime('-2 month'));
+        $borderDate = $borderDate ?: date('Y-m-d H:i:s', strtotime('-1 month'));
 
         $docs = self::find()
             ->andWhere(['status' => self::STATUS_CREATED_1C])
@@ -905,7 +905,7 @@ class WriteOffsErp extends \yii\db\ActiveRecord
      */
     public static function getAttachmentsOlderThanMonthList(?string $borderDate = null): array
     {
-        $borderDate = $borderDate ?: date('Y-m-d H:i:s', strtotime('-2 month'));
+        $borderDate = $borderDate ?: date('Y-m-d H:i:s', strtotime('-1 month'));
 
         $docs = self::find()
             ->andWhere(['status' => self::STATUS_CREATED_1C])