mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Add company country as default if none is set
This commit is contained in:
parent
916d28d28d
commit
8d9950ebbd
@ -58,6 +58,10 @@ class ClientRepository extends BaseRepository
|
||||
return $client;
|
||||
}
|
||||
|
||||
if(!$client->id && (!array_key_exists('country_id', $data) || empty($data['country_id']))){
|
||||
$data['country_id'] = auth()->user()->company()->settings->country_id;
|
||||
}
|
||||
|
||||
$client->fill($data);
|
||||
|
||||
if (!isset($client->number) || empty($client->number)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user