mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-02 21:04:33 -04:00
Refactor default client settings
This commit is contained in:
parent
cc4032ef3a
commit
2a032ab253
@ -28,6 +28,7 @@ class ClientSettings extends BaseSettings
|
|||||||
public $military_time;
|
public $military_time;
|
||||||
public $start_of_week;
|
public $start_of_week;
|
||||||
public $financial_year_start;
|
public $financial_year_start;
|
||||||
|
public $payment_terms;
|
||||||
|
|
||||||
public $language_id;
|
public $language_id;
|
||||||
public $currency_id;
|
public $currency_id;
|
||||||
@ -47,6 +48,23 @@ class ClientSettings extends BaseSettings
|
|||||||
public $lock_sent_invoices;
|
public $lock_sent_invoices;
|
||||||
public $auto_bill;
|
public $auto_bill;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Counter Variables
|
||||||
|
*/
|
||||||
|
public $invoice_number_prefix;
|
||||||
|
public $invoice_number_pattern;
|
||||||
|
|
||||||
|
public $quote_number_prefix;
|
||||||
|
public $quote_number_pattern;
|
||||||
|
|
||||||
|
public $client_number_prefix;
|
||||||
|
public $client_number_pattern;
|
||||||
|
|
||||||
|
public $credit_number_prefix;
|
||||||
|
public $credit_number_pattern;
|
||||||
|
|
||||||
|
public $shared_invoice_quote_counter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* settings which which are unique to client settings
|
* settings which which are unique to client settings
|
||||||
*/
|
*/
|
||||||
@ -77,26 +95,9 @@ class ClientSettings extends BaseSettings
|
|||||||
{
|
{
|
||||||
|
|
||||||
return (object)[
|
return (object)[
|
||||||
'timezone_id' => NULL,
|
'industry_id' => NULL,
|
||||||
'language_id' => NULL,
|
'size_id' => NULL,
|
||||||
'currency_id' => NULL,
|
'invoice_email_list' => NULL,
|
||||||
'payment_terms' => NULL,
|
|
||||||
'datetime_format_id' => NULL,
|
|
||||||
'military_time' => NULL,
|
|
||||||
'date_format_id' => NULL,
|
|
||||||
'start_of_week' => NULL,
|
|
||||||
'financial_year_start' => NULL,
|
|
||||||
'default_task_rate' => NULL,
|
|
||||||
'send_reminders' => NULL,
|
|
||||||
'show_tasks_in_portal' => NULL,
|
|
||||||
'show_currency_symbol' => NULL,
|
|
||||||
'show_currency_code' => NULL,
|
|
||||||
'inclusive_taxes' => NULL,
|
|
||||||
'lock_sent_invoices' => NULL,
|
|
||||||
'invoice_email_list' => NULL,
|
|
||||||
'custom_taxes1' => NULL,
|
|
||||||
'custom_taxes2' => NULL,
|
|
||||||
'auto_bill' => NULL,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -77,19 +77,17 @@ class CompanySettings extends BaseSettings
|
|||||||
*/
|
*/
|
||||||
public $invoice_number_prefix;
|
public $invoice_number_prefix;
|
||||||
public $invoice_number_pattern;
|
public $invoice_number_pattern;
|
||||||
public $invoice_number_counter;
|
|
||||||
|
|
||||||
public $quote_number_prefix;
|
public $quote_number_prefix;
|
||||||
public $quote_number_pattern;
|
public $quote_number_pattern;
|
||||||
public $quote_number_counter;
|
|
||||||
|
|
||||||
public $client_number_prefix;
|
public $client_number_prefix;
|
||||||
public $client_number_pattern;
|
public $client_number_pattern;
|
||||||
public $client_number_counter;
|
|
||||||
|
|
||||||
public $credit_number_prefix;
|
public $credit_number_prefix;
|
||||||
public $credit_number_pattern;
|
public $credit_number_pattern;
|
||||||
public $credit_number_counter;
|
|
||||||
|
public $shared_invoice_quote_counter;
|
||||||
|
|
||||||
public $entity_number_padding;
|
public $entity_number_padding;
|
||||||
public $recurring_number_prefix;
|
public $recurring_number_prefix;
|
||||||
@ -135,7 +133,8 @@ class CompanySettings extends BaseSettings
|
|||||||
'custom_taxes1' => 'FALSE',
|
'custom_taxes1' => 'FALSE',
|
||||||
'custom_taxes2' => 'FALSE',
|
'custom_taxes2' => 'FALSE',
|
||||||
'lock_sent_invoices' => 'TRUE',
|
'lock_sent_invoices' => 'TRUE',
|
||||||
|
'shared_invoice_quote_counter' => 'FALSE',
|
||||||
|
|
||||||
'translations' => (object) [],
|
'translations' => (object) [],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ class BaseSettingsTest extends TestCase
|
|||||||
|
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->settings = ClientSettings::defaults();
|
$this->settings = new ClientSettings(ClientSettings::defaults());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user