From 7102e179128e690947119fc42b7a66e3cbb40c20 Mon Sep 17 00:00:00 2001 From: Dauren777 Date: Fri, 19 Jun 2026 07:09:25 +0000 Subject: [PATCH] v9 --- index.html | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index a61e3b5..18398a9 100644 --- a/index.html +++ b/index.html @@ -314,12 +314,22 @@ function calculateBonus() { recalculatedSalary = Math.round((worker.salary / daysInMonth) * daysAfterProbation * 100) / 100; } + // Generate detailed note + let note = ''; + if (isExcluded) { + note = `Исключен: Испытательный срок до ${formatDate(probationEndDate.toISOString().split('T')[0])}`; + } else { + const probEndFormatted = formatDate(probationEndDate.toISOString().split('T')[0]); + note = `Пересчет с ${probEndFormatted}: факт.дни ${includedDays} из ${worker.workedDays}, оклад ${recalculatedSalary.toLocaleString('ru-RU')}₸ из ${worker.salary.toLocaleString('ru-RU')}₸`; + } + results.push({ ...worker, isExcluded, includedDays, recalculatedSalary, excludedReason, + note, probationEndDate: formatDate(probationEndDate.toISOString().split('T')[0]), daysAfterProbation: isExcluded ? 0 : (probationEndDate <= reportStartDate ? daysInMonth : daysInMonth - probationEndDate.getDate() + 1) }); @@ -409,12 +419,12 @@ function exportToExcel() { if (result) { if (result.isExcluded) { - row.push(0, 0, `Исключен: ${result.excludedReason}`); + row.push(0, 0, result.note); } else { row.push( result.includedDays, result.recalculatedSalary, - `Пересчет с ${result.probationEndDate}` + result.note ); } } else {