mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-02 19:14:35 -04:00
Force client country if none set
This commit is contained in:
parent
3b34553007
commit
769ab49458
@ -379,6 +379,15 @@ class ClientController extends BaseController
|
|||||||
|
|
||||||
$client->load('contacts', 'primary_contact');
|
$client->load('contacts', 'primary_contact');
|
||||||
|
|
||||||
|
/* Set the client country to the company if none is set */
|
||||||
|
if(!$client->country_id && strlen($client->company->settings->country_id) > 1){
|
||||||
|
|
||||||
|
$client->country_id = $client->company->settings->country_id;
|
||||||
|
|
||||||
|
$client->save();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
$this->uploadLogo($request->file('company_logo'), $client->company, $client);
|
$this->uploadLogo($request->file('company_logo'), $client->company, $client);
|
||||||
|
|
||||||
event(new ClientWasCreated($client, $client->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));
|
event(new ClientWasCreated($client, $client->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user