Sort companies by code in client registration page
This commit is contained in:
parent
983d23d797
commit
6aa8f31149
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
namespace App\Console\Commands;
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
|
use App\DataMapper\ClientRegistrationFields;
|
||||||
use App\DataMapper\CompanySettings;
|
use App\DataMapper\CompanySettings;
|
||||||
use App\DataMapper\FeesAndLimits;
|
use App\DataMapper\FeesAndLimits;
|
||||||
use App\Events\Invoice\InvoiceWasCreated;
|
use App\Events\Invoice\InvoiceWasCreated;
|
||||||
|
|
@ -115,6 +116,7 @@ class CreateSingleAccount extends Command
|
||||||
$settings->invoice_footer = 'Default invoice footer';
|
$settings->invoice_footer = 'Default invoice footer';
|
||||||
|
|
||||||
$company->settings = $settings;
|
$company->settings = $settings;
|
||||||
|
$company->client_registration_fields = ClientRegistrationFields::generate();
|
||||||
$company->save();
|
$company->save();
|
||||||
|
|
||||||
$account->default_company_id = $company->id;
|
$account->default_company_id = $company->id;
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ class TranslationHelper
|
||||||
return Cache::get('countries')->each(function ($country) {
|
return Cache::get('countries')->each(function ($country) {
|
||||||
$country->name = ctrans('texts.country_'.$country->name);
|
$country->name = ctrans('texts.country_'.$country->name);
|
||||||
})->sortBy(function ($country) {
|
})->sortBy(function ($country) {
|
||||||
return $country->name;
|
return $country->iso_3166_2;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue