1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-05 18:52:44 +01:00

Adjustments for account transformer

This commit is contained in:
David Bomba 2020-07-21 07:51:09 +10:00
parent 5e6fdef935
commit 3aca9e701b
3 changed files with 9 additions and 9 deletions

View File

@ -34,7 +34,7 @@ class CompanyFactory
//$company->custom_fields = (object) ['invoice1' => '1', 'invoice2' => '2', 'client1'=>'3'];
$company->custom_fields = (object) [];
$company->subdomain = '';
$company->enabled_modules = 8191; //4095
$company->enabled_modules = 32767;//8191; //4095
return $company;
}

View File

@ -68,19 +68,19 @@ class AccountTransformer extends EntityTransformer
'payment_id' => (string) $account->payment_id,
'trial_started' => (string) $account->trial_started,
'trial_plan' => (string) $account->trial_plan,
'pending_plan' => (string) $account->pending_plan,
'pending_term' => (string) $account->pending_term,
'pending_plan' => (string) $account->pending_plan, // todo remove
'pending_term' => (string) $account->pending_term, // todo remove
'plan_price' => (float) $account->plan_price,
'pending_plan_price' => (string) $account->pending_plan_price,
'pending_plan_price' => (string) $account->pending_plan_price, //todo remove
'num_users' => (int) $account->num_users,
'pending_num_users' => (int) $account->pending_num_users,
'utm_source' => (string) $account->utm_source,
'utm_medium' => (string) $account->utm_medium,
'utm_content' => (string) $account->utm_content,
'utm_term' => (string) $account->utm_term,
'discount' => (float) $account->discount,
'discount_expires' => (string) $account->discount_expires,
'bluevine_status' => (string) $account->bluevine_status,
'discount' => (float) $account->discount, //todo delete
'discount_expires' => (string) $account->discount_expires, //todo delete
'bluevine_status' => (string) $account->bluevine_status, //todo delete this
'referral_code' => (string) $account->referral_code,
'latest_version' => (string)$account->latest_version,
'current_version' => (string)config('ninja.app_version'),

View File

@ -41,7 +41,7 @@ class CompareObjectTest extends TestCase
$this->assertEquals($build_client_settings->timezone_id, 1);
$this->assertEquals($build_client_settings->language_id, 1);
$this->assertEquals($build_client_settings->payment_terms, -1);
$this->assertEquals($build_client_settings->payment_terms, '-1');
}
public function testDirectClientSettingsBuild()
@ -50,7 +50,7 @@ class CompareObjectTest extends TestCase
$this->assertEquals($settings->timezone_id, 1);
$this->assertEquals($settings->language_id, 1);
$this->assertEquals($settings->payment_terms, -1);
$this->assertEquals($settings->payment_terms, '-1');
$this->assertFalse($settings->auto_archive_invoice);
}
}