mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Additional props for account/companies table
This commit is contained in:
parent
e8907beeab
commit
91078eb6a1
@ -31,6 +31,7 @@ use Laracasts\Presenter\PresentableTrait;
|
||||
* App\Models\Account
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $email_quota
|
||||
* @property string|null $plan
|
||||
* @property string|null $plan_term
|
||||
* @property string|null $plan_started
|
||||
|
@ -388,6 +388,7 @@ class Company extends BaseModel
|
||||
'e_invoice_certificate_passphrase' => EncryptedCast::class,
|
||||
'smtp_username' => 'encrypted',
|
||||
'smtp_password' => 'encrypted',
|
||||
'einvoice' => 'object',
|
||||
];
|
||||
|
||||
protected $with = [];
|
||||
|
@ -67,7 +67,7 @@ class AuthorizePaymentDriver extends BaseDriver
|
||||
public function getClientRequiredFields(): array
|
||||
{
|
||||
$data = [
|
||||
['name' => 'client_name', 'label' => ctrans('texts.name'), 'type' => 'text', 'validation' => 'required|min:2'],
|
||||
// ['name' => 'client_name', 'label' => ctrans('texts.name'), 'type' => 'text', 'validation' => 'required|min:2'],
|
||||
['name' => 'client_phone', 'label' => ctrans('texts.phone'), 'type' => 'text', 'validation' => 'required'],
|
||||
['name' => 'contact_email', 'label' => ctrans('texts.email'), 'type' => 'text', 'validation' => 'required|email:rfc'],
|
||||
['name' => 'client_address_line_1', 'label' => ctrans('texts.address1'), 'type' => 'text', 'validation' => 'required'],
|
||||
|
@ -211,6 +211,7 @@ class CompanyTransformer extends EntityTransformer
|
||||
'smtp_password' => $company->smtp_password ? '********' : '',
|
||||
'smtp_local_domain' => (string)$company->smtp_local_domain ?? '',
|
||||
'smtp_verify_peer' => (bool)$company->smtp_verify_peer,
|
||||
'einvoice' => $company->einvoice ?: new \stdClass(),
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
|
||||
Schema::table('companies', function (Blueprint $table) {
|
||||
$table->mediumText('einvoice')->nullable();
|
||||
});
|
||||
|
||||
|
||||
Schema::table('accounts', function (Blueprint $table) {
|
||||
$table->integer('email_quota')->default(20)->nullable();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user