From 003a5be614aa70ed2ebd577664ea1b766f8e9e5e Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 26 May 2019 11:23:18 +0300 Subject: [PATCH] Added client address to invoice/quote reports --- app/Ninja/Reports/InvoiceReport.php | 4 ++++ app/Ninja/Reports/QuoteReport.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/app/Ninja/Reports/InvoiceReport.php b/app/Ninja/Reports/InvoiceReport.php index 3918deb668fe..1dce1b17b1b9 100644 --- a/app/Ninja/Reports/InvoiceReport.php +++ b/app/Ninja/Reports/InvoiceReport.php @@ -25,6 +25,8 @@ class InvoiceReport extends AbstractReport 'private_notes' => ['columnSelector-false'], 'vat_number' => ['columnSelector-false'], 'user' => ['columnSelector-false'], + 'billing_address' => ['columnSelector-false'], + 'shipping_address' => ['columnSelector-false'], ]; if (TaxRate::scope()->count()) { @@ -121,6 +123,8 @@ class InvoiceReport extends AbstractReport $invoice->private_notes, $client->vat_number, $invoice->user->getDisplayName(), + trim(str_replace('
', ', ', $client->present()->address()), ', '), + trim(str_replace('
', ', ', $client->present()->address(ADDRESS_SHIPPING)), ', '), ]; if ($hasTaxRates) { diff --git a/app/Ninja/Reports/QuoteReport.php b/app/Ninja/Reports/QuoteReport.php index e17c3070d292..ccdba056d151 100644 --- a/app/Ninja/Reports/QuoteReport.php +++ b/app/Ninja/Reports/QuoteReport.php @@ -19,6 +19,8 @@ class QuoteReport extends AbstractReport 'status' => [], 'private_notes' => ['columnSelector-false'], 'user' => ['columnSelector-false'], + 'billing_address' => ['columnSelector-false'], + 'shipping_address' => ['columnSelector-false'], ]; if (TaxRate::scope()->count()) { @@ -87,6 +89,8 @@ class QuoteReport extends AbstractReport $invoice->present()->status(), $invoice->private_notes, $invoice->user->getDisplayName(), + trim(str_replace('
', ', ', $client->present()->address()), ', '), + trim(str_replace('
', ', ', $client->present()->address(ADDRESS_SHIPPING)), ', '), ]; if ($hasTaxRates) {