v11
This commit is contained in:
parent
b3a1ac900a
commit
220ad2fcdd
@ -314,17 +314,15 @@ function calculateBonus() {
|
|||||||
recalculatedSalary = Math.round((worker.salary / daysInMonth) * daysAfterProbation * 100) / 100;
|
recalculatedSalary = Math.round((worker.salary / daysInMonth) * daysAfterProbation * 100) / 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate detailed note only for workers with changes
|
// Generate detailed note only for workers with recalculation
|
||||||
let note = '';
|
let note = '';
|
||||||
const probEndFormatted = formatDate(probationEndDate.toISOString().split('T')[0]);
|
const probEndFormatted = formatDate(probationEndDate.toISOString().split('T')[0]);
|
||||||
|
|
||||||
if (isExcluded) {
|
if (!isExcluded && probationEndDate > reportStartDate) {
|
||||||
note = `Исключен: Испытательный срок до ${probEndFormatted}`;
|
|
||||||
} else if (probationEndDate > reportStartDate) {
|
|
||||||
// Probation ends during the report month - recalculation happened
|
// 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
|
// If excluded or probation ended before report month - no note needed
|
||||||
|
|
||||||
results.push({
|
results.push({
|
||||||
...worker,
|
...worker,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user