mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
migrations for companies/accounts table
This commit is contained in:
parent
0497089e27
commit
5389c00c2f
@ -447,7 +447,13 @@ class CompanySettings extends BaseSettings
|
|||||||
|
|
||||||
public $mailgun_domain = '';
|
public $mailgun_domain = '';
|
||||||
|
|
||||||
|
public $auto_bill_standard_invoices = false;
|
||||||
|
|
||||||
|
public $email_alignment = 'center'; // center , left, right
|
||||||
|
|
||||||
public static $casts = [
|
public static $casts = [
|
||||||
|
'email_alignment' => 'string',
|
||||||
|
'auto_bill_standard_invoices' => 'bool',
|
||||||
'postmark_secret' => 'string',
|
'postmark_secret' => 'string',
|
||||||
'mailgun_secret' => 'string',
|
'mailgun_secret' => 'string',
|
||||||
'mailgun_domain' => 'string',
|
'mailgun_domain' => 'string',
|
||||||
|
@ -502,7 +502,6 @@ class PurchaseOrderController extends BaseController
|
|||||||
/*
|
/*
|
||||||
* Download Purchase Order/s
|
* Download Purchase Order/s
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($action == 'bulk_download' && $purchase_orders->count() >= 1) {
|
if ($action == 'bulk_download' && $purchase_orders->count() >= 1) {
|
||||||
$purchase_orders->each(function ($purchase_order) {
|
$purchase_orders->each(function ($purchase_order) {
|
||||||
if (auth()->user()->cannot('view', $purchase_order)) {
|
if (auth()->user()->cannot('view', $purchase_order)) {
|
||||||
|
@ -66,6 +66,7 @@ class Company extends BaseModel
|
|||||||
protected $presenter = CompanyPresenter::class;
|
protected $presenter = CompanyPresenter::class;
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
|
'invoice_task_hours',
|
||||||
'markdown_enabled',
|
'markdown_enabled',
|
||||||
'calculate_expense_tax_by_amount',
|
'calculate_expense_tax_by_amount',
|
||||||
'invoice_expense_documents',
|
'invoice_expense_documents',
|
||||||
|
@ -194,6 +194,7 @@ class CompanyTransformer extends EntityTransformer
|
|||||||
'convert_payment_currency' => (bool) $company->convert_payment_currency,
|
'convert_payment_currency' => (bool) $company->convert_payment_currency,
|
||||||
'convert_expense_currency' => (bool) $company->convert_expense_currency,
|
'convert_expense_currency' => (bool) $company->convert_expense_currency,
|
||||||
'notify_vendor_when_paid' => (bool) $company->notify_vendor_when_paid,
|
'notify_vendor_when_paid' => (bool) $company->notify_vendor_when_paid,
|
||||||
|
'invoice_task_hours' => (bool) $company->invoice_task_hours,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
|
||||||
|
Schema::table('accounts', function (Blueprint $table)
|
||||||
|
{
|
||||||
|
$table->boolean('is_trial')->default(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::table('companies', function (Blueprint $table)
|
||||||
|
{
|
||||||
|
$table->boolean('invoice_task_hours')->default(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
};
|
@ -1,5 +1,6 @@
|
|||||||
@php
|
@php
|
||||||
$primary_color = isset($settings) ? $settings->primary_color : '#4caf50';
|
$primary_color = isset($settings) ? $settings->primary_color : '#4caf50';
|
||||||
|
$email_alignment = isset($settings) ? $settings->email_alignment : 'center';
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
|
|
||||||
@ -60,7 +61,8 @@
|
|||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
padding: 15px 50px;
|
padding: 15px 50px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
margin-bottom: 30px;
|
margin-bottom: 5px;
|
||||||
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
#content h1 {
|
#content h1 {
|
||||||
font-family: 'canada-type-gibson', 'roboto', Arial, Helvetica, sans-serif;
|
font-family: 'canada-type-gibson', 'roboto', Arial, Helvetica, sans-serif;
|
||||||
@ -146,8 +148,8 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td cellpadding="20">
|
<td cellpadding="5">
|
||||||
<div style="border: 1px solid #c2c2c2; border-top: none; border-bottom: none; padding: 20px; text-align: center" id="content">
|
<div style="border: 1px solid #c2c2c2; border-top: none; border-bottom: none; padding: 20px; text-align: {{ $email_alignment }}" id="content">
|
||||||
<div style="padding-top: 10px;"></div>
|
<div style="padding-top: 10px;"></div>
|
||||||
|
|
||||||
{{ $slot ?? '' }}
|
{{ $slot ?? '' }}
|
||||||
@ -163,8 +165,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td height="20">
|
<td height="0">
|
||||||
<div style="border: 1px solid #c2c2c2; border-top: none; border-bottom: none; padding: 20px; text-align: center" id="content"> </div>
|
<div style="border: 1px solid #c2c2c2; border-top: none; border-bottom: none; padding: 5px; text-align: center" id="content"> </div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user