From 27bdb942abf4409aa84636d7f5e12fab02dbfd82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Pocrnji=C4=8D?= Date: Sat, 17 Jan 2026 17:33:19 +0100 Subject: [PATCH] Changed Import processor removed getting existing account by reference and just keep contract_id and active true --- app/Models/Account.php | 2 ++ app/Services/ImportProcessor.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Models/Account.php b/app/Models/Account.php index 633fe4d..31f542e 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -6,10 +6,12 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Database\Eloquent\SoftDeletes; class Account extends Model { /** @use HasFactory<\Database\Factories\Person/AccountFactory> */ + use SoftDeletes; use HasFactory; protected $fillable = [ diff --git a/app/Services/ImportProcessor.php b/app/Services/ImportProcessor.php index e44af1e..f7a7b24 100644 --- a/app/Services/ImportProcessor.php +++ b/app/Services/ImportProcessor.php @@ -1633,7 +1633,7 @@ private function upsertAccount(Import $import, array $mapped, $mappings, bool $h $existing = Account::query() ->where('contract_id', $contractId) - ->where('reference', $reference) + //->where('reference', $reference) ->where('active', 1) ->first();