mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 14:12:44 +01:00
Fixes for client registration migration
This commit is contained in:
parent
3088109e29
commit
57417a4700
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use App\DataMapper\ClientRegistrationFields;
|
||||
use App\Models\Company;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
@ -18,6 +19,10 @@ return new class extends Migration
|
||||
|
||||
$crfs = $company->client_registration_fields;
|
||||
|
||||
if(!$crfs) {
|
||||
$crfs = ClientRegistrationFields::generate();
|
||||
}
|
||||
|
||||
foreach($crfs as $key => $crf)
|
||||
{
|
||||
$crfs[$key]['visible'] = $crfs[$key]['required'];
|
||||
|
Loading…
Reference in New Issue
Block a user