mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Minor fixes for email template
This commit is contained in:
parent
fe46bba383
commit
4561ed41f2
@ -112,7 +112,6 @@ class CreateSingleAccount extends Command
|
||||
$company = Company::factory()->create([
|
||||
'account_id' => $account->id,
|
||||
'slack_webhook_url' => config('ninja.notification.slack'),
|
||||
'use_credits_payment' => 'always',
|
||||
]);
|
||||
|
||||
$account->default_company_id = $company->id;
|
||||
|
@ -124,11 +124,6 @@ class EmailTemplateDefaults
|
||||
|
||||
public static function emailInvoiceTemplate()
|
||||
{
|
||||
$converter = new CommonMarkConverter([
|
||||
'html_input' => 'strip',
|
||||
'allow_unsafe_links' => false,
|
||||
]);
|
||||
|
||||
$invoice_message = '<p>'.self::transformText('invoice_message').'</p><br><br><p>$view_link</p>';
|
||||
|
||||
return $invoice_message;
|
||||
@ -141,12 +136,9 @@ class EmailTemplateDefaults
|
||||
|
||||
public static function emailQuoteTemplate()
|
||||
{
|
||||
$converter = new CommonMarkConverter([
|
||||
'html_input' => 'strip',
|
||||
'allow_unsafe_links' => false,
|
||||
]);
|
||||
$quote_message = '<p>'.self::transformText('quote_message').'</p><br><br><p>$view_link</p>';
|
||||
|
||||
return $converter->convertToHtml(self::transformText('quote_message'));
|
||||
return $quote_message;
|
||||
}
|
||||
|
||||
public static function emailPaymentSubject()
|
||||
@ -167,13 +159,9 @@ class EmailTemplateDefaults
|
||||
|
||||
public static function emailCreditTemplate()
|
||||
{
|
||||
$converter = new CommonMarkConverter([
|
||||
'html_input' => 'strip',
|
||||
'allow_unsafe_links' => false,
|
||||
]);
|
||||
|
||||
return $converter->convertToHtml(self::transformText('credit_message'));
|
||||
$credit_message = '<p>'.self::transformText('credit_message').'</p><br><br><p>$view_link</p>';
|
||||
|
||||
return $credit_message;
|
||||
}
|
||||
|
||||
public static function emailPaymentPartialTemplate()
|
||||
|
@ -222,7 +222,6 @@ class InvoiceService
|
||||
|
||||
public function updateStatus()
|
||||
{
|
||||
info("invoice balance = {$this->invoice->balance}");
|
||||
|
||||
if((int)$this->invoice->balance == 0)
|
||||
$this->setStatus(Invoice::STATUS_PAID);
|
||||
|
@ -154,6 +154,7 @@ class CompanyTransformer extends EntityTransformer
|
||||
'invoice_task_timelog' => (bool) $company->invoice_task_timelog,
|
||||
'auto_start_tasks' => (bool) $company->auto_start_tasks,
|
||||
'invoice_task_documents' => (bool) $company->invoice_task_documents,
|
||||
'use_credits_payment' => 'always', //todo remove
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -48,15 +48,15 @@ class TaskTransformer extends EntityTransformer
|
||||
'assigned_user_id' => (string) $this->encodePrimaryKey($task->assigned_user_id),
|
||||
'number' => (string) $task->number ?: '',
|
||||
'start_time' => (int) $task->start_time,
|
||||
'description' => $task->description ?: '',
|
||||
'duration' => 0,
|
||||
'description' => (string) $task->description ?: '',
|
||||
'duration' => (int) $task->duration ?: 0,
|
||||
'rate' => (float) $task->rate ?: 0,
|
||||
'created_at' => (int) $task->created_at,
|
||||
'updated_at' => (int) $task->updated_at,
|
||||
'archived_at' => (int) $task->deleted_at,
|
||||
'invoice_id' => $this->encodePrimaryKey($task->invoice_id),
|
||||
'client_id' => $this->encodePrimaryKey($task->client_id),
|
||||
'project_id' => $this->encodePrimaryKey($task->project_id),
|
||||
'invoice_id' => $this->encodePrimaryKey($task->invoice_id) ?: '',
|
||||
'client_id' => $this->encodePrimaryKey($task->client_id) ?: '',
|
||||
'project_id' => $this->encodePrimaryKey($task->project_id) ?: '',
|
||||
'is_deleted' => (bool) $task->is_deleted,
|
||||
'time_log' => $task->time_log ?: '',
|
||||
'is_running' => (bool) $task->is_running,
|
||||
@ -64,7 +64,7 @@ class TaskTransformer extends EntityTransformer
|
||||
'custom_value2' => $task->custom_value2 ?: '',
|
||||
'custom_value3' => $task->custom_value3 ?: '',
|
||||
'custom_value4' => $task->custom_value4 ?: '',
|
||||
'status_id' => $this->encodePrimaryKey($task->status_id),
|
||||
'status_id' => $this->encodePrimaryKey($task->status_id) ?: '',
|
||||
'status_sort_order' => (int) $task->status_sort_order,
|
||||
];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user