1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Fixes for bank transaction delinking

This commit is contained in:
David Bomba 2023-08-29 13:40:35 +10:00
parent 4b5dc3b43f
commit 7b6515c8c2
2 changed files with 6 additions and 0 deletions

View File

@ -113,6 +113,11 @@ class ExpenseRepository extends BaseRepository
$expense->saveQuietly();
$expense->transaction->expense_id = $exp_ids;
if(strlen($exp_ids) <= 2) {
$expense->transaction->status_id = 1;
}
$expense->transaction->saveQuietly();
}

View File

@ -60,6 +60,7 @@ class DeletePayment
BankTransaction::query()->where('payment_id', $this->payment->id)->cursor()->each(function ($bt){
$bt->payment_id = null;
$bt->status_id = 1;
$bt->save();
});