feat(entry): refine variant selection logic to exclude replaced variants and add unit tests for replacement behavior

This commit is contained in:
2026-09-16 09:34:02 -03:00
parent 8ad9b3a4e3
commit 3d6548ce4a
4 changed files with 108 additions and 1 deletions

View File

@@ -97,6 +97,7 @@ class EntryService
$variants = Variant::query()
->where('catalog_item_id', $catalogItem->id)
->whereNull('replaced_by_variant_id')
->lockForUpdate()
->get();