- BadDebt 컨트롤러/서비스 기능 확장 - StockService 재고 조회 로직 개선 - ProcessReceivingRequest 검증 규칙 수정 - Item, Order, CommonCode, Shipment 모델 업데이트 - TodayIssueObserverService 개선 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
36 lines
1.1 KiB
PHP
36 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Requests\V1\Receiving;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class ProcessReceivingRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'receiving_qty' => ['required', 'numeric', 'min:0'],
|
|
'receiving_date' => ['nullable', 'date'],
|
|
'lot_no' => ['nullable', 'string', 'max:50'],
|
|
'supplier_lot' => ['nullable', 'string', 'max:50'],
|
|
'receiving_location' => ['nullable', 'string', 'max:100'],
|
|
'receiving_manager' => ['nullable', 'string', 'max:50'],
|
|
'remark' => ['nullable', 'string', 'max:1000'],
|
|
];
|
|
}
|
|
|
|
public function messages(): array
|
|
{
|
|
return [
|
|
'receiving_qty.required' => __('validation.required', ['attribute' => '입고수량']),
|
|
'receiving_qty.numeric' => __('validation.numeric', ['attribute' => '입고수량']),
|
|
'receiving_qty.min' => __('validation.min.numeric', ['attribute' => '입고수량', 'min' => 0]),
|
|
];
|
|
}
|
|
}
|