new: allow to delete seuil lines in price-list's pice modal

This commit is contained in:
Valentin Lab
2025-10-15 13:17:54 +02:00
parent 67e4346c68
commit b7e3eefed6
5 changed files with 126 additions and 15 deletions

View File

@@ -52,6 +52,17 @@ class PriceListValues
}
}
public static function purgeRemovedValues($price_list_id, array $ids)
{
if (! count($ids)) {
return;
}
PriceListValue::byPriceList($price_list_id)
->whereIn('id', $ids)
->delete();
}
protected static function hasPrice($value): bool
{
if (! array_key_exists('price', $value)) {