Invoice testing and line item catchup

This commit is contained in:
Deon George
2020-02-12 21:32:57 +11:00
parent f41fc3eb9c
commit 5cc0dcd8e1
9 changed files with 146 additions and 42 deletions

View File

@@ -14,12 +14,18 @@ class Product extends Model
const RECORD_ID = 'product';
public $incrementing = FALSE;
protected $table = 'ab_product';
protected $with = ['descriptions'];
const CREATED_AT = 'date_orig';
const UPDATED_AT = 'date_last';
public $dateFormat = 'U';
protected $table = 'ab_product';
protected $casts = [
// @todo convert existing data to a json array
// 'price_group'=>'array',
];
protected $with = ['descriptions'];
public function descriptions()
{
@@ -126,7 +132,7 @@ class Product extends Model
public function getPriceArrayAttribute()
{
return unserialize($this->price_group);
return unserialize($this->attributes['price_group']);
}
public function getPriceTypeAttribute()