diff --git a/app/Models/Banking/Transaction.php b/app/Models/Banking/Transaction.php index 7c1eaf9af..20fcdedd6 100644 --- a/app/Models/Banking/Transaction.php +++ b/app/Models/Banking/Transaction.php @@ -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'), diff --git a/app/Models/Document/Document.php b/app/Models/Document/Document.php index 39d986a48..314eb2eb3 100644 --- a/app/Models/Document/Document.php +++ b/app/Models/Document/Document.php @@ -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[] = [