mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 06:14:37 -04:00
Fixes for bank transaction delinking
This commit is contained in:
parent
4b5dc3b43f
commit
7b6515c8c2
@ -113,6 +113,11 @@ class ExpenseRepository extends BaseRepository
|
|||||||
$expense->saveQuietly();
|
$expense->saveQuietly();
|
||||||
|
|
||||||
$expense->transaction->expense_id = $exp_ids;
|
$expense->transaction->expense_id = $exp_ids;
|
||||||
|
|
||||||
|
if(strlen($exp_ids) <= 2) {
|
||||||
|
$expense->transaction->status_id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
$expense->transaction->saveQuietly();
|
$expense->transaction->saveQuietly();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,7 @@ class DeletePayment
|
|||||||
|
|
||||||
BankTransaction::query()->where('payment_id', $this->payment->id)->cursor()->each(function ($bt){
|
BankTransaction::query()->where('payment_id', $this->payment->id)->cursor()->each(function ($bt){
|
||||||
$bt->payment_id = null;
|
$bt->payment_id = null;
|
||||||
|
$bt->status_id = 1;
|
||||||
$bt->save();
|
$bt->save();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user