diff --git a/app/Models/Client.php b/app/Models/Client.php index b2214c2fa00d..de235a469c9a 100644 --- a/app/Models/Client.php +++ b/app/Models/Client.php @@ -145,6 +145,14 @@ class Client extends BaseModel return $this->belongsTo(Currency::class); } + /** + * + * Returns the entire filtered set + * of settings which have been merged from + * Client > Group > Company levels + * + * @return object stdClass object of settings + */ public function getMergedSettings() { @@ -160,6 +168,15 @@ class Client extends BaseModel return ClientSettings::buildClientSettings(new CompanySettings($this->company->settings), new ClientSettings($this->settings)); } + /** + * + * Returns a single setting + * which cascades from + * Client > Group > Company + * + * @param string $setting The Setting parameter + * @return mixed The setting requested + */ public function getSetting($setting) { diff --git a/tests/Feature/RecurringInvoiceTest.php b/tests/Feature/RecurringInvoiceTest.php index 54583caea362..0fec010c8a53 100644 --- a/tests/Feature/RecurringInvoiceTest.php +++ b/tests/Feature/RecurringInvoiceTest.php @@ -124,7 +124,6 @@ class RecurringInvoiceTest extends TestCase ])->post('/api/v1/signup', $data); $acc = $response->json(); -Log::error($acc); $account = Account::find($this->decodePrimaryKey($acc['data']['id'])); $company_token = $account->default_company->tokens()->first();