feat: [finance] 경비계정 동기화에 증빙번호(receipt_no) 지원 추가
- StoreManualJournalRequest/UpdateJournalRequest에 receipt_no 필드 추가 - GeneralJournalEntryService: store/update 시 receipt_no 전달 - JournalSyncService: saveForSource에 receiptNo 파라미터 추가 - SyncsExpenseAccounts: 증빙번호 결정 우선순위 (명시 전달 > 바로빌 승인번호 > null) - SOURCE_BAROBILL_CARD를 카드결제 payment_method에 추가 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -33,10 +33,11 @@ public function saveForSource(
|
||||
string $entryDate,
|
||||
?string $description,
|
||||
array $rows,
|
||||
?string $receiptNo = null,
|
||||
): JournalEntry {
|
||||
$tenantId = $this->tenantId();
|
||||
|
||||
return DB::transaction(function () use ($sourceType, $sourceKey, $entryDate, $description, $rows, $tenantId) {
|
||||
return DB::transaction(function () use ($sourceType, $sourceKey, $entryDate, $description, $rows, $tenantId, $receiptNo) {
|
||||
// 기존 전표가 있으면 삭제 후 재생성 (교체 방식)
|
||||
$existing = JournalEntry::query()
|
||||
->where('tenant_id', $tenantId)
|
||||
@@ -96,7 +97,7 @@ public function saveForSource(
|
||||
}
|
||||
|
||||
// expense_accounts 동기화 (복리후생비/접대비 → CEO 대시보드)
|
||||
$this->syncExpenseAccounts($entry);
|
||||
$this->syncExpenseAccounts($entry, $receiptNo);
|
||||
|
||||
return $entry->load('lines');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user