diff --git a/app/Models/Client.php b/app/Models/Client.php index 6e43816505e8..7d992d6c90fb 100644 --- a/app/Models/Client.php +++ b/app/Models/Client.php @@ -389,7 +389,7 @@ class Client extends EntityModel /** * @return bool */ - public function hasAddress() + public function hasAddress($shipping = false) { $fields = [ 'address1', @@ -401,6 +401,9 @@ class Client extends EntityModel ]; foreach ($fields as $field) { + if ($shipping) { + $field = 'shipping_' . $field; + } if ($this->$field) { return true; } diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 105197d63c18..ea9582f1ce96 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -2606,6 +2606,8 @@ $LANG = array( 'edit_times' => 'Edit Times', 'inclusive_taxes_help' => 'Include taxes in the cost', 'inclusive_taxes_warning' => 'Warning: existing invoices will need to be resaved', + 'copy_shipping' => 'Copy Shipping', + 'copy_billing' => 'Copy Billing', ); diff --git a/resources/views/clients/edit.blade.php b/resources/views/clients/edit.blade.php index 8bcf02696dad..c2e2202ed6b3 100644 --- a/resources/views/clients/edit.blade.php +++ b/resources/views/clients/edit.blade.php @@ -95,6 +95,14 @@ {!! Former::text('postal_code') !!} {!! Former::select('country_id')->addOption('','') ->fromQuery($countries, 'name', 'id') !!} + +
+