Update with new price management

This commit is contained in:
Ludovic CANDELLIER
2021-03-22 00:47:44 +01:00
parent 083d358fbd
commit 37ffaa938b
64 changed files with 1118 additions and 984 deletions

View File

@@ -23,6 +23,17 @@ class Unities
return Unity::orderBy('value','asc')->get()->pluck('value','id')->toArray();
}
public static function getSelectByFamily($family_id)
{
$values = Unity::byFamily($family_id)->get();
$data = [];
foreach ($values as $value)
{
$data[] = ['id' => $value->id, 'text' => $value->value];
}
return collect($data)->sortBy('text')->values()->all();
}
public static function getAll()
{
return Unity::orderBy('value','asc')->get();