mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 21:34:35 -04: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)
|
public function passes($attribute, $value)
|
||||||
{
|
{
|
||||||
|
if(empty($this->input['project_id']))
|
||||||
|
return true;
|
||||||
|
|
||||||
if(is_string($this->input['project_id']))
|
if(is_string($this->input['project_id']))
|
||||||
$this->input['project_id'] = $this->decodePrimaryKey($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;
|
$settings = $this->entity->settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
$country = Country::find($settings->country_id)->first();
|
$country = Country::find($settings->country_id);
|
||||||
|
|
||||||
$swap = $country && $country->swap_postal_code;
|
$swap = $country && $country->swap_postal_code;
|
||||||
|
|
||||||
|
@ -427,7 +427,7 @@ class HtmlEngine
|
|||||||
|
|
||||||
private function getCountryName() :string
|
private function getCountryName() :string
|
||||||
{
|
{
|
||||||
$country = Country::find($this->settings->country_id)->first();
|
$country = Country::find($this->settings->country_id);
|
||||||
|
|
||||||
if ($country) {
|
if ($country) {
|
||||||
return $country->name;
|
return $country->name;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user