diff --git a/app/Jobs/ExportStatementJob.php b/app/Jobs/ExportStatementJob.php index a67ec63..b0b5d30 100644 --- a/app/Jobs/ExportStatementJob.php +++ b/app/Jobs/ExportStatementJob.php @@ -164,7 +164,7 @@ if ($item->ft?->recipt_no) { $narr .= 'Receipt No: ' . $item->ft->recipt_no; } - return $narr; + return trim($narr); } /** @@ -240,14 +240,14 @@ $result .= $paramValue; } else { // If no value found, try to use the original field name as a fallback - if ($fieldName != 'recipt_no') { - $result .= $this->getTransaction($item->trans_reference, $fieldName) . ' '; + if ($fieldName !== 'recipt_no') { + $result .= ($item->ft?->$fieldName ?? '') . ' '; } } } } - return $result; + return str_replace('','',$result); } /**