Fixes for checking null description values

This commit is contained in:
David Bomba
2025-11-17 10:33:27 +11:00
parent f2cc228586
commit 2903ac539c
4 changed files with 359 additions and 340 deletions

View File

@@ -90,7 +90,7 @@ class StoreDesignRequest extends Request
$input['design']['body'] = '';
}
if (array_key_exists('entities', $input)) {
if (array_key_exists('entities', $input) && is_string($input['entities'])) {
$user_entities = explode(",", $input['entities']);
$e = [];

View File

@@ -81,7 +81,7 @@ class UpdateDesignRequest extends Request
$input['design']['body'] = '';
}
if (array_key_exists('entities', $input)) {
if (array_key_exists('entities', $input) && is_string($input['entities'])) {
$user_entities = explode(",", $input['entities']);
$e = [];

View File

@@ -51,12 +51,16 @@ class ProcessBankRules extends AbstractService
if ($this->bank_transaction->base_type == 'DEBIT') {
$this->matchDebit();
} else {
$this->matchCredit();
if($this->bank_transaction->description)
$this->matchCredit();
}
}
private function matchCredit()
{
$this->invoices = Invoice::query()->where('company_id', $this->bank_transaction->company_id)
->whereIn('status_id', [1,2,3])
->where('is_deleted', 0)

689
composer.lock generated

File diff suppressed because it is too large Load Diff