- 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>
40 lines
1.4 KiB
PHP
40 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Requests\V1\GeneralJournalEntry;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class UpdateJournalRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'journal_memo' => ['sometimes', 'nullable', 'string', 'max:1000'],
|
|
'receipt_no' => ['nullable', 'string', 'max:100'],
|
|
'rows' => ['sometimes', 'array', 'min:1'],
|
|
'rows.*.side' => ['required_with:rows', 'in:debit,credit'],
|
|
'rows.*.account_subject_id' => ['required_with:rows', 'string', 'max:10'],
|
|
'rows.*.vendor_id' => ['nullable', 'integer'],
|
|
'rows.*.debit_amount' => ['required_with:rows', 'integer', 'min:0'],
|
|
'rows.*.credit_amount' => ['required_with:rows', 'integer', 'min:0'],
|
|
'rows.*.memo' => ['nullable', 'string', 'max:300'],
|
|
];
|
|
}
|
|
|
|
public function messages(): array
|
|
{
|
|
return [
|
|
'rows.*.side.required_with' => '차/대 구분을 선택하세요.',
|
|
'rows.*.side.in' => '차/대 구분이 올바르지 않습니다.',
|
|
'rows.*.account_subject_id.required_with' => '계정과목을 선택하세요.',
|
|
'rows.*.debit_amount.required_with' => '차변 금액을 입력하세요.',
|
|
'rows.*.credit_amount.required_with' => '대변 금액을 입력하세요.',
|
|
];
|
|
}
|
|
}
|