mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
minor fixes for client country in repo
This commit is contained in:
parent
ea30be3a51
commit
4faa58ec8c
@ -59,11 +59,15 @@ class ClientRepository extends BaseRepository
|
||||
}
|
||||
|
||||
$client->fill($data);
|
||||
|
||||
|
||||
if(!$client->country_id)
|
||||
if(auth()->user() && !$client->country_id){
|
||||
$client->country_id = auth()->user()->company()->settings->country_id;
|
||||
|
||||
}
|
||||
|
||||
$client->save();
|
||||
|
||||
|
||||
if (!isset($client->number) || empty($client->number) || strlen($client->number) == 0) {
|
||||
$client->number = $this->getNextClientNumber($client);
|
||||
|
Loading…
Reference in New Issue
Block a user