Lines 273-278
$(document).ready(function() {
Link Here
|
273 |
}, |
273 |
}, |
274 |
{ |
274 |
{ |
275 |
"mDataProp": function ( oObj ) { |
275 |
"mDataProp": function ( oObj ) { |
|
|
276 |
if ( ! oObj.fine ) oObj.fine = 0; |
277 |
return parseFloat(oObj.fine).toFixed(2); |
278 |
} |
279 |
}, |
280 |
{ |
281 |
"mDataProp": function ( oObj ) { |
276 |
if ( ! oObj.price ) oObj.price = 0; |
282 |
if ( ! oObj.price ) oObj.price = 0; |
277 |
return parseFloat(oObj.price).toFixed(2); |
283 |
return parseFloat(oObj.price).toFixed(2); |
278 |
} |
284 |
} |
Lines 376-389
$(document).ready(function() {
Link Here
|
376 |
], |
382 |
], |
377 |
"fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay ) { |
383 |
"fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay ) { |
378 |
var total_charge = 0; |
384 |
var total_charge = 0; |
|
|
385 |
var total_fine = 0; |
379 |
var total_price = 0; |
386 |
var total_price = 0; |
380 |
for ( var i=0; i < aaData.length; i++ ) { |
387 |
for ( var i=0; i < aaData.length; i++ ) { |
381 |
total_charge += aaData[i]['charge'] * 1; |
388 |
total_charge += aaData[i]['charge'] * 1; |
|
|
389 |
total_fine += aaData[i]['fine'] * 1; |
382 |
total_price += aaData[i]['price'] * 1; |
390 |
total_price += aaData[i]['price'] * 1; |
383 |
} |
391 |
} |
384 |
var nCells = nRow.getElementsByTagName('td'); |
392 |
var nCells = nRow.getElementsByTagName('td'); |
385 |
nCells[1].innerHTML = total_charge.toFixed(2); |
393 |
nCells[1].innerHTML = total_charge.toFixed(2); |
386 |
nCells[2].innerHTML = total_price.toFixed(2); |
394 |
nCells[2].innerHTML = total_fine.toFixed(2); |
|
|
395 |
nCells[3].innerHTML = total_price.toFixed(2); |
387 |
}, |
396 |
}, |
388 |
"bPaginate": false, |
397 |
"bPaginate": false, |
389 |
"bProcessing": true, |
398 |
"bProcessing": true, |
Lines 508-513
$(document).ready(function() {
Link Here
|
508 |
}, |
517 |
}, |
509 |
{ |
518 |
{ |
510 |
"mDataProp": function ( oObj ) { |
519 |
"mDataProp": function ( oObj ) { |
|
|
520 |
if ( ! oObj.fine ) oObj.fine = 0; |
521 |
return parseFloat(oObj.fine).toFixed(2); |
522 |
} |
523 |
}, |
524 |
{ |
525 |
"mDataProp": function ( oObj ) { |
511 |
if ( ! oObj.price ) oObj.price = 0; |
526 |
if ( ! oObj.price ) oObj.price = 0; |
512 |
return parseFloat(oObj.price).toFixed(2); |
527 |
return parseFloat(oObj.price).toFixed(2); |
513 |
} |
528 |
} |