diff --git a/app/Jobs/Bank/MatchBankTransactions.php b/app/Jobs/Bank/MatchBankTransactions.php index ecd1fdace85e..778ba8e64482 100644 --- a/app/Jobs/Bank/MatchBankTransactions.php +++ b/app/Jobs/Bank/MatchBankTransactions.php @@ -161,7 +161,7 @@ class MatchBankTransactions implements ShouldQueue foreach($_expenses as $_expense) { $expense = Expense::withTrashed() - ->where('id', $this->decodePrimaryKey($_expense)) + ->where('id', $this->decodePrimaryKey($_expense)) ->where('company_id', $this->bt->company_id) ->first(); diff --git a/tests/Feature/Bank/BankTransactionTest.php b/tests/Feature/Bank/BankTransactionTest.php index 9a58c2b631e3..e6aff6d22c82 100644 --- a/tests/Feature/Bank/BankTransactionTest.php +++ b/tests/Feature/Bank/BankTransactionTest.php @@ -77,6 +77,7 @@ class BankTransactionTest extends TestCase $this->assertEquals($this->expense->refresh()->transaction_id, $bt->id); $this->assertEquals($this->expense->hashed_id, $bt->refresh()->expense_id); + $this->assertEquals($bt->id, $this->expense->transaction_id); $this->assertEquals($this->vendor->id, $bt->vendor_id); $this->assertEquals(BankTransaction::STATUS_CONVERTED, $bt->status_id);