This commit is contained in:
Dauren777 2026-06-19 07:11:29 +00:00
parent 7102e17912
commit b3a1ac900a

View File

@ -314,14 +314,17 @@ function calculateBonus() {
recalculatedSalary = Math.round((worker.salary / daysInMonth) * daysAfterProbation * 100) / 100; recalculatedSalary = Math.round((worker.salary / daysInMonth) * daysAfterProbation * 100) / 100;
} }
// Generate detailed note // Generate detailed note only for workers with changes
let note = ''; let note = '';
if (isExcluded) {
note = `Исключен: Испытательный срок до ${formatDate(probationEndDate.toISOString().split('T')[0])}`;
} else {
const probEndFormatted = formatDate(probationEndDate.toISOString().split('T')[0]); const probEndFormatted = formatDate(probationEndDate.toISOString().split('T')[0]);
if (isExcluded) {
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')}₸`; 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({ results.push({
...worker, ...worker,