This commit is contained in:
venkateswaran ubuntu 2023-09-04 12:35:09 +05:30
parent fc8e736a31
commit 06036d41c4
2 changed files with 10 additions and 12 deletions

View File

@ -153,6 +153,9 @@ $(document).on('click','.transaction',function(){
text: 'PDF',
customize: function(doc) {
// You can further customize the PDF here if needed
doc.content[1].table.body.forEach(function(row) {
row.splice(0, 1); // Remove the first column (ID column)
});
}
},
{
@ -161,17 +164,24 @@ $(document).on('click','.transaction',function(){
text: 'Print',
customize: function(win) {
// You can further customize the print output here if needed
$(win.document.body).find('table').find('th:first, td:first').remove();
}
},
{
extend: 'copy',
text: 'Copy', // Set the title for the Copy button
titleAttr: 'Copy', // Set the tooltip for the Copy button
exportOptions: {
columns: ':not(:first-child)' // Exclude the first column (ID column)
}
},
{
extend: 'csv',
text: 'CSV', // Set the title for the CSV button
title: 'Members', // Set your custom print title here
exportOptions: {
columns: ':not(:first-child)' // Exclude the first column (ID column)
}
}
]
});

View File

@ -159,34 +159,22 @@ $(document).on('click','.order_details',function(){
title: 'Transactions', // Set your custom PDF title here
text: 'PDF',
customize: function(doc) {
doc.content[1].table.body.forEach(function(row) {
row.splice(0, 1); // Remove the first column (ID column)
});
}
},
{
extend: 'print',
title: 'Transactions', // Set your custom print title here
text: 'Print',
customize: function(win) {
$(win.document.body).find('table').find('th:first, td:first').remove();
}
},
{
extend: 'copy',
text: 'Copy', // Set the title for the Copy button
titleAttr: 'Copy', // Set the tooltip for the Copy button
exportOptions: {
columns: ':not(:first-child)' // Exclude the first column (ID column)
}
},
{
extend: 'csv',
text: 'CSV', // Set the title for the CSV button
title: 'Transactions', // Set your custom print title here
exportOptions: {
columns: ':not(:first-child)' // Exclude the first column (ID column)
}
}
],
"language": {