Work on product costing (broadband) and reporting
This commit is contained in:
@@ -7,6 +7,7 @@ use Illuminate\Support\Arr;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
use App\Traits\NextKey;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class Product extends Model
|
||||
{
|
||||
@@ -132,7 +133,12 @@ class Product extends Model
|
||||
|
||||
public function getPriceArrayAttribute()
|
||||
{
|
||||
return unserialize($this->attributes['price_group']);
|
||||
try {
|
||||
return unserialize($this->attributes['price_group']);
|
||||
} catch (\Exception $e) {
|
||||
Log::debug('Problem with Price array in product ',['pid'=>$this->id]);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
public function getPriceTypeAttribute()
|
||||
|
Reference in New Issue
Block a user