diff --git a/app/Repositories/ExpenseRepository.php b/app/Repositories/ExpenseRepository.php index b1b8794b98b7..6af0d453c6b6 100644 --- a/app/Repositories/ExpenseRepository.php +++ b/app/Repositories/ExpenseRepository.php @@ -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(); } diff --git a/app/Services/Payment/DeletePayment.php b/app/Services/Payment/DeletePayment.php index 27119ec5ca12..023e8148f34f 100644 --- a/app/Services/Payment/DeletePayment.php +++ b/app/Services/Payment/DeletePayment.php @@ -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(); });