1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Merge pull request #4166 from turbo124/v2

Additional fields for company model.
This commit is contained in:
David Bomba 2020-10-15 08:26:24 +11:00 committed by GitHub
commit 4ca112e61e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 0 deletions

View File

@ -85,6 +85,9 @@ class Company extends BaseModel
protected $presenter = \App\Models\Presenters\CompanyPresenter::class;
protected $fillable = [
'mark_expenses_invoiceable',
'mark_expenses_paid',
'use_credits_payment',
'enabled_item_tax_rates',
'fill_products',
'industry_id',

View File

@ -142,6 +142,9 @@ class CompanyTransformer extends EntityTransformer
'client_can_register' => (bool) $company->client_can_register,
'is_large' => (bool) $company->is_large,
'enable_shop_api' => (bool) $company->enable_shop_api,
'mark_expenses_invoiceable'=> (bool) $company->mark_expenses_invoiceable,
'mark_expenses_paid' => (bool) $company->mark_expenses_paid,
'use_credits_payment' => (string) $company->use_credits_payment,
];
}

View File

@ -21,6 +21,13 @@ class ProjectIdsToEntities extends Migration
$table->longText('fields')->change();
});
Schema::table('gateways', function (Blueprint $table) {
$table->boolean('mark_expenses_invoiceable')->default(0);
$table->boolean('mark_expenses_paid')->default(0);
$table->enum('use_credits_payment', ['always', 'off', 'optin'])->nullable();
});
}
/**