feat:홈택스 수동입력 모달에 거래처 상세정보 필드 추가 (종사업장번호, 성명, 주소, 업태, 종목, 이메일)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
김보곤
2026-02-20 10:51:29 +09:00
parent a2c8731937
commit 63dd9bd510
3 changed files with 186 additions and 33 deletions

View File

@@ -1497,8 +1497,22 @@ public function manualStore(Request $request): JsonResponse
'write_date' => 'required|date',
'invoicer_corp_name' => 'nullable|string|max:200',
'invoicer_corp_num' => 'nullable|string|max:20',
'invoicer_ceo_name' => 'nullable|string|max:50',
'invoicer_branch_num' => 'nullable|string|max:10',
'invoicer_address' => 'nullable|string|max:300',
'invoicer_biz_type' => 'nullable|string|max:100',
'invoicer_biz_class' => 'nullable|string|max:100',
'invoicer_email' => 'nullable|string|max:200',
'invoicer_email2' => 'nullable|string|max:200',
'invoicee_corp_name' => 'nullable|string|max:200',
'invoicee_corp_num' => 'nullable|string|max:20',
'invoicee_ceo_name' => 'nullable|string|max:50',
'invoicee_branch_num' => 'nullable|string|max:10',
'invoicee_address' => 'nullable|string|max:300',
'invoicee_biz_type' => 'nullable|string|max:100',
'invoicee_biz_class' => 'nullable|string|max:100',
'invoicee_email' => 'nullable|string|max:200',
'invoicee_email2' => 'nullable|string|max:200',
'supply_amount' => 'required|numeric|min:0',
'tax_amount' => 'nullable|numeric|min:0',
'item_name' => 'nullable|string|max:200',
@@ -1542,8 +1556,22 @@ public function manualStore(Request $request): JsonResponse
'issue_date' => $validated['write_date'],
'invoicer_corp_name' => $validated['invoicer_corp_name'] ?? '',
'invoicer_corp_num' => $validated['invoicer_corp_num'] ?? '',
'invoicer_ceo_name' => $validated['invoicer_ceo_name'] ?? '',
'invoicer_branch_num' => $validated['invoicer_branch_num'] ?? '',
'invoicer_address' => $validated['invoicer_address'] ?? '',
'invoicer_biz_type' => $validated['invoicer_biz_type'] ?? '',
'invoicer_biz_class' => $validated['invoicer_biz_class'] ?? '',
'invoicer_email' => $validated['invoicer_email'] ?? '',
'invoicer_email2' => $validated['invoicer_email2'] ?? '',
'invoicee_corp_name' => $validated['invoicee_corp_name'] ?? '',
'invoicee_corp_num' => $validated['invoicee_corp_num'] ?? '',
'invoicee_ceo_name' => $validated['invoicee_ceo_name'] ?? '',
'invoicee_branch_num' => $validated['invoicee_branch_num'] ?? '',
'invoicee_address' => $validated['invoicee_address'] ?? '',
'invoicee_biz_type' => $validated['invoicee_biz_type'] ?? '',
'invoicee_biz_class' => $validated['invoicee_biz_class'] ?? '',
'invoicee_email' => $validated['invoicee_email'] ?? '',
'invoicee_email2' => $validated['invoicee_email2'] ?? '',
'supply_amount' => $validated['supply_amount'],
'tax_amount' => $taxAmount,
'total_amount' => $totalAmount,
@@ -1597,8 +1625,22 @@ public function manualUpdate(Request $request, int $id): JsonResponse
'write_date' => 'sometimes|date',
'invoicer_corp_name' => 'nullable|string|max:200',
'invoicer_corp_num' => 'nullable|string|max:20',
'invoicer_ceo_name' => 'nullable|string|max:50',
'invoicer_branch_num' => 'nullable|string|max:10',
'invoicer_address' => 'nullable|string|max:300',
'invoicer_biz_type' => 'nullable|string|max:100',
'invoicer_biz_class' => 'nullable|string|max:100',
'invoicer_email' => 'nullable|string|max:200',
'invoicer_email2' => 'nullable|string|max:200',
'invoicee_corp_name' => 'nullable|string|max:200',
'invoicee_corp_num' => 'nullable|string|max:20',
'invoicee_ceo_name' => 'nullable|string|max:50',
'invoicee_branch_num' => 'nullable|string|max:10',
'invoicee_address' => 'nullable|string|max:300',
'invoicee_biz_type' => 'nullable|string|max:100',
'invoicee_biz_class' => 'nullable|string|max:100',
'invoicee_email' => 'nullable|string|max:200',
'invoicee_email2' => 'nullable|string|max:200',
'supply_amount' => 'sometimes|numeric|min:0',
'tax_amount' => 'nullable|numeric|min:0',
'item_name' => 'nullable|string|max:200',
@@ -1615,7 +1657,7 @@ public function manualUpdate(Request $request, int $id): JsonResponse
]);
// nullable 필드 빈 문자열 처리
foreach (['invoicer_corp_name', 'invoicer_corp_num', 'invoicee_corp_name', 'invoicee_corp_num'] as $field) {
foreach (['invoicer_corp_name', 'invoicer_corp_num', 'invoicer_ceo_name', 'invoicer_branch_num', 'invoicer_address', 'invoicer_biz_type', 'invoicer_biz_class', 'invoicer_email', 'invoicer_email2', 'invoicee_corp_name', 'invoicee_corp_num', 'invoicee_ceo_name', 'invoicee_branch_num', 'invoicee_address', 'invoicee_biz_type', 'invoicee_biz_class', 'invoicee_email', 'invoicee_email2'] as $field) {
if (array_key_exists($field, $validated)) {
$validated[$field] = $validated[$field] ?? '';
}