From 83700a002d2afa0a80b86fd16c10ea91656fe5f4 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 5 Dec 2022 18:42:06 +1100 Subject: [PATCH] Fixes for linking payments/expenses --- app/Jobs/Bank/MatchBankTransactions.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/Jobs/Bank/MatchBankTransactions.php b/app/Jobs/Bank/MatchBankTransactions.php index 183f18ad7245..e52cc7f39a02 100644 --- a/app/Jobs/Bank/MatchBankTransactions.php +++ b/app/Jobs/Bank/MatchBankTransactions.php @@ -182,8 +182,12 @@ class MatchBankTransactions implements ShouldQueue $this->bt->ninja_category_id = $expense->category_id; $this->bt->save(); + $this->bts->push($this->bt->id); + } - + + return $this; + } private function linkPayment($input) @@ -206,8 +210,10 @@ class MatchBankTransactions implements ShouldQueue $this->bt->invoice_ids = collect($payment->invoices)->pluck('hashed_id')->implode(','); $this->bt->save(); + $this->bts->push($this->bt->id); } - + + return $this; } private function matchInvoicePayment($input) :self @@ -225,9 +231,9 @@ class MatchBankTransactions implements ShouldQueue $this->createPayment($_invoices, $amount); - } + $this->bts->push($this->bt->id); - $this->bts->push($this->bt->id); + } return $this; }