2025-12-18 15:31:59 +09:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Requests\TaxInvoice;
|
|
|
|
|
|
2026-01-13 19:45:44 +09:00
|
|
|
use App\Http\Requests\Traits\HasPagination;
|
2025-12-18 15:31:59 +09:00
|
|
|
use App\Models\Tenants\TaxInvoice;
|
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
|
use Illuminate\Validation\Rule;
|
|
|
|
|
|
|
|
|
|
class TaxInvoiceListRequest extends FormRequest
|
|
|
|
|
{
|
2026-01-13 19:45:44 +09:00
|
|
|
use HasPagination;
|
|
|
|
|
|
2025-12-18 15:31:59 +09:00
|
|
|
public function authorize(): bool
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function rules(): array
|
|
|
|
|
{
|
|
|
|
|
return [
|
2026-01-13 19:45:44 +09:00
|
|
|
'per_page' => ['nullable', 'integer', 'min:1'],
|
2025-12-18 15:31:59 +09:00
|
|
|
'direction' => ['nullable', 'string', Rule::in(TaxInvoice::DIRECTIONS)],
|
|
|
|
|
'status' => ['nullable', 'string', Rule::in(TaxInvoice::STATUSES)],
|
|
|
|
|
'invoice_type' => ['nullable', 'string', Rule::in(TaxInvoice::INVOICE_TYPES)],
|
|
|
|
|
'issue_type' => ['nullable', 'string', Rule::in(TaxInvoice::ISSUE_TYPES)],
|
|
|
|
|
'issue_date_from' => ['nullable', 'date'],
|
|
|
|
|
'issue_date_to' => ['nullable', 'date', 'after_or_equal:issue_date_from'],
|
|
|
|
|
'corp_num' => ['nullable', 'string', 'max:20'],
|
|
|
|
|
'corp_name' => ['nullable', 'string', 'max:100'],
|
|
|
|
|
'nts_confirm_num' => ['nullable', 'string', 'max:24'],
|
|
|
|
|
];
|
|
|
|
|
}
|
2026-01-16 21:59:06 +09:00
|
|
|
}
|