Changed Import processor removed getting existing account by reference and just keep contract_id and active true

This commit is contained in:
Simon Pocrnjič 2026-01-17 17:33:19 +01:00
parent 7eaab16e30
commit 27bdb942ab
2 changed files with 3 additions and 1 deletions

View File

@ -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 = [

View File

@ -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();