修正
This commit is contained in:
@@ -1783,14 +1783,18 @@
|
||||
// 源泉税控除対象人数を計算(給与と同じロジック)
|
||||
const bDependentCount = employee.dependents
|
||||
? employee.dependents.filter((d) => {
|
||||
if (d.valid_to && new Date(d.valid_to) < new Date()) return false;
|
||||
if (d.valid_to && new Date(d.valid_to) < new Date())
|
||||
return false;
|
||||
if (!d.birth_date) return false;
|
||||
const birthDate = new Date(d.birth_date);
|
||||
const targetYear = bonus.bonus_year;
|
||||
const yearEnd = new Date(targetYear, 11, 31);
|
||||
let age = yearEnd.getFullYear() - birthDate.getFullYear();
|
||||
const monthDiff = yearEnd.getMonth() - birthDate.getMonth();
|
||||
if (monthDiff < 0 || (monthDiff === 0 && yearEnd.getDate() < birthDate.getDate())) {
|
||||
if (
|
||||
monthDiff < 0 ||
|
||||
(monthDiff === 0 && yearEnd.getDate() < birthDate.getDate())
|
||||
) {
|
||||
age--;
|
||||
}
|
||||
return age >= 16;
|
||||
@@ -1969,10 +1973,10 @@
|
||||
<div class="form-group">
|
||||
<label>賞与種別</label>
|
||||
<select name="bonus_type">
|
||||
<option value="夏季賞与" ${bonus.bonus_type === '夏季賞与' ? 'selected' : ''}>夏季賞与</option>
|
||||
<option value="冬季賞与" ${bonus.bonus_type === '冬季賞与' ? 'selected' : ''}>冬季賞与</option>
|
||||
<option value="決算賞与" ${bonus.bonus_type === '決算賞与' ? 'selected' : ''}>決算賞与</option>
|
||||
<option value="その他" ${bonus.bonus_type === 'その他' ? 'selected' : ''}>その他</option>
|
||||
<option value="夏季賞与" ${bonus.bonus_type === "夏季賞与" ? "selected" : ""}>夏季賞与</option>
|
||||
<option value="冬季賞与" ${bonus.bonus_type === "冬季賞与" ? "selected" : ""}>冬季賞与</option>
|
||||
<option value="決算賞与" ${bonus.bonus_type === "決算賞与" ? "selected" : ""}>決算賞与</option>
|
||||
<option value="その他" ${bonus.bonus_type === "その他" ? "selected" : ""}>その他</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2451,7 +2455,7 @@
|
||||
const bonusPaymentDate = bonus.payment_date
|
||||
? (() => {
|
||||
const d = new Date(bonus.payment_date);
|
||||
return `${d.getFullYear()}年${String(d.getMonth()+1).padStart(2,'0')}月${String(d.getDate()).padStart(2,'0')}日`;
|
||||
return `${d.getFullYear()}年${String(d.getMonth() + 1).padStart(2, "0")}月${String(d.getDate()).padStart(2, "0")}日`;
|
||||
})()
|
||||
: `${bonus.bonus_year}年${String(bonus.bonus_month).padStart(2, "0")}月${getLastDayOfMonth(bonus.bonus_year, bonus.bonus_month)}日`;
|
||||
if (currentKey && currentKey !== currentKey_new) {
|
||||
|
||||
Reference in New Issue
Block a user