Account next invoice, and authorisations
This commit is contained in:
@@ -79,7 +79,7 @@ class Product extends Model
|
||||
|
||||
private function getDefaultLanguage()
|
||||
{
|
||||
return config('SITE_SETUP')->language();
|
||||
return config('SITE_SETUP')->language;
|
||||
}
|
||||
|
||||
public function getDescriptionAttribute()
|
||||
@@ -179,9 +179,21 @@ class Product extends Model
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the price for this product based on the period being requested.
|
||||
*
|
||||
* If the price period doesnt exist, we'll take the default period (0) which should.
|
||||
*
|
||||
* @param int $period
|
||||
* @return mixed
|
||||
*/
|
||||
public function price(int $period)
|
||||
{
|
||||
return Arr::get($this->price_array,sprintf('%s.1.price_base',$period));
|
||||
return Arr::get(
|
||||
$this->price_array,
|
||||
sprintf('%s.1.price_base',$period),
|
||||
Arr::get($this->price_array,sprintf('%s.0.price_base',$period))
|
||||
);
|
||||
}
|
||||
|
||||
public function PricePeriods()
|
||||
|
Reference in New Issue
Block a user