feat: [payroll] 전표 생성 도움말 모달 추가

- 전표 생성 버튼 옆에 i 도움말 아이콘 버튼 추가
- 분개 구조, 전표일자/번호, 주의사항, 수정/삭제 안내 포함
This commit is contained in:
김보곤
2026-02-28 20:31:15 +09:00
parent baf1fb5ddf
commit 9823945807

View File

@@ -64,6 +64,12 @@ class="inline-flex items-center gap-2 px-4 py-2 bg-indigo-600 hover:bg-indigo-70
</svg>
전표 생성
</button>
<button type="button" onclick="openJournalHelpModal()" title="전표 생성 도움말"
class="inline-flex items-center justify-center w-8 h-8 text-indigo-500 hover:text-indigo-700 hover:bg-indigo-50 rounded-full transition-colors">
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"/>
</svg>
</button>
</div>
</div>
@@ -615,6 +621,182 @@ class="px-5 py-2 text-sm text-gray-700 bg-gray-100 hover:bg-gray-200 rounded-lg
</div>
</div>
</div>
{{-- 전표 생성 도움말 모달 --}}
<div id="journalHelpModal" class="fixed inset-0 z-50 hidden">
<div class="fixed inset-0 bg-black/40" onclick="closeJournalHelpModal()"></div>
<div class="fixed inset-0 flex items-center justify-center p-4 overflow-y-auto">
<div class="bg-white rounded-xl shadow-xl w-full max-w-3xl relative my-8">
{{-- 헤더 --}}
<div class="flex items-center justify-between px-6 py-4 border-b border-gray-200 bg-gradient-to-r from-indigo-600 to-indigo-700 rounded-t-xl">
<div class="flex items-center gap-3">
<div class="w-8 h-8 bg-white/20 rounded-lg flex items-center justify-center">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
</svg>
</div>
<h3 class="text-lg font-semibold text-white">급여 전표 생성 도움말</h3>
</div>
<button type="button" onclick="closeJournalHelpModal()" class="text-white/70 hover:text-white transition-colors">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
</svg>
</button>
</div>
{{-- 본문 --}}
<div class="px-6 py-5 space-y-5 max-h-[70vh] overflow-y-auto">
{{-- 개요 --}}
<div>
<h4 class="text-sm font-semibold text-gray-800 mb-2 flex items-center gap-2">
<span class="w-5 h-5 bg-indigo-100 text-indigo-600 rounded flex items-center justify-center text-xs font-bold">1</span>
전표 생성이란?
</h4>
<p class="text-sm text-gray-600 leading-relaxed">
선택한 /월의 급여 데이터를 합산하여 <strong>일반전표(분개)</strong> 자동으로 생성합니다.
생성된 전표는 <strong>회계관리 > 일반전표입력</strong> 메뉴에서 확인할 있습니다.
</p>
</div>
{{-- 분개 구조 --}}
<div>
<h4 class="text-sm font-semibold text-gray-800 mb-2 flex items-center gap-2">
<span class="w-5 h-5 bg-indigo-100 text-indigo-600 rounded flex items-center justify-center text-xs font-bold">2</span>
분개 구조
</h4>
<div class="overflow-x-auto">
<table class="w-full text-sm border border-gray-200 rounded-lg overflow-hidden">
<thead>
<tr class="bg-gray-50">
<th class="px-3 py-2 text-left text-xs font-semibold text-gray-600 border-b">구분</th>
<th class="px-3 py-2 text-left text-xs font-semibold text-gray-600 border-b">계정과목</th>
<th class="px-3 py-2 text-left text-xs font-semibold text-gray-600 border-b">거래처</th>
<th class="px-3 py-2 text-left text-xs font-semibold text-gray-600 border-b">적요</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-100">
<tr class="bg-blue-50/50">
<td class="px-3 py-2"><span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-blue-100 text-blue-700">차변</span></td>
<td class="px-3 py-2 text-gray-700">801 급여</td>
<td class="px-3 py-2 text-gray-700">임직원</td>
<td class="px-3 py-2 text-gray-500">N월분 급여</td>
</tr>
<tr>
<td class="px-3 py-2"><span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-red-100 text-red-700">대변</span></td>
<td class="px-3 py-2 text-gray-700">207 예수금</td>
<td class="px-3 py-2 text-gray-700">건강보험연금</td>
<td class="px-3 py-2 text-gray-500">국민연금</td>
</tr>
<tr>
<td class="px-3 py-2"><span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-red-100 text-red-700">대변</span></td>
<td class="px-3 py-2 text-gray-700">207 예수금</td>
<td class="px-3 py-2 text-gray-700">건강보험건강</td>
<td class="px-3 py-2 text-gray-500">건강보험</td>
</tr>
<tr>
<td class="px-3 py-2"><span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-red-100 text-red-700">대변</span></td>
<td class="px-3 py-2 text-gray-700">207 예수금</td>
<td class="px-3 py-2 text-gray-700">건강보험건강</td>
<td class="px-3 py-2 text-gray-500">장기요양보험</td>
</tr>
<tr>
<td class="px-3 py-2"><span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-red-100 text-red-700">대변</span></td>
<td class="px-3 py-2 text-gray-700">207 예수금</td>
<td class="px-3 py-2 text-gray-700">건강보험고용</td>
<td class="px-3 py-2 text-gray-500">고용보험</td>
</tr>
<tr>
<td class="px-3 py-2"><span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-red-100 text-red-700">대변</span></td>
<td class="px-3 py-2 text-gray-700">207 예수금</td>
<td class="px-3 py-2 text-gray-700">강서세무서</td>
<td class="px-3 py-2 text-gray-500">N월분 근로소득세</td>
</tr>
<tr>
<td class="px-3 py-2"><span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-red-100 text-red-700">대변</span></td>
<td class="px-3 py-2 text-gray-700">207 예수금</td>
<td class="px-3 py-2 text-gray-700">강서구청</td>
<td class="px-3 py-2 text-gray-500">N월분 지방소득세</td>
</tr>
<tr>
<td class="px-3 py-2"><span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-red-100 text-red-700">대변</span></td>
<td class="px-3 py-2 text-gray-700">205 미지급비용</td>
<td class="px-3 py-2 text-gray-700">임직원</td>
<td class="px-3 py-2 text-gray-500">N월분 급여</td>
</tr>
</tbody>
</table>
</div>
</div>
{{-- 전표일자 & 번호 --}}
<div>
<h4 class="text-sm font-semibold text-gray-800 mb-2 flex items-center gap-2">
<span class="w-5 h-5 bg-indigo-100 text-indigo-600 rounded flex items-center justify-center text-xs font-bold">3</span>
전표일자 번호
</h4>
<ul class="text-sm text-gray-600 space-y-1.5 ml-1">
<li class="flex items-start gap-2">
<span class="text-indigo-400 mt-0.5">&#8226;</span>
<span>전표일자: 선택한 월의 <strong>말일</strong> (: 2 2 28)</span>
</li>
<li class="flex items-start gap-2">
<span class="text-indigo-400 mt-0.5">&#8226;</span>
<span>전표번호: <code class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono">JE-YYYYMMDD-NNN</code> 형식으로 자동 채번</span>
</li>
</ul>
</div>
{{-- 주의사항 --}}
<div>
<h4 class="text-sm font-semibold text-gray-800 mb-2 flex items-center gap-2">
<span class="w-5 h-5 bg-indigo-100 text-indigo-600 rounded flex items-center justify-center text-xs font-bold">4</span>
주의사항
</h4>
<div class="space-y-2">
<div class="flex items-start gap-2 p-3 bg-amber-50 border border-amber-200 rounded-lg">
<svg class="w-4 h-4 text-amber-500 mt-0.5 shrink-0" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"/>
</svg>
<span class="text-sm text-amber-800">동일 월에 <strong>중복 생성 불가</strong> 이미 생성된 전표가 있으면 전표번호와 함께 안내됩니다.</span>
</div>
<div class="flex items-start gap-2 p-3 bg-blue-50 border border-blue-200 rounded-lg">
<svg class="w-4 h-4 text-blue-500 mt-0.5 shrink-0" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"/>
</svg>
<span class="text-sm text-blue-800">공제금액이 <strong>0</strong> 항목은 분개 행에서 자동 제외됩니다.</span>
</div>
<div class="flex items-start gap-2 p-3 bg-green-50 border border-green-200 rounded-lg">
<svg class="w-4 h-4 text-green-500 mt-0.5 shrink-0" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/>
</svg>
<span class="text-sm text-green-800"><strong>차변 = 대변</strong> 균형이 자동 검증됩니다.</span>
</div>
</div>
</div>
{{-- 전표 수정/삭제 안내 --}}
<div>
<h4 class="text-sm font-semibold text-gray-800 mb-2 flex items-center gap-2">
<span class="w-5 h-5 bg-indigo-100 text-indigo-600 rounded flex items-center justify-center text-xs font-bold">5</span>
전표 수정/삭제
</h4>
<p class="text-sm text-gray-600 leading-relaxed">
생성된 전표를 수정하거나 삭제하려면 <strong>회계관리 > 일반전표입력</strong> 메뉴에서 해당 전표를 찾아 처리하세요.
전표 삭제 페이지에서 다시 생성할 있습니다.
</p>
</div>
</div>
{{-- 푸터 --}}
<div class="flex items-center justify-end px-6 py-4 border-t border-gray-200">
<button type="button" onclick="closeJournalHelpModal()"
class="px-5 py-2 text-sm text-gray-700 bg-gray-100 hover:bg-gray-200 rounded-lg transition-colors font-medium">
닫기
</button>
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
@@ -627,6 +809,14 @@ function closePayrollHelpModal() {
document.getElementById('payrollHelpModal').classList.add('hidden');
}
// ===== 전표 생성 도움말 모달 =====
function openJournalHelpModal() {
document.getElementById('journalHelpModal').classList.remove('hidden');
}
function closeJournalHelpModal() {
document.getElementById('journalHelpModal').classList.add('hidden');
}
// ===== 현재 탭 상태 =====
let currentTab = 'list';
const tabLoaded = { list: true, settings: true };