Refactor for bank transactions
This commit is contained in:
parent
023d596844
commit
268ad71bfb
1 changed files with 4 additions and 0 deletions
|
|
@ -176,6 +176,9 @@ class MatchBankTransactions implements ShouldQueue
|
|||
$expense->transaction_id = $this->bt->id;
|
||||
$expense->save();
|
||||
|
||||
$this->bt->expense_id = $expense->id;
|
||||
$this->bt->save();
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
|
@ -281,6 +284,7 @@ class MatchBankTransactions implements ShouldQueue
|
|||
event(new PaymentWasCreated($payment, $payment->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));
|
||||
event(new InvoiceWasPaid($this->invoice, $payment, $payment->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));
|
||||
|
||||
$this->bt->invoice_id = collect($invoices)->pluck('hashed_id')->implode(',');
|
||||
$this->bt->status_id = BankTransaction::STATUS_CONVERTED;
|
||||
$this->bt->save();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue