mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Static analysis
This commit is contained in:
parent
dc1d23067c
commit
c7595b7032
@ -48,12 +48,14 @@ class ProcessBankRules extends AbstractService
|
||||
|
||||
private function matchCredit()
|
||||
{
|
||||
/** @var \Illuminate\Database\Eloquent\Collection<Invoice> $this->invoices */
|
||||
$this->invoices = Invoice::where('company_id', $this->bank_transaction->company_id)
|
||||
->whereIn('status_id', [1,2,3])
|
||||
->where('is_deleted', 0)
|
||||
->get();
|
||||
|
||||
$invoice = $this->invoices->first(function ($value, $key) {
|
||||
/** @var \App\Models\Invoice $value */
|
||||
return str_contains($this->bank_transaction->description, $value->number);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user