converted transfer check from category to type

This commit is contained in:
Denis Duliçi
2022-07-21 01:07:55 +03:00
parent 16c645b4a0
commit 5a7697f741
18 changed files with 221 additions and 109 deletions

View File

@@ -4,7 +4,6 @@ namespace App\Jobs\Banking;
use App\Abstracts\Job;
use App\Interfaces\Job\ShouldDelete;
use App\Models\Setting\Category;
class DeleteTransaction extends Job implements ShouldDelete
{
@@ -31,7 +30,7 @@ class DeleteTransaction extends Job implements ShouldDelete
throw new \Exception($message);
}
if ($this->model->category->id == Category::transfer()) {
if ($this->model->isTransferTransaction()) {
throw new \Exception('Unauthorized');
}
}