diff --git a/app/Http/Livewire/Profile/Settings/PersonalAddress.php b/app/Http/Livewire/Profile/Settings/PersonalAddress.php index 7cd0030fcd81..22bc8bbf5417 100644 --- a/app/Http/Livewire/Profile/Settings/PersonalAddress.php +++ b/app/Http/Livewire/Profile/Settings/PersonalAddress.php @@ -53,6 +53,10 @@ class PersonalAddress extends Component { $data = $this->validate($this->rules); + if ($data['country_id'] == 'none') { + $data['country_id'] = null; + } + $this->profile ->fill($data) ->save(); diff --git a/app/Http/Livewire/Profile/Settings/ShippingAddress.php b/app/Http/Livewire/Profile/Settings/ShippingAddress.php index 39ce3aec426e..630bec35454d 100644 --- a/app/Http/Livewire/Profile/Settings/ShippingAddress.php +++ b/app/Http/Livewire/Profile/Settings/ShippingAddress.php @@ -53,6 +53,10 @@ class ShippingAddress extends Component { $data = $this->validate($this->rules); + if ($data['shipping_country_id'] == 'none') { + $data['shipping_country_id'] = null; + } + $this->profile ->fill($data) ->save(); diff --git a/app/Utils/HtmlEngine.php b/app/Utils/HtmlEngine.php index 3d3b3e64b9b4..42700c8a6b79 100644 --- a/app/Utils/HtmlEngine.php +++ b/app/Utils/HtmlEngine.php @@ -111,7 +111,7 @@ class HtmlEngine $data['$invoice.po_number'] = ['value' => $this->entity->po_number ?: ' ', 'label' => ctrans('texts.po_number')]; // $data['$line_taxes'] = ['value' => $this->makeLineTaxes() ?: ' ', 'label' => ctrans('texts.taxes')]; // $data['$invoice.line_taxes'] = &$data['$line_taxes']; - + // $data['$total_taxes'] = ['value' => $this->makeTotalTaxes() ?: ' ', 'label' => ctrans('texts.taxes')]; // $data['$invoice.total_taxes'] = &$data['$total_taxes']; @@ -217,7 +217,7 @@ class HtmlEngine $data['$vat_number'] = ['value' => $this->client->vat_number ?: ' ', 'label' => ctrans('texts.vat_number')]; $data['$website'] = ['value' => $this->client->present()->website() ?: ' ', 'label' => ctrans('texts.website')]; $data['$phone'] = ['value' => $this->client->present()->phone() ?: ' ', 'label' => ctrans('texts.phone')]; - $data['$country'] = ['value' => isset($this->client->country->name) ? $this->client->country->name : 'No Country Set', 'label' => ctrans('texts.country')]; + $data['$country'] = ['value' => isset($this->client->country->name) ? $this->client->country->name : '', 'label' => ctrans('texts.country')]; $data['$email'] = ['value' => isset($this->contact) ? $this->contact->email : 'no contact email on record', 'label' => ctrans('texts.email')]; $data['$client_name'] = ['value' => $this->entity->present()->clientName() ?: ' ', 'label' => ctrans('texts.client_name')]; $data['$client.name'] = &$data['$client_name']; @@ -550,7 +550,7 @@ class HtmlEngine } @media print { - thead {display: table-header-group;} + thead {display: table-header-group;} tfoot {display: table-footer-group;} button {display: none;} body {margin: 0;} @@ -568,7 +568,7 @@ class HtmlEngine } @media print { - thead {display: table-header-group;} + thead {display: table-header-group;} button {display: none;} body {margin: 0;} }'; diff --git a/resources/views/portal/ninja2020/profile/settings/personal-address.blade.php b/resources/views/portal/ninja2020/profile/settings/personal-address.blade.php index eb54f6ab9aee..1f0382c2c043 100644 --- a/resources/views/portal/ninja2020/profile/settings/personal-address.blade.php +++ b/resources/views/portal/ninja2020/profile/settings/personal-address.blade.php @@ -61,6 +61,7 @@
+