making use of code fields on fund, funding_source, and provider
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 13 May 2008 21:15:42 +0000 (21:15 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 13 May 2008 21:15:42 +0000 (21:15 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@9590 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/po/view_po.js
Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_funding_sources.html
Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_funds.html
Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_providers.html
Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html
Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_funding_source.html
Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_provider.html
Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/search.html

index 6057938..5618bc9 100644 (file)
@@ -24,7 +24,7 @@ function getOrgInfo(rowIndex) {
 function getProvider(rowIndex) {
     data = poGrid.model.getRow(rowIndex);
     if(!data) return;
-    return openils.acq.Provider.retrieve(data.provider).name();
+    return openils.acq.Provider.retrieve(data.provider).code();
 }
 
 function getPOOwner(rowIndex) {
index 4aa5dd9..3113259 100644 (file)
                     <td><input dojoType="dijit.form.TextBox" name="name"></td>
                 </tr>
                 <tr>
+                    <td><label for="name">${_('Code:')} </label></td>
+                    <td><input dojoType="dijit.form.TextBox" name="code"></td>
+                </tr>
+                <tr>
                     <td><label for="currency_type">${_('Currency Type:')}</label></td>
                     <td>
                         <input jsId='fsCurrencySelector' name="currency_type" 
@@ -87,6 +91,7 @@
         cells : [[
             {name: '${_("ID")}', field: 'id'},
             {name: '${_("Name")}', width:'auto', get:getName}, 
+            {name: '${_("Code")}', field:'code'},
             {name: '${_("Owner")}', width:'auto', get:getOrgInfo}, 
             {name: '${_("Currency Type")}', field: "currency_type"},
             {name: '${_("Balance")}', get:getBalanceInfo}
index 94879be..c46e999 100644 (file)
@@ -17,7 +17,6 @@
             fields, 
             function(fundId) {
                 var evt = openils.Event.parse(fundId);
-                alert(evt);
                 if(evt) {
                     alert(evt); /* XXX */
                     return;
                     <td><input dojoType="dijit.form.TextBox" name="name"></td>
                 </tr>
                 <tr>
+                    <td><label for="name">${_('Code:')} </label></td>
+                    <td><input dojoType="dijit.form.TextBox" name="code"></td>
+                </tr>
+                <tr>
                     <td><label for="year">${_('Year:')} </label></td>
                     <td><input dojoType="dijit.form.TextBox" name="year"></td>
                 </tr>
@@ -92,6 +95,7 @@
         cells : [[
             {name: '${_("ID")}', field: 'id'},
             {name: '${_("Name")}', width:'auto', get:getName}, 
+            {name: '${_("Code")}', field:'code'},
             {name: '${_("Year")}', field: "year"}, 
             {name: '${_("Location")}', get:getOrgInfo}, 
             {name: '${_("Currency Type")}', field: "currency_type"},
index dd39eae..6f2e666 100644 (file)
@@ -23,6 +23,7 @@
         cells : [[
             {name: '${_("ID")}', field: 'id'},
             {name: '${_("Name")}', get:getName, width:'auto'}, 
+            {name: '${_("Code")}', field:'code'},
             {name: '${_("Owner")}', get:getOrgInfo}, 
             {name: '${_("Currency Type")}', field: "currency_type"}
         ]]
index 69e45d4..37a47ac 100644 (file)
@@ -31,7 +31,7 @@
                     function(store) {
                         fundingSourceSelector.store = 
                             new dojo.data.ItemFileReadStore({data:store});
-                        fundingSourceSelector.setValue(store.items[0].id);
+                        fundingSourceSelector.setValue(store.items[0].code);
                     }, 'MANAGE_FUNDING_SOURCE'
                 );
             </script>
@@ -40,7 +40,7 @@
                     <td><label for="amount">${_('Funding Source:')} </label></td>
                     <td>
                         <input jsId='fundingSourceSelector' name="funding_source" 
-                            dojoType="dijit.form.FilteringSelect" searchAttr='name' labelAttr='name'>
+                            dojoType="dijit.form.FilteringSelect" searchAttr='code' labelAttr='code'>
                         </input>
                     </td>
                 </tr>
@@ -89,6 +89,7 @@
                     cells : [[
                         {name: '${_("ID")}', field: 'id'},
                         {name: '${_("Name")}', field: "name", width:'auto'}, 
+                        {name: '${_("Code")}', field: "code"},
                         {name: '${_("Currency Type")}', field: "currency_type"},
                         {name: '${_("Owner")}', get:getOrgInfo}, 
                         /*
index 717660e..b638ae1 100644 (file)
@@ -10,7 +10,7 @@
         data = fsAllocationGrid.model.getRow(rowIndex);
         if(data) {
             var fund = openils.acq.Fund.retrieve(data.fund);
-            return '<a href="${c.oils.acq.prefix.value}/fund/view/'+fund.id()+'">'+fund.name()+'</a>';
+            return '<a href="${c.oils.acq.prefix.value}/fund/view/'+fund.id()+'">'+fund.code()+'</a>';
         }
     }
 </script>
@@ -62,7 +62,7 @@
                     function(store) {
                         fundingSourceFundSelector.store = 
                             new dojo.data.ItemFileReadStore({data:store});
-                        fundingSourceFundSelector.setValue(store.items[0].id);
+                        fundingSourceFundSelector.setValue(store.items[0].code);
                     }, 'MANAGE_FUND'
                 );
             </script>
@@ -71,7 +71,7 @@
                     <td><label for="amount">${_('Fund:')} </label></td>
                     <td>
                         <input jsId='fundingSourceFundSelector' name="fund" 
-                            dojoType="dijit.form.FilteringSelect" searchAttr='name' labelAttr='name'>
+                            dojoType="dijit.form.FilteringSelect" searchAttr='code' labelAttr='code'>
                         </input>
                     </td>
                 </tr>
                     cells : [[
                         {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},
index f531ba8..a12cfb9 100644 (file)
@@ -17,6 +17,7 @@
                     cells : [[
                         {name: '${_("ID")}', field: 'id'},
                         {name: '${_("Name")}', field: "name", width:'auto'}, 
+                        {name: '${_("Code")}', field:'code'},
                         {name: '${_("Owner")}', get:getOrgInfo}, 
                         {name: '${_("Currency Type")}', field: "currency_type"},
                     ]]
index 28a5fec..9ae325d 100644 (file)
@@ -32,7 +32,8 @@
     <label for='id'>${_('ID')}</label>
     <input dojoType='dijit.form.NumberTextBox' name='id'> </input>
     <label for='provider'>${_('Provider')}</label>
-    <select name='provider' style='overflow-y:auto;' jsId="providerSelector" dojoType="dijit.form.FilteringSelect"> </select>
+    <select labelAttr='code' searchAttr='code' name='provider' 
+        style='overflow-y:auto;' jsId="providerSelector" dojoType="dijit.form.FilteringSelect"> </select>
     <div dojoType='dijit.form.Button' type='submit'>${_("Search")}</div>
 </form>