1
0
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:
David Bomba 2020-10-19 08:21:14 +11:00
parent 5a720325b3
commit 93ea785131
3 changed files with 5 additions and 2 deletions

View File

@ -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']);

View File

@ -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;

View File

@ -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;