From b3a1ac900a6b837b4aa306d1c92282cf8396c961 Mon Sep 17 00:00:00 2001 From: Dauren777 Date: Fri, 19 Jun 2026 07:11:29 +0000 Subject: [PATCH] v10 --- index.html | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 18398a9..caac527 100644 --- a/index.html +++ b/index.html @@ -314,14 +314,17 @@ function calculateBonus() { recalculatedSalary = Math.round((worker.salary / daysInMonth) * daysAfterProbation * 100) / 100; } - // Generate detailed note + // Generate detailed note only for workers with changes let note = ''; + const probEndFormatted = formatDate(probationEndDate.toISOString().split('T')[0]); + if (isExcluded) { - note = `Исключен: Испытательный срок до ${formatDate(probationEndDate.toISOString().split('T')[0])}`; - } else { - const probEndFormatted = formatDate(probationEndDate.toISOString().split('T')[0]); + note = `Исключен: Испытательный срок до ${probEndFormatted}`; + } else if (probationEndDate > reportStartDate) { + // Probation ends during the report month - recalculation happened note = `Пересчет с ${probEndFormatted}: факт.дни ${includedDays} из ${worker.workedDays}, оклад ${recalculatedSalary.toLocaleString('ru-RU')}₸ из ${worker.salary.toLocaleString('ru-RU')}₸`; } + // If probation ended before report month - no note needed results.push({ ...worker,