1
0
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:
David Bomba 2023-03-07 17:12:15 +11:00
parent 3088109e29
commit 57417a4700

View File

@ -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'];