This commit is contained in:
Dauren777 2026-06-19 07:09:25 +00:00
parent e565872b3a
commit 7102e17912

View File

@ -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 {