mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-09-01 12:51:00 +00:00
chore(sales): remove legacy-era sales sources
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domains\Sales\Http\Requests;
|
||||
|
||||
use App\Domains\Sales\Models\Invoice;
|
||||
use App\Rules\CreditNoteDeletedTogether;
|
||||
use App\Rules\RelationNotExist;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class DeleteInvoiceRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'ids' => [
|
||||
'required',
|
||||
],
|
||||
'ids.*' => [
|
||||
'required',
|
||||
Rule::exists('invoices', 'id'),
|
||||
new RelationNotExist(Invoice::class, 'payments'),
|
||||
new CreditNoteDeletedTogether((array) $this->input('ids', [])),
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user