diff --git a/app/Export/CSV/BaseExport.php b/app/Export/CSV/BaseExport.php index 21581c887557..bb7a6ac95651 100644 --- a/app/Export/CSV/BaseExport.php +++ b/app/Export/CSV/BaseExport.php @@ -915,13 +915,13 @@ class BaseExport $helper = new Helpers(); $header = []; - + nlog("header"); foreach ($this->input['report_keys'] as $value) { $key = array_search($value, $this->entity_keys); $original_key = $key; - // nlog("{$key} => {$value}"); + nlog("{$key} => {$value}"); $prefix = ''; if(!$key) { @@ -962,6 +962,9 @@ class BaseExport if(!$key) { $prefix = ctrans('texts.expense')." "; $key = array_search($value, $this->expense_report_keys); + + if(!$key && $value == 'expense.category') + $key = 'category'; } if(!$key) { @@ -988,6 +991,8 @@ class BaseExport $prefix = ''; } + nlog("key => {$key}"); + $key = str_replace('item.', '', $key); $key = str_replace('recurring_invoice.', '', $key); $key = str_replace('purchase_order.', '', $key); @@ -1040,7 +1045,7 @@ class BaseExport } } - // nlog($header); + nlog($header); return $header; } @@ -1094,8 +1099,6 @@ class BaseExport } - nlog($clean_row); - return $clean_row; }