From a5ee2c8d2bc15aba0bc3bc4ac834fdbf68625a53 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Sat, 1 Nov 2025 18:01:50 +0530 Subject: [PATCH] FIX_BDS_REPORT_CSV_ADD_BUSINESS_TYPE --- app/Views/report_bds.php | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/app/Views/report_bds.php b/app/Views/report_bds.php index 5a1786f4..198d203a 100644 --- a/app/Views/report_bds.php +++ b/app/Views/report_bds.php @@ -81,7 +81,7 @@ table.dataTable tbody td { S. No User Month - + Business Type Client Type Insured Name Policy/
Endorsement @@ -125,7 +125,7 @@ table.dataTable tbody td { ?>" class="mdi mdi-pencil" > - + @@ -279,9 +279,22 @@ $(document).ready(function() { text: ' CSV ', title: 'Policy-Tranction-BDS-List', exportOptions: { - columns: ':visible', // or specify exact columns [0,1,2,...] + columns: function (idx, data, node) { + return true; // ✅ include all columns (even hidden) + }, format: { body: function (data, row, column, node) { + + data = data.replace(/ /g, '').replace(/\s+/g, ' ').trim(); + + // If it's the first column (index 0), remove link and special chars + if (column === 0 || column === 20 || column === 11 ) { + // Remove all tags and their contents + data = data.replace(/]*>(.*?)<\/a>/gi, ''); + // Also remove other HTML tags and   + data = $('
').html(data).text().replace(/\u00a0/g, ' ').trim(); + } + // Force K and L columns to string if (column === 10 || column === 11) { // Option 1: prepend single quote