mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 06:14:35 -04: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);
|
$client->fill($data);
|
||||||
|
|
||||||
|
|
||||||
if(!$client->country_id)
|
if(auth()->user() && !$client->country_id){
|
||||||
$client->country_id = auth()->user()->company()->settings->country_id;
|
$client->country_id = auth()->user()->company()->settings->country_id;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
$client->save();
|
$client->save();
|
||||||
|
|
||||||
|
|
||||||
if (!isset($client->number) || empty($client->number) || strlen($client->number) == 0) {
|
if (!isset($client->number) || empty($client->number) || strlen($client->number) == 0) {
|
||||||
$client->number = $this->getNextClientNumber($client);
|
$client->number = $this->getNextClientNumber($client);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user