Fixed recurring template end button issue ( #866au7m2v )

This commit is contained in:
Cüneyt Şentürk
2023-08-24 12:21:15 +03:00
parent c5c6bb2755
commit e1b47a6f8a
4 changed files with 28 additions and 24 deletions

View File

@ -610,17 +610,19 @@ class Transaction extends Model
} catch (\Exception $e) {}
}
} else {
try {
$actions[] = [
'title' => trans('general.end'),
'icon' => 'block',
'url' => route($prefix. '.end', $this->id),
'permission' => 'update-banking-transactions',
'attributes' => [
'id' => 'index-line-actions-end-' . $this->type . '-' . $this->id,
],
];
} catch (\Exception $e) {}
if ($this->recurring && $this->recurring->status != 'ended') {
try {
$actions[] = [
'title' => trans('general.end'),
'icon' => 'block',
'url' => route($prefix. '.end', $this->id),
'permission' => 'update-banking-transactions',
'attributes' => [
'id' => 'index-line-actions-end-' . $this->type . '-' . $this->id,
],
];
} catch (\Exception $e) {}
}
}
return $actions;