From 0dcda12c018afdc3d70a2125798e35e0ea7bcb28 Mon Sep 17 00:00:00 2001 From: Mikhail Trubnikov Date: Fri, 2 Aug 2024 15:25:43 +1000 Subject: [PATCH] =?UTF-8?q?fix(esppScheduleSync):=20=D0=BF=D1=80=D0=B8=20?= =?UTF-8?q?=D0=B0=D0=B2=D1=82=D0=BE=D1=80=D0=B0=D1=81=D0=BF=D1=80=D0=B5?= =?UTF-8?q?=D0=B4=D0=B5=D0=BB=D0=B5=D0=BD=D0=B8=D0=B8=20=D0=BF=D0=BE=20?= =?UTF-8?q?=D0=BC=D0=B5=D1=81=D1=8F=D1=86=D1=83,=20=D0=B4=D0=B0=D1=82?= =?UTF-8?q?=D0=B0=20=D0=BC=D0=B5=D1=81=D1=8F=D1=86=D0=B0=20=D1=82=D0=B5?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D1=8C=20=D0=B1=D0=B5=D1=80=D0=B5=D1=82=D1=81?= =?UTF-8?q?=D1=8F=20=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=D1=8C=D0=BD=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PARR.EsppScheduleSync/ScheduleSyncher.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/PARR.EsppScheduleSync/ScheduleSyncher.cs b/PARR.EsppScheduleSync/ScheduleSyncher.cs index 9c3513c0..c3024861 100644 --- a/PARR.EsppScheduleSync/ScheduleSyncher.cs +++ b/PARR.EsppScheduleSync/ScheduleSyncher.cs @@ -139,7 +139,15 @@ namespace PARR.EsppScheduleSync esppObject.Dayofweek = esppSchedule.Values.First(t => t.Order == 0).Value.EsppExportValue; break; case EsppSchTypeScheduleEnum.Monthly: - esppObject.Dayofmonth = esppSchedule.Values.First(t => t.Order == 0).Value.EsppExportValue; + //если включено автораспределение, подставляем дату месяца из NextRun + if (template.ApplicationsInWork?.IsAutoDistributionEnabled == true) + { + esppObject.Dayofmonth = template.NextRun.Day.ToString(); + } + else + { + esppObject.Dayofmonth = esppSchedule.Values.First(t => t.Order == 0).Value.EsppExportValue; + } break; case EsppSchTypeScheduleEnum.Monthly2: esppObject.Md1 = esppSchedule.Values.First(t => t.Order == 0).Value.EsppExportValue;