mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Minor fixes
This commit is contained in:
parent
efa66f1a8b
commit
5e6fc9117a
@ -130,7 +130,7 @@ class InvoiceEmailEngine extends BaseEmailEngine
|
||||
|
||||
$pdf = ((new CreateRawPdf($this->invitation, $this->invitation->company->db))->handle());
|
||||
|
||||
$this->setAttachments([['file' => base64_encode($pdf), 'name' => $this->invoice->numberFormatter().'.pdf']]);
|
||||
$this->setAttachments([['file' => base64_encode($pdf), 'name' => ctrans('texts.invoice') . " " .$this->invoice->numberFormatter().'.pdf']]);
|
||||
}
|
||||
|
||||
//attach third party documents
|
||||
|
@ -118,14 +118,11 @@ class TemplateEmail extends Mailable
|
||||
'logo' => $this->company->present()->logo($settings),
|
||||
]);
|
||||
|
||||
|
||||
//22-10-2022 - Performance - To improve the performance/reliability of sending emails, attaching as Data is much better, stubs in place
|
||||
foreach ($this->build_email->getAttachments() as $file) {
|
||||
if(array_key_exists('file', $file))
|
||||
$this->attachData(base64_decode($file['file']), $file['name']);
|
||||
else
|
||||
$this->attach($file['path'], ['as' => $file['name'], 'mime' => null]);
|
||||
|
||||
}
|
||||
|
||||
if ($this->invitation && $this->invitation->invoice && $settings->ubl_email_attachment && $this->company->account->hasFeature(Account::FEATURE_PDF_ATTACHMENT)) {
|
||||
|
@ -193,12 +193,9 @@ class BaseModel extends Model
|
||||
$number = strlen($this->number) >= 1 ? $this->number : class_basename($this) . "_" . Str::random(5);
|
||||
|
||||
$formatted_number = mb_ereg_replace("([^\w\s\d\-_~,;\[\]\(\).])", '', $number);
|
||||
// Remove any runs of periods (thanks falstro!)
|
||||
|
||||
$formatted_number = mb_ereg_replace("([\.]{2,})", '', $formatted_number);
|
||||
|
||||
// $formatted_number = str_replace(" ", "_", $formatted_number);
|
||||
|
||||
//11-01-2021 fixes for multiple spaces
|
||||
$formatted_number = preg_replace('/\s+/', '_', $formatted_number);
|
||||
|
||||
return $formatted_number;
|
||||
|
@ -22,7 +22,6 @@ trait NumberFormatter
|
||||
|
||||
return number_format($this->parseFloat(rtrim(sprintf('%f', $value), '0')), $precision, '.', '');
|
||||
|
||||
// return number_format($this->parseFloat($value), $precision, '.', '');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4854,7 +4854,7 @@ $LANG = array(
|
||||
'payment_type_Klarna' => 'Klarna',
|
||||
'online_payment_email_help' => 'Send an email when an online payment is made',
|
||||
'manual_payment_email_help' => 'Send an email when manually entering a payment',
|
||||
'mark_paid_payment_email_help' => 'Send an email when marking an invoice as pad',
|
||||
'mark_paid_payment_email_help' => 'Send an email when marking an invoice as paid',
|
||||
'linked_transaction' => 'Successfully linked transaction',
|
||||
'link_payment' => 'Link Payment',
|
||||
'link_expense' => 'Link Expense',
|
||||
@ -4900,6 +4900,8 @@ $LANG = array(
|
||||
'otp_code_body' => 'Your one time passcode is :code',
|
||||
'delete_tax_rate' => 'Delete Tax Rate',
|
||||
'restore_tax_rate' => 'Restore Tax Rate',
|
||||
'company_backup_file' => 'Select company backup file',
|
||||
'company_backup_file_help' => 'Please upload the .zip file used to create this backup.'
|
||||
);
|
||||
|
||||
return $LANG;
|
||||
|
Loading…
Reference in New Issue
Block a user