Fixes for client contact country on registration

This commit is contained in:
David Bomba 2022-03-23 23:11:41 +11:00
parent 154f029a84
commit a41468816e

View File

@ -71,14 +71,12 @@ class ContactRegisterController extends Controller
$client->number = $this->getNextClientNumber($client); $client->number = $this->getNextClientNumber($client);
$client->save(); $client->save();
if(!$client->country_id && strlen($client->company->settings->country_id) > 1){ if(!array_key_exists('country_id', $data) && strlen($client->company->settings->country_id) > 1){
$client->update(['country_id' => $client->company->settings->country_id]); $client->update(['country_id' => $client->company->settings->country_id]);
} }
// $this->getClientContact($data, $client);
return $client; return $client;
} }