monthly gst total fixed
This commit is contained in:
parent
3c353bf8bf
commit
9f8f8f6ae8
@ -355,7 +355,6 @@
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
|
||||
|
||||
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
|
||||
|
||||
<script>
|
||||
@ -369,10 +368,6 @@ $.fn.dataTable.moment( 'DD-MM-YYYY' );
|
||||
"language": {
|
||||
"emptyTable":"<center> Data Not Found ! </center>"
|
||||
},
|
||||
|
||||
"aaSorting": [[ 0, "desc" ]],
|
||||
"autoWidth": false,
|
||||
orderCellsTop: true,
|
||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
@ -389,73 +384,7 @@ $.fn.dataTable.moment( 'DD-MM-YYYY' );
|
||||
},
|
||||
|
||||
'colvis'
|
||||
],
|
||||
"footerCallback": function ( row, data, start, end, display ) {
|
||||
var api = this.api(), data;
|
||||
|
||||
// Remove the formatting to get integer data for summation
|
||||
var intVal = function ( i ) {
|
||||
return typeof i === 'string' ?
|
||||
parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
|
||||
typeof i === 'number' ?
|
||||
parseFloat(i) : 0;
|
||||
};
|
||||
|
||||
TotalVALUE = api
|
||||
.column( 4, { search:'applied' } )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
}, 0 );
|
||||
|
||||
$( api.column( 4 ).footer() ).html( TotalVALUE.toFixed(2).bold() );
|
||||
|
||||
TotalOTHERS = api
|
||||
.column( 5, { search:'applied' } )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
}, 0 );
|
||||
|
||||
$( api.column( 5 ).footer() ).html( TotalOTHERS.toFixed(2).bold() );
|
||||
|
||||
TotalSGST = api
|
||||
.column( 6, { search:'applied' } )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
}, 0 );
|
||||
|
||||
$( api.column( 6 ).footer() ).html( TotalSGST.toFixed(2).bold() );
|
||||
|
||||
TotalCGST = api
|
||||
.column( 7, { search:'applied' } )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
}, 0 );
|
||||
|
||||
$( api.column( 7 ).footer() ).html( TotalCGST.toFixed(2).bold() );
|
||||
|
||||
TotalIGST = api
|
||||
.column( 8, { search:'applied' } )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
}, 0 );
|
||||
|
||||
$( api.column( 8 ).footer() ).html( TotalIGST.toFixed(2).bold() );
|
||||
|
||||
FinalTotal = api
|
||||
.column( 9, { search:'applied' } )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
}, 0 );
|
||||
|
||||
$( api.column( 9 ).footer() ).html( FinalTotal.toFixed(2).bold() );
|
||||
|
||||
}
|
||||
]
|
||||
} );
|
||||
} );
|
||||
//second table
|
||||
@ -482,72 +411,7 @@ $.fn.dataTable.moment( 'DD-MM-YYYY' );
|
||||
|
||||
'colvis'
|
||||
],
|
||||
"footerCallback": function ( row, data, start, end, display ) {
|
||||
var api = this.api(), data;
|
||||
|
||||
// Remove the formatting to get integer data for summation
|
||||
var intVal = function ( i ) {
|
||||
return typeof i === 'string' ?
|
||||
parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
|
||||
typeof i === 'number' ?
|
||||
parseFloat(i) : 0;
|
||||
};
|
||||
|
||||
TotalVALUE = api
|
||||
.column( 4, { search:'applied' } )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
}, 0 );
|
||||
|
||||
$( api.column( 4 ).footer() ).html( TotalVALUE.toFixed(2).bold() );
|
||||
|
||||
TotalOTHERS = api
|
||||
.column( 5, { search:'applied' } )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
}, 0 );
|
||||
|
||||
$( api.column( 5 ).footer() ).html( TotalOTHERS.toFixed(2).bold() );
|
||||
|
||||
TotalSGST = api
|
||||
.column( 6, { search:'applied' } )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
}, 0 );
|
||||
|
||||
$( api.column( 6 ).footer() ).html( TotalSGST.toFixed(2).bold() );
|
||||
|
||||
TotalCGST = api
|
||||
.column( 7, { search:'applied' } )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
}, 0 );
|
||||
|
||||
$( api.column( 7 ).footer() ).html( TotalCGST.toFixed(2).bold() );
|
||||
|
||||
TotalIGST = api
|
||||
.column( 8, { search:'applied' } )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
}, 0 );
|
||||
|
||||
$( api.column( 8 ).footer() ).html( TotalIGST.toFixed(2).bold() );
|
||||
|
||||
FinalTotal = api
|
||||
.column( 9, { search:'applied' } )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
}, 0 );
|
||||
|
||||
$( api.column( 9 ).footer() ).html( FinalTotal.toFixed(2).bold() );
|
||||
|
||||
}
|
||||
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user