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