From 7e4627a423e2dfedf91f760bb38492fca61ec1b5 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Wed, 14 Feb 2018 13:29:28 +0200 Subject: [PATCH] Fix report titles for custom fields --- app/Ninja/Reports/ClientReport.php | 4 ++-- app/Ninja/Reports/InvoiceReport.php | 4 ++-- app/Ninja/Reports/ProductReport.php | 4 ++-- app/Ninja/Reports/QuoteReport.php | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/Ninja/Reports/ClientReport.php b/app/Ninja/Reports/ClientReport.php index 989da1d060e8..a51e0c6c2d3c 100644 --- a/app/Ninja/Reports/ClientReport.php +++ b/app/Ninja/Reports/ClientReport.php @@ -23,10 +23,10 @@ class ClientReport extends AbstractReport $account = $user->account; if ($account->custom_client_label1) { - $columns[$account->custom_client_label1] = ['columnSelector-false', 'custom']; + $columns[$account->present()->customClientLabel1] = ['columnSelector-false', 'custom']; } if ($account->custom_client_label2) { - $columns[$account->custom_client_label2] = ['columnSelector-false', 'custom']; + $columns[$account->present()->customClientLabel2] = ['columnSelector-false', 'custom']; } return $columns; diff --git a/app/Ninja/Reports/InvoiceReport.php b/app/Ninja/Reports/InvoiceReport.php index 5f19be8c63dd..ca592cff563d 100644 --- a/app/Ninja/Reports/InvoiceReport.php +++ b/app/Ninja/Reports/InvoiceReport.php @@ -32,10 +32,10 @@ class InvoiceReport extends AbstractReport $account = auth()->user()->account; if ($account->custom_invoice_text_label1) { - $columns[$account->custom_invoice_text_label1] = ['columnSelector-false', 'custom']; + $columns[$account->present()->customInvoiceTextLabel1] = ['columnSelector-false', 'custom']; } if ($account->custom_invoice_text_label1) { - $columns[$account->custom_invoice_text_label1] = ['columnSelector-false', 'custom']; + $columns[$account->present()->customInvoiceTextLabel2] = ['columnSelector-false', 'custom']; } return $columns; diff --git a/app/Ninja/Reports/ProductReport.php b/app/Ninja/Reports/ProductReport.php index 3a0bb74755ed..9ccc7ea03c5e 100644 --- a/app/Ninja/Reports/ProductReport.php +++ b/app/Ninja/Reports/ProductReport.php @@ -32,11 +32,11 @@ class ProductReport extends AbstractReport } if ($account->custom_invoice_item_label1) { - $columns[Utils::getCustomLabel($account->custom_invoice_item_label1)] = ['columnSelector-false', 'custom']; + $columns[$account->present()->customProductLabel1] = ['columnSelector-false', 'custom']; } if ($account->custom_invoice_item_label2) { - $columns[Utils::getCustomLabel($account->custom_invoice_item_label2)] = ['columnSelector-false', 'custom']; + $columns[$account->present()->customProductLabel2] = ['columnSelector-false', 'custom']; } return $columns; diff --git a/app/Ninja/Reports/QuoteReport.php b/app/Ninja/Reports/QuoteReport.php index 61fee8e98220..7e96c75b4f52 100644 --- a/app/Ninja/Reports/QuoteReport.php +++ b/app/Ninja/Reports/QuoteReport.php @@ -28,10 +28,10 @@ class QuoteReport extends AbstractReport $account = auth()->user()->account; if ($account->custom_invoice_text_label1) { - $columns[$account->custom_invoice_text_label1] = ['columnSelector-false', 'custom']; + $columns[$account->present()->customInvoiceTextLabel1] = ['columnSelector-false', 'custom']; } if ($account->custom_invoice_text_label1) { - $columns[$account->custom_invoice_text_label1] = ['columnSelector-false', 'custom']; + $columns[$account->present()->customInvoiceTextLabel2] = ['columnSelector-false', 'custom']; } return $columns;