From 9e071f58d7ab4b7809f61833eabbf9fee81a5376 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Wed, 14 Feb 2018 13:11:47 +0200 Subject: [PATCH] Clean up long texts --- app/Ninja/Datatables/ProductDatatable.php | 2 +- app/Ninja/Presenters/InvoiceItemPresenter.php | 5 ----- app/Ninja/Reports/ProductReport.php | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/app/Ninja/Datatables/ProductDatatable.php b/app/Ninja/Datatables/ProductDatatable.php index d5a3aba104d6..62775313c28d 100644 --- a/app/Ninja/Datatables/ProductDatatable.php +++ b/app/Ninja/Datatables/ProductDatatable.php @@ -24,7 +24,7 @@ class ProductDatatable extends EntityDatatable [ 'notes', function ($model) { - return e(Str::limit($model->notes, 100)); + return $this->showWithTooltip($model->notes); }, ], [ diff --git a/app/Ninja/Presenters/InvoiceItemPresenter.php b/app/Ninja/Presenters/InvoiceItemPresenter.php index 1e436cbbaa4a..e7a0acf92d61 100644 --- a/app/Ninja/Presenters/InvoiceItemPresenter.php +++ b/app/Ninja/Presenters/InvoiceItemPresenter.php @@ -18,11 +18,6 @@ class InvoiceItemPresenter extends EntityPresenter return $data; } - public function notes() - { - return Str::limit($this->entity->notes); - } - public function tax1() { $item = $this->entity; diff --git a/app/Ninja/Reports/ProductReport.php b/app/Ninja/Reports/ProductReport.php index cc18997cc735..1f5aba19c3d6 100644 --- a/app/Ninja/Reports/ProductReport.php +++ b/app/Ninja/Reports/ProductReport.php @@ -67,7 +67,7 @@ class ProductReport extends AbstractReport $this->isExport ? $invoice->invoice_number : $invoice->present()->link, $invoice->present()->invoice_date, $item->product_key, - $this->isExport ? $item->notes : $item->present()->notes, + $item->notes, Utils::roundSignificant($item->qty, 0), Utils::roundSignificant($item->cost, 2), ];