1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 14:12:44 +01:00

Add totals to tasks report

This commit is contained in:
Hillel Coren 2017-05-23 22:35:26 +03:00
parent 6c9a484aa8
commit d7373a133b

View File

@ -261,7 +261,7 @@
var sumColumns = [];
@foreach ($columns as $column)
sumColumns.push("{{ in_array($column, ['amount', 'paid', 'balance', 'cost']) ? trans("texts.{$column}") : false }}");
sumColumns.push("{{ in_array($column, ['amount', 'paid', 'balance', 'cost', 'duration']) ? trans("texts.{$column}") : false }}");
@endforeach
$(function() {
@ -292,11 +292,14 @@
// parse 1,000.00 or 1.000,00
function convertStringToNumber(str) {
str = str + '' || '';
var number = Number(str.replace(/[^0-9]+/g, ''));
return number / 100;
if (str.indexOf(':')) {
return roundToTwo(moment.duration(str).asHours());
} else {
var number = Number(str.replace(/[^0-9]+/g, ''));
return number / 100;
}
}
$(function(){
$(".tablesorter-data").tablesorter({
@if (! request()->group_when_sorted)