Work on product costing (broadband) and reporting

This commit is contained in:
Deon George
2020-02-18 22:35:20 +11:00
parent f8d998d935
commit 910edfd89f
19 changed files with 762 additions and 45 deletions

View File

@@ -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()