From: Aleksey Filippov Date: Tue, 24 Feb 2026 19:12:23 +0000 (+0300) Subject: Изменение формирования списка файлов на удаление до одного месяца. Старше одного... X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=fe09f9baff32d1026248c62cfe68516a3bf5e4ee;p=erp24_rep%2Fyii-erp24%2F.git Изменение формирования списка файлов на удаление до одного месяца. Старше одного месяца файлы удаляются. --- diff --git a/erp24/commands/WriteOffsAttachmentsController.php b/erp24/commands/WriteOffsAttachmentsController.php index 089161ff..23a87113 100644 --- a/erp24/commands/WriteOffsAttachmentsController.php +++ b/erp24/commands/WriteOffsAttachmentsController.php @@ -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(), ]; diff --git a/erp24/records/WriteOffsErp.php b/erp24/records/WriteOffsErp.php index e9f73daf..5a10637e 100644 --- a/erp24/records/WriteOffsErp.php +++ b/erp24/records/WriteOffsErp.php @@ -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])