From b3b3180667bd19ad2599af3c63762c30d5d1f43f Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 16 Jul 2023 20:51:21 +1000 Subject: [PATCH] Updates for quote item exports --- app/Export/CSV/BaseExport.php | 5 +++++ app/Export/CSV/QuoteItemExport.php | 12 +++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/Export/CSV/BaseExport.php b/app/Export/CSV/BaseExport.php index 0a6e4c96dfd4..1c299790d1cf 100644 --- a/app/Export/CSV/BaseExport.php +++ b/app/Export/CSV/BaseExport.php @@ -193,6 +193,10 @@ class BaseExport ]; protected array $quote_report_keys = [ + 'custom_value1' => 'quote.custom_value1', + 'custom_value2' => 'quote.custom_value2', + 'custom_value3' => 'quote.custom_value3', + 'custom_value4' => 'quote.custom_value4', "number" => "quote.number", "amount" => "quote.amount", "balance" => "quote.balance", @@ -817,6 +821,7 @@ class BaseExport $header[] = "{$prefix}" . ctrans("texts.{$key}"); } + // nlog($header); return $header; diff --git a/app/Export/CSV/QuoteItemExport.php b/app/Export/CSV/QuoteItemExport.php index 06cd71cc97b2..ffa5bb5a96de 100644 --- a/app/Export/CSV/QuoteItemExport.php +++ b/app/Export/CSV/QuoteItemExport.php @@ -77,11 +77,13 @@ class QuoteItemExport extends BaseExport 'tax_name2' => 'item.tax_name2', 'tax_name3' => 'item.tax_name3', 'line_total' => 'item.line_total', - // 'gross_line_total' => 'item.gross_line_total', - 'custom_value1' => 'item.custom_value1', - 'custom_value2' => 'item.custom_value2', - 'custom_value3' => 'item.custom_value3', - 'custom_value4' => 'item.custom_value4', + 'gross_line_total' => 'item.gross_line_total', + 'quote1' => 'item.custom_value1', + 'quote2' => 'item.custom_value2', + 'quote3' => 'item.custom_value3', + 'quote4' => 'item.custom_value4', + 'tax_category' => 'item.tax_id', + 'type' => 'item.type_id', ]; private array $decorate_keys = [