Fixes for report previews

This commit is contained in:
David Bomba 2023-09-14 14:44:44 +10:00
parent d5b380d302
commit cee315cf6d

View File

@ -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;
}