Merge branch 'branch-jagad' into 'main'

Update generate_jurnal.blade.php

See merge request fiqhpratama1/xpendify!34
This commit is contained in:
Jagad Raya
2025-01-18 08:27:54 +00:00
@@ -145,7 +145,55 @@
$('#dataTable-table').DataTable({
responsive: false,
dom: 'Bfrtip',
buttons: ['excel', 'csv', 'pdf', 'print', 'colvis'],
buttons: [
{
extend: 'excel',
text: 'Export Excel',
buttons: ['excel', 'csv', 'pdf', 'print', 'colvis'],
},
{
extend: 'csv',
text: 'Export CSV',
customize: function (csv) {
// Add header information to the CSV
var additionalInfo = `
Cabang: {{ $cabang->name }}
Periode: {{ ucfirst($month) }} {{ $year }}
Cost Centre: {{ $cabang->cost->code }}
`;
return additionalInfo + csv;
}
},
{
extend: 'pdf',
text: 'Export PDF',
customize: function (doc) {
// Add additional information to the PDF
doc.content.splice(0, 0, {
margin: [0, 0, 0, 12],
alignment: 'left',
table: {
widths: ['*'],
body: [
[{ text: 'Cabang: {{ $cabang->name }}', style: 'header' }],
[{ text: 'Periode: {{ ucfirst($month) }} {{ $year }}', style: 'header' }],
[{ text: 'Cost Centre: {{ $cabang->cost->code }}', style: 'header' }]
]
},
layout: 'noBorders'
});
}
},
{
extend: 'print',
text: 'Print'
},
{
extend: 'colvis',
text: 'Column Visibility'
}
],
paging: false,
info: false,
pageLength: -1