Fix on preview mode
This commit is contained in:
@@ -32,11 +32,13 @@ class PriceListValues
|
||||
return PriceListValue::find($id);
|
||||
}
|
||||
|
||||
public static function storePrices($generic_id, $values)
|
||||
public static function storePrices($price_list_id, $values)
|
||||
{
|
||||
foreach ($values as $value) {
|
||||
$value['price_generic_id'] = $generic_id;
|
||||
self::store($value);
|
||||
$value['price_list_id'] = $price_list_id;
|
||||
if ($value['price']) {
|
||||
self::store($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +46,7 @@ class PriceListValues
|
||||
{
|
||||
$id = isset($data['id']) ? $data['id'] : false;
|
||||
$price = $id ? self::update($data) : self::create($data);
|
||||
return $price->id;
|
||||
return $price;
|
||||
}
|
||||
|
||||
public static function create($data)
|
||||
|
||||
Reference in New Issue
Block a user