mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01:00
Fix for incorrect company country being displayed
This commit is contained in:
parent
5a720325b3
commit
93ea785131
@ -35,6 +35,9 @@ class ValidProjectForClient implements Rule
|
||||
*/
|
||||
public function passes($attribute, $value)
|
||||
{
|
||||
if(empty($this->input['project_id']))
|
||||
return true;
|
||||
|
||||
if(is_string($this->input['project_id']))
|
||||
$this->input['project_id'] = $this->decodePrimaryKey($this->input['project_id']);
|
||||
|
||||
|
@ -76,7 +76,7 @@ class CompanyPresenter extends EntityPresenter
|
||||
$settings = $this->entity->settings;
|
||||
}
|
||||
|
||||
$country = Country::find($settings->country_id)->first();
|
||||
$country = Country::find($settings->country_id);
|
||||
|
||||
$swap = $country && $country->swap_postal_code;
|
||||
|
||||
|
@ -427,7 +427,7 @@ class HtmlEngine
|
||||
|
||||
private function getCountryName() :string
|
||||
{
|
||||
$country = Country::find($this->settings->country_id)->first();
|
||||
$country = Country::find($this->settings->country_id);
|
||||
|
||||
if ($country) {
|
||||
return $country->name;
|
||||
|
Loading…
Reference in New Issue
Block a user