Fixed recurring list page actions..

This commit is contained in:
Cüneyt Şentürk 2023-08-24 12:09:55 +03:00
parent aa1251a1c6
commit c5c6bb2755
2 changed files with 12 additions and 2 deletions

View File

@ -502,7 +502,12 @@ class Transaction extends Model
} catch (\Exception $e) {}
try {
if ($this->is_splittable && empty($this->document_id) && empty($this->recurring) && $this->isNotTransferTransaction()) {
if (
$this->is_splittable
&& empty($this->document_id)
&& empty($this->recurring)
&& $this->isNotTransferTransaction()
) {
$connect = [
'type' => 'button',
'title' => trans('general.connect'),

View File

@ -540,7 +540,12 @@ class Document extends Model
];
} catch (\Exception $e) {}
if ($this->status != 'paid' && (empty($this->transactions->count()) || (! empty($this->transactions->count()) && $this->paid != $this->amount))) {
if (
$this->status != 'paid'
&& ! str_contains($this->type, 'recurring')
&& (empty($this->transactions->count())
|| (! empty($this->transactions->count()) && $this->paid != $this->amount))
) {
try {
if ($this->totals->count()) {
$actions[] = [