This commit is contained in:
admin
2026-05-22 23:05:38 +09:00
parent e8690d130b
commit ebc87f96f9
6 changed files with 1783 additions and 1214 deletions

View File

@@ -10,7 +10,6 @@ html {
} }
@media screen and (max-width: 767px) { @media screen and (max-width: 767px) {
/* ── body 余白を縮小 ── */ /* ── body 余白を縮小 ── */
body { body {
padding: 12px !important; padding: 12px !important;
@@ -18,8 +17,12 @@ html {
} }
/* ── h1・h2 フォントサイズ ── */ /* ── h1・h2 フォントサイズ ── */
h1 { font-size: 1.35rem !important; } h1 {
h2 { font-size: 1.1rem !important; } font-size: 1.35rem !important;
}
h2 {
font-size: 1.1rem !important;
}
/* ================================================================ /* ================================================================
テーブル: 横スクロール テーブル: 横スクロール
@@ -320,5 +323,4 @@ html {
width: 100% !important; width: 100% !important;
box-sizing: border-box !important; box-sizing: border-box !important;
} }
} }

View File

@@ -863,7 +863,19 @@
<div class="search-buttons"> <div class="search-buttons">
<button onclick="searchJournals()">🔍 検索</button> <button onclick="searchJournals()">🔍 検索</button>
<button onclick="printSearchResults()">🖨️ 印刷</button> <button onclick="printSearchResults()">🖨️ 印刷</button>
<button onclick="clearSearchConditions()" style="background: #6c757d; color: white; border: none; padding: 6px 14px; border-radius: 4px; cursor: pointer;">🔄 条件クリア</button> <button
onclick="clearSearchConditions()"
style="
background: #6c757d;
color: white;
border: none;
padding: 6px 14px;
border-radius: 4px;
cursor: pointer;
"
>
🔄 条件クリア
</button>
</div> </div>
</div> </div>
@@ -2830,7 +2842,8 @@
// 複数行フォームへのコピー // 複数行フォームへのコピー
function copyJournalToDetailForm(data) { function copyJournalToDetailForm(data) {
document.getElementById("detailEntryDate").value = data.entry_date; document.getElementById("detailEntryDate").value = data.entry_date;
document.getElementById("detailDescription").value = data.description || ""; document.getElementById("detailDescription").value =
data.description || "";
// 既存行をクリア // 既存行をクリア
document.getElementById("detailLinesTbody").innerHTML = ""; document.getElementById("detailLinesTbody").innerHTML = "";
@@ -2846,10 +2859,14 @@
accountInput.dataset.accountId = acc.account_id; accountInput.dataset.accountId = acc.account_id;
} }
if (Number(line.debit) > 0) { if (Number(line.debit) > 0) {
tr.querySelector(".detail-debit").value = Number(line.debit).toLocaleString(); tr.querySelector(".detail-debit").value = Number(
line.debit,
).toLocaleString();
} }
if (Number(line.credit) > 0) { if (Number(line.credit) > 0) {
tr.querySelector(".detail-credit").value = Number(line.credit).toLocaleString(); tr.querySelector(".detail-credit").value = Number(
line.credit,
).toLocaleString();
} }
if (line.line_description) { if (line.line_description) {
tr.querySelector(".detail-line-memo").value = line.line_description; tr.querySelector(".detail-line-memo").value = line.line_description;
@@ -2927,16 +2944,14 @@
if (kamokuAcc) { if (kamokuAcc) {
document.getElementById("entryAccountInput").value = document.getElementById("entryAccountInput").value =
`${kamokuAcc.account_code} ${kamokuAcc.account_name}`; `${kamokuAcc.account_code} ${kamokuAcc.account_name}`;
document.getElementById( document.getElementById("entryAccountInput").dataset.accountId =
"entryAccountInput", kamokuAcc.account_id;
).dataset.accountId = kamokuAcc.account_id;
} }
if (methodAcc) { if (methodAcc) {
document.getElementById("entryMethodInput").value = document.getElementById("entryMethodInput").value =
`${methodAcc.account_code} ${methodAcc.account_name}`; `${methodAcc.account_code} ${methodAcc.account_name}`;
document.getElementById( document.getElementById("entryMethodInput").dataset.accountId =
"entryMethodInput", methodAcc.account_id;
).dataset.accountId = methodAcc.account_id;
} }
const totalAmount = Number(mainCredit.credit); const totalAmount = Number(mainCredit.credit);
document.getElementById("entryAmount").value = document.getElementById("entryAmount").value =
@@ -2958,16 +2973,14 @@
if (kamokuAcc) { if (kamokuAcc) {
document.getElementById("entryAccountInput").value = document.getElementById("entryAccountInput").value =
`${kamokuAcc.account_code} ${kamokuAcc.account_name}`; `${kamokuAcc.account_code} ${kamokuAcc.account_name}`;
document.getElementById( document.getElementById("entryAccountInput").dataset.accountId =
"entryAccountInput", kamokuAcc.account_id;
).dataset.accountId = kamokuAcc.account_id;
} }
if (methodAcc) { if (methodAcc) {
document.getElementById("entryMethodInput").value = document.getElementById("entryMethodInput").value =
`${methodAcc.account_code} ${methodAcc.account_name}`; `${methodAcc.account_code} ${methodAcc.account_name}`;
document.getElementById( document.getElementById("entryMethodInput").dataset.accountId =
"entryMethodInput", methodAcc.account_id;
).dataset.accountId = methodAcc.account_id;
} }
const totalAmount = Number(mainDebit.debit); const totalAmount = Number(mainDebit.debit);
document.getElementById("entryAmount").value = document.getElementById("entryAmount").value =
@@ -2993,9 +3006,8 @@
).checked = true; ).checked = true;
document.getElementById("entryAccountInput").value = document.getElementById("entryAccountInput").value =
`${kamokuAccD.account_code} ${kamokuAccD.account_name}`; `${kamokuAccD.account_code} ${kamokuAccD.account_name}`;
document.getElementById( document.getElementById("entryAccountInput").dataset.accountId =
"entryAccountInput", kamokuAccD.account_id;
).dataset.accountId = kamokuAccD.account_id;
const methodAcc = accounts.find( const methodAcc = accounts.find(
(a) => a.account_id === mainCredit.account_id, (a) => a.account_id === mainCredit.account_id,
); );
@@ -3025,9 +3037,8 @@
} }
document.getElementById("entryMethodInput").value = document.getElementById("entryMethodInput").value =
`${kamokuAccD.account_code} ${kamokuAccD.account_name}`; `${kamokuAccD.account_code} ${kamokuAccD.account_name}`;
document.getElementById( document.getElementById("entryMethodInput").dataset.accountId =
"entryMethodInput", kamokuAccD.account_id;
).dataset.accountId = kamokuAccD.account_id;
document.getElementById("entryAmount").value = Number( document.getElementById("entryAmount").value = Number(
mainDebit.debit, mainDebit.debit,
).toLocaleString(); ).toLocaleString();

File diff suppressed because it is too large Load Diff

View File

@@ -1783,14 +1783,18 @@
// 源泉税控除対象人数を計算(給与と同じロジック) // 源泉税控除対象人数を計算(給与と同じロジック)
const bDependentCount = employee.dependents const bDependentCount = employee.dependents
? employee.dependents.filter((d) => { ? 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; if (!d.birth_date) return false;
const birthDate = new Date(d.birth_date); const birthDate = new Date(d.birth_date);
const targetYear = bonus.bonus_year; const targetYear = bonus.bonus_year;
const yearEnd = new Date(targetYear, 11, 31); const yearEnd = new Date(targetYear, 11, 31);
let age = yearEnd.getFullYear() - birthDate.getFullYear(); let age = yearEnd.getFullYear() - birthDate.getFullYear();
const monthDiff = yearEnd.getMonth() - birthDate.getMonth(); 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--; age--;
} }
return age >= 16; return age >= 16;
@@ -1969,10 +1973,10 @@
<div class="form-group"> <div class="form-group">
<label>賞与種別</label> <label>賞与種別</label>
<select name="bonus_type"> <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> </select>
</div> </div>
</div> </div>
@@ -2451,7 +2455,7 @@
const bonusPaymentDate = bonus.payment_date const bonusPaymentDate = bonus.payment_date
? (() => { ? (() => {
const d = new Date(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)}`; : `${bonus.bonus_year}${String(bonus.bonus_month).padStart(2, "0")}${getLastDayOfMonth(bonus.bonus_year, bonus.bonus_month)}`;
if (currentKey && currentKey !== currentKey_new) { if (currentKey && currentKey !== currentKey_new) {

View File

@@ -118,16 +118,17 @@
> >
<div class="icon">📄</div> <div class="icon">📄</div>
<h2>源泉徴収票</h2> <h2>源泉徴収票</h2>
<p>給与所得の源泉徴収票を発行します(本人用・区役所用・税務署用 各1部</p> <p>
給与所得の源泉徴収票を発行します(本人用・区役所用・税務署用 各1部
</p>
</div> </div>
<div <div class="menu-card" onclick="location.href = 'nenkin-portal.html'">
class="menu-card"
onclick="location.href = 'nenkin-portal.html'"
>
<div class="icon">📋</div> <div class="icon">📋</div>
<h2>社会保険電子文書</h2> <h2>社会保険電子文書</h2>
<p>日本年金機構からの電子文書(保険料通知・賞与内訳等)を管理します</p> <p>
日本年金機構からの電子文書(保険料通知・賞与内訳等)を管理します
</p>
</div> </div>
</div> </div>

File diff suppressed because it is too large Load Diff