April 2026 waren Wirtschaft Feedback
This commit is contained in:
parent
02f2a4c23e
commit
9ce711d6b2
167 changed files with 25278 additions and 8518 deletions
34
app/Http/Requests/Inventory/ReceiveStockEntryRequest.php
Normal file
34
app/Http/Requests/Inventory/ReceiveStockEntryRequest.php
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Requests\Inventory;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ReceiveStockEntryRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, array<int, mixed>>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'received_at' => ['required', 'date'],
|
||||
'received_quantity' => ['required', 'numeric', 'min:0.000001'],
|
||||
'batch_number' => ['nullable', 'string', 'max:100'],
|
||||
'best_before' => ['nullable', 'date'],
|
||||
'quality_id' => ['nullable', 'integer', 'exists:material_qualities,id'],
|
||||
];
|
||||
}
|
||||
|
||||
protected function prepareForValidation(): void
|
||||
{
|
||||
$this->merge([
|
||||
'received_quantity' => reFormatNumber($this->input('received_quantity')),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue