feat: [corporate-card] 카드분리 기능 추가

- 결제 내역 수정 모달에 카드분리 버튼 추가
- 카드별 배분금액 직접 입력 UI
- 균등 배분 / 비율 배분 / 해제 버튼
- 배분 합계 검증 (일치해야 저장 가능)
- card_splits 데이터 JSON 저장 (기존 items 확장)
- cardDeductions 로직: card_splits 우선 적용, 없으면 기존 비율 배분
This commit is contained in:
김보곤
2026-03-05 23:19:19 +09:00
parent dab120eacd
commit 8cdedae07e
2 changed files with 298 additions and 42 deletions

View File

@@ -278,6 +278,8 @@ public function updatePrepayment(Request $request): JsonResponse
'items.*.date' => 'required|date',
'items.*.amount' => 'required|integer|min:0',
'items.*.description' => 'nullable|string|max:200',
'items.*.card_splits' => 'nullable|array',
'items.*.card_splits.*' => 'integer|min:0',
]);
$tenantId = session('selected_tenant_id', 1);