mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 00:24:36 -04:00
Refactor Template Engine
This commit is contained in:
parent
064f7d98ef
commit
a07f04e1df
@ -69,6 +69,7 @@ class Company extends BaseModel
|
|||||||
protected $presenter = \App\Models\Presenters\CompanyPresenter::class;
|
protected $presenter = \App\Models\Presenters\CompanyPresenter::class;
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
|
'show_tasks_table',
|
||||||
'mark_expenses_invoiceable',
|
'mark_expenses_invoiceable',
|
||||||
'mark_expenses_paid',
|
'mark_expenses_paid',
|
||||||
'enabled_item_tax_rates',
|
'enabled_item_tax_rates',
|
||||||
|
@ -154,7 +154,7 @@ class CompanyTransformer extends EntityTransformer
|
|||||||
'invoice_task_timelog' => (bool) $company->invoice_task_timelog,
|
'invoice_task_timelog' => (bool) $company->invoice_task_timelog,
|
||||||
'auto_start_tasks' => (bool) $company->auto_start_tasks,
|
'auto_start_tasks' => (bool) $company->auto_start_tasks,
|
||||||
'invoice_task_documents' => (bool) $company->invoice_task_documents,
|
'invoice_task_documents' => (bool) $company->invoice_task_documents,
|
||||||
// 'use_credits_payment' => 'always', //todo remove
|
'use_credits_payment' => 'always', //todo remove
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ use App\Models\Client;
|
|||||||
use App\Models\ClientContact;
|
use App\Models\ClientContact;
|
||||||
use App\Models\Invoice;
|
use App\Models\Invoice;
|
||||||
use App\Models\InvoiceInvitation;
|
use App\Models\InvoiceInvitation;
|
||||||
|
use App\Utils\HtmlEngine;
|
||||||
use App\Utils\Traits\MakesHash;
|
use App\Utils\Traits\MakesHash;
|
||||||
use App\Utils\Traits\MakesInvoiceHtml;
|
use App\Utils\Traits\MakesInvoiceHtml;
|
||||||
use App\Utils\Traits\MakesTemplateData;
|
use App\Utils\Traits\MakesTemplateData;
|
||||||
@ -151,7 +152,9 @@ class TemplateEngine
|
|||||||
|
|
||||||
private function entityValues($contact)
|
private function entityValues($contact)
|
||||||
{
|
{
|
||||||
$data = $this->entity_obj->buildLabelsAndValues($contact);
|
//$data = $this->entity_obj->buildLabelsAndValues($contact);
|
||||||
|
|
||||||
|
$data = (new HtmlEngine($this->entity_obj->invitations->first()))->generateLabelsAndValues();
|
||||||
// $arrKeysLength = array_map('strlen', array_keys($data));
|
// $arrKeysLength = array_map('strlen', array_keys($data));
|
||||||
// array_multisort($arrKeysLength, SORT_DESC, $data);
|
// array_multisort($arrKeysLength, SORT_DESC, $data);
|
||||||
|
|
||||||
|
@ -16,6 +16,11 @@ class TasksInvoiceDocuments extends Migration
|
|||||||
Schema::table('tasks', function(Blueprint $table){
|
Schema::table('tasks', function(Blueprint $table){
|
||||||
$table->boolean('invoice_documents')->default(0);
|
$table->boolean('invoice_documents')->default(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Schema::table('companies', function(Blueprint $table){
|
||||||
|
$table->boolean('show_tasks_table')->default();
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user