mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 05:32:39 +01:00
Fixes for naming PDFs
This commit is contained in:
parent
63655f7076
commit
89598d44ef
@ -795,6 +795,8 @@ class InvoiceController extends BaseController
|
|||||||
|
|
||||||
$file_path = $invoice->service()->getInvoicePdf($contact);
|
$file_path = $invoice->service()->getInvoicePdf($contact);
|
||||||
|
|
||||||
|
nlog($file_path);
|
||||||
|
|
||||||
return response()->download($file_path, basename($file_path));
|
return response()->download($file_path, basename($file_path));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -191,7 +191,9 @@ class BaseModel extends Model
|
|||||||
|
|
||||||
public function numberFormatter()
|
public function numberFormatter()
|
||||||
{
|
{
|
||||||
$formatted_number = mb_ereg_replace("([^\w\s\d\-_~,;\[\]\(\).])", '', $this->number);
|
$number = strlen($this->number) > 1 ? $this->number : class_basename($this);
|
||||||
|
|
||||||
|
$formatted_number = mb_ereg_replace("([^\w\s\d\-_~,;\[\]\(\).])", '', $number);
|
||||||
// Remove any runs of periods (thanks falstro!)
|
// Remove any runs of periods (thanks falstro!)
|
||||||
$formatted_number = mb_ereg_replace("([\.]{2,})", '', $formatted_number);
|
$formatted_number = mb_ereg_replace("([\.]{2,})", '', $formatted_number);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user