2025-12-26 15:45:33 +09:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Requests\V1\Receiving;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
|
|
|
|
|
|
class UpdateReceivingRequest extends FormRequest
|
|
|
|
|
{
|
|
|
|
|
public function authorize(): bool
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function rules(): array
|
|
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
'order_no' => ['nullable', 'string', 'max:30'],
|
|
|
|
|
'order_date' => ['nullable', 'date'],
|
|
|
|
|
'item_code' => ['sometimes', 'string', 'max:50'],
|
|
|
|
|
'item_name' => ['sometimes', 'string', 'max:200'],
|
|
|
|
|
'specification' => ['nullable', 'string', 'max:200'],
|
|
|
|
|
'supplier' => ['sometimes', 'string', 'max:100'],
|
|
|
|
|
'order_qty' => ['sometimes', 'numeric', 'min:0'],
|
|
|
|
|
'order_unit' => ['nullable', 'string', 'max:20'],
|
|
|
|
|
'due_date' => ['nullable', 'date'],
|
2026-01-30 11:22:28 +09:00
|
|
|
'status' => ['sometimes', 'string', 'in:order_completed,shipping,inspection_pending,receiving_pending,completed'],
|
2025-12-26 15:45:33 +09:00
|
|
|
'remark' => ['nullable', 'string', 'max:1000'],
|
2026-01-30 11:22:28 +09:00
|
|
|
'receiving_qty' => ['nullable', 'numeric', 'min:0'],
|
|
|
|
|
'receiving_date' => ['nullable', 'date'],
|
|
|
|
|
'lot_no' => ['nullable', 'string', 'max:50'],
|
2026-02-07 03:27:07 +09:00
|
|
|
'inspection_status' => ['nullable', 'string', 'max:10'],
|
|
|
|
|
'inspection_date' => ['nullable', 'date'],
|
|
|
|
|
'inspection_result' => ['nullable', 'string', 'max:20'],
|
2025-12-26 15:45:33 +09:00
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function messages(): array
|
|
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
'order_qty.numeric' => __('validation.numeric', ['attribute' => '발주수량']),
|
|
|
|
|
'order_qty.min' => __('validation.min.numeric', ['attribute' => '발주수량', 'min' => 0]),
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|