Minor fixes

This commit is contained in:
David Bomba 2023-08-03 13:36:15 +10:00
parent 0a37f2940c
commit 7fca2cd24f
2 changed files with 3 additions and 3 deletions

View File

@ -55,7 +55,7 @@ class RecurringExpenseToExpenseFactory
$expense->custom_value2 = $recurring_expense->custom_value2;
$expense->custom_value3 = $recurring_expense->custom_value3;
$expense->custom_value4 = $recurring_expense->custom_value4;
$expense->transaction_id = $recurring_expense->transaction_id;
$expense->transaction_id = null;
$expense->category_id = $recurring_expense->category_id;
$expense->payment_type_id = $recurring_expense->payment_type_id;
$expense->project_id = $recurring_expense->project_id;

View File

@ -148,7 +148,7 @@ class MatchBankTransactions implements ShouldQueue
private function linkExpense($input)
{
$this->bt = BankTransaction::find($input['id']);
$this->bt = BankTransaction::withTrashed()->find($input['id']);
if (!$this->bt) {
return $this;
@ -243,7 +243,7 @@ class MatchBankTransactions implements ShouldQueue
private function matchExpense($input) :self
{
//if there is a category id, pull it from Yodlee and insert - or just reuse!!
$this->bt = BankTransaction::withTrashed()->find($input['id']);
$this->bt = BankTransaction::find($input['id']);
if (!$this->bt || $this->bt->status_id == BankTransaction::STATUS_CONVERTED) {
return $this;