Expanded recurring transactions.

This commit is contained in:
James Cole
2014-11-13 16:13:32 +01:00
parent 4a20c008ff
commit 840dfa6696
15 changed files with 459 additions and 193 deletions

View File

@@ -8,14 +8,11 @@ $(function () {
if (typeof(googleTable) == 'function') {
console.log('A');
if (typeof componentID != 'undefined' && typeof repetitionID == 'undefined') {
console.log('B');
googleTable('table/component/' + componentID + '/0/transactions', 'transactions');
googleColumnChart('chart/component/' + componentID + '/spending/' + year, 'componentOverview');
} else if (typeof componentID != 'undefined' && typeof repetitionID != 'undefined') {
console.log('C');
googleTable('table/component/' + componentID + '/' + repetitionID + '/transactions', 'transactions');
}
}

View File

@@ -200,9 +200,7 @@ function googleSankeyChart(URL, container) {
Format as money
*/
console.log(gdata.getNumberOfRows())
if (gdata.getNumberOfRows() < 1) {
console.log('remove');
$('#' + container).parent().parent().remove();
return;
} else if (gdata.getNumberOfRows() < 6) {
@@ -261,7 +259,6 @@ function googleTable(URL, container) {
for (var i = 0; i < x; i++) {
var label = gdata.getColumnLabel(i);
console.log('Column ' + i + ':' + label);
/*
Format a string using the previous column as URL.
*/
@@ -282,7 +279,7 @@ function googleTable(URL, container) {
/*
Format as money
*/
if (label == 'Amount' || label == 'Balance') {
if (label == 'Amount' || label == 'Balance' || label == 'Minimum amount' || label == 'Maximum amount') {
money.format(gdata, i);
}

View File

@@ -1,7 +1,10 @@
$(document).ready(function () {
if (typeof(googleTable) == 'function') {
googleTable('table/recurring','recurring-table');
}
if (typeof(googleTable) == 'function') {
googleTable('table/recurring', 'recurring-table');
}
if (typeof(googleTable) == 'function') {
googleTable('table/recurring/' + recurringID + '/transactions', 'transaction-table');
}
}
);