Sort companies by code in client registration page

This commit is contained in:
David Bomba 2022-03-10 16:46:33 +11:00
parent 983d23d797
commit 6aa8f31149
2 changed files with 3 additions and 1 deletions

View File

@ -11,6 +11,7 @@
namespace App\Console\Commands;
use App\DataMapper\ClientRegistrationFields;
use App\DataMapper\CompanySettings;
use App\DataMapper\FeesAndLimits;
use App\Events\Invoice\InvoiceWasCreated;
@ -115,6 +116,7 @@ class CreateSingleAccount extends Command
$settings->invoice_footer = 'Default invoice footer';
$company->settings = $settings;
$company->client_registration_fields = ClientRegistrationFields::generate();
$company->save();
$account->default_company_id = $company->id;

View File

@ -31,7 +31,7 @@ class TranslationHelper
return Cache::get('countries')->each(function ($country) {
$country->name = ctrans('texts.country_'.$country->name);
})->sortBy(function ($country) {
return $country->name;
return $country->iso_3166_2;
});
}