report_cumulative_year_inward
This commit is contained in:
parent
af519ede09
commit
a410275700
@ -1171,6 +1171,7 @@ join ip_products on ip_products.product_id= T_FinalProduct_History.ProductCode
|
||||
where ProductCode=? and Transactiondate >= ? and Transactiondate <= ?';
|
||||
|
||||
$query = $this->db->query($subQuery,array($product_id,$starting_date,$end_date));
|
||||
//print_r($this->db->last_query());
|
||||
return $query->result_array();
|
||||
|
||||
}
|
||||
|
||||
@ -198,12 +198,42 @@ $(document).ready(function() {
|
||||
},
|
||||
|
||||
'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;
|
||||
};
|
||||
|
||||
TotalQTY = api
|
||||
.column( 2, { search:'applied' } )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
}, 0 );
|
||||
|
||||
$( api.column( 2 ).footer() ).html( TotalQTY.toFixed().bold() );
|
||||
|
||||
TotalVALUE = api
|
||||
.column( 3, { search:'applied' } )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
}, 0 );
|
||||
|
||||
$( api.column( 3 ).footer() ).html( TotalVALUE.toFixed(2).bold() );
|
||||
|
||||
}
|
||||
} );
|
||||
} );
|
||||
$('#mySelect').on('change',function(){
|
||||
|
||||
table
|
||||
table
|
||||
.column(4)
|
||||
.search(this.value)
|
||||
.draw();
|
||||
@ -211,6 +241,9 @@ $(document).ready(function() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user