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->transaction->expense_id = $exp_ids;
|
||||
|
||||
if(strlen($exp_ids) <= 2) {
|
||||
$expense->transaction->status_id = 1;
|
||||
}
|
||||
|
||||
$expense->transaction->saveQuietly();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue