[open-ils-commits] r10149 - in branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb: public/oils/media/ui_js/oils/default/acq/financial templates/oils/default/acq/financial

svn at svn.open-ils.org svn at svn.open-ils.org
Sun Jul 27 11:19:54 EDT 2008


Author: erickson
Date: 2008-07-27 11:19:47 -0400 (Sun, 27 Jul 2008)
New Revision: 10149

Modified:
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_fund.js
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_funding_source.js
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_funding_source.html
Log:
added field names to summary columns to make it simpler to fetch the data for display

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_fund.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_fund.js	2008-07-27 15:09:22 UTC (rev 10148)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_fund.js	2008-07-27 15:19:47 UTC (rev 10149)
@@ -13,14 +13,7 @@
 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) {

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_funding_source.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_funding_source.js	2008-07-27 15:09:22 UTC (rev 10148)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_funding_source.js	2008-07-27 15:19:47 UTC (rev 10149)
@@ -63,11 +63,7 @@
 }
 
 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 ----- */

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html	2008-07-27 15:09:22 UTC (rev 10148)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html	2008-07-27 15:19:47 UTC (rev 10149)
@@ -98,12 +98,12 @@
                         {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>

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_funding_source.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_funding_source.html	2008-07-27 15:09:22 UTC (rev 10148)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_funding_source.html	2008-07-27 15:19:47 UTC (rev 10149)
@@ -120,9 +120,9 @@
                         {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}, 
                     ]]



More information about the open-ils-commits mailing list