v9
This commit is contained in:
parent
e565872b3a
commit
7102e17912
14
index.html
14
index.html
@ -314,12 +314,22 @@ function calculateBonus() {
|
|||||||
recalculatedSalary = Math.round((worker.salary / daysInMonth) * daysAfterProbation * 100) / 100;
|
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({
|
results.push({
|
||||||
...worker,
|
...worker,
|
||||||
isExcluded,
|
isExcluded,
|
||||||
includedDays,
|
includedDays,
|
||||||
recalculatedSalary,
|
recalculatedSalary,
|
||||||
excludedReason,
|
excludedReason,
|
||||||
|
note,
|
||||||
probationEndDate: formatDate(probationEndDate.toISOString().split('T')[0]),
|
probationEndDate: formatDate(probationEndDate.toISOString().split('T')[0]),
|
||||||
daysAfterProbation: isExcluded ? 0 : (probationEndDate <= reportStartDate ? daysInMonth : daysInMonth - probationEndDate.getDate() + 1)
|
daysAfterProbation: isExcluded ? 0 : (probationEndDate <= reportStartDate ? daysInMonth : daysInMonth - probationEndDate.getDate() + 1)
|
||||||
});
|
});
|
||||||
@ -409,12 +419,12 @@ function exportToExcel() {
|
|||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
if (result.isExcluded) {
|
if (result.isExcluded) {
|
||||||
row.push(0, 0, `Исключен: ${result.excludedReason}`);
|
row.push(0, 0, result.note);
|
||||||
} else {
|
} else {
|
||||||
row.push(
|
row.push(
|
||||||
result.includedDays,
|
result.includedDays,
|
||||||
result.recalculatedSalary,
|
result.recalculatedSalary,
|
||||||
`Пересчет с ${result.probationEndDate}`
|
result.note
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user