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;
|
||||
}
|
||||
|
||||
// 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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user