var fund = null;
function getSummaryInfo(rowIndex) {
- switch(this.index) {
- case 4: return new String(fund.summary().combined_balance);
- case 5: return new String(fund.summary().allocation_total);
- case 6: return new String(fund.summary().spent_balance);
- case 7: return new String(fund.summary().debit_total);
- case 8: return new String(fund.summary().spent_total);
- case 9: return new String(fund.summary().encumbrance_total);
- }
+ return new String(fund.summary()[this.field]);
}
function createAllocation(fields) {
}
function getSummaryInfo(rowIndex) {
- switch(this.index) {
- case 2: return new String(fundingSource.summary().balance);
- case 3: return new String(fundingSource.summary().credit_total);
- case 4: return new String(fundingSource.summary().allocation_total);
- }
+ return new String(fundingSource.summary()[this.field]);
}
/** builds the credits grid ----- */
{name: '${_("Spent Balance (Total - Spent)")}', get:getSummaryInfo},
{name: '${_("Total Debits (Spent + Encumbered)")}', get:getSummaryInfo},
*/
- {name: '${_("Balance")}', get:getSummaryInfo},
- {name: '${_("Total Allocated")}', get:getSummaryInfo},
- {name: '${_("Spent Balance")}', get:getSummaryInfo},
- {name: '${_("Total Debits")}', get:getSummaryInfo},
- {name: '${_("Total Spent")}', get:getSummaryInfo},
- {name: '${_("Total Encumbered")}', get:getSummaryInfo}
+ {name: '${_("Balance")}', get:getSummaryInfo, field:'combined_balance'},
+ {name: '${_("Total Allocated")}', get:getSummaryInfo, field:'allocation_total'},
+ {name: '${_("Spent Balance")}', get:getSummaryInfo, field:'spent_balance'},
+ {name: '${_("Total Debits")}', get:getSummaryInfo, field:'debit_total'},
+ {name: '${_("Total Spent")}', get:getSummaryInfo, field:'spent_total'},
+ {name: '${_("Total Encumbered")}', get:getSummaryInfo, field:'encumbrance_total'}
]]
}];
</script>
{name: '${_("ID")}', field: 'id'},
{name: '${_("Name")}', field: "name", width:'auto'},
{name: '${_("Code")}', field: "code"},
- {name: '${_("Balance")}', get:getSummaryInfo},
- {name: '${_("Total Credits")}', get:getSummaryInfo},
- {name: '${_("Total Debits")}', get:getSummaryInfo},
+ {name: '${_("Balance")}', get:getSummaryInfo, field:'balance'},
+ {name: '${_("Total Credits")}', get:getSummaryInfo, field:'credit_total'},
+ {name: '${_("Total Debits")}', get:getSummaryInfo, field:'allocation_total'},
{name: '${_("Currency Type")}', field: "currency_type"},
{name: '${_("Owner")}', field: "owner", width:'auto', get:getOrgInfo},
]]