show empty cell if xfer_dest is null (instead of default "?")
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 13 Aug 2008 17:52:06 +0000 (17:52 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 13 Aug 2008 17:52:06 +0000 (17:52 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@10356 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_fund.js
Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html

index d4719af..ad7f52b 100644 (file)
@@ -31,6 +31,11 @@ function getOrgInfo(rowIndex) {
     return fieldmapper.aou.findOrgUnit(data.org).shortname();
 }
 
+function getXferDest(rowIndex) {
+    data = this.grid.model.getRow(rowIndex);
+    if(!(data && data.xfer_destination)) return '';
+    return data.xfer_destination;
+}
 
 function loadFundGrid() {
     var store = new dojo.data.ItemFileReadStore({data:acqf.toStoreData([fund])});
index 3ff6e83..25609c2 100644 (file)
                         {name: '${_("Amount")}', field: "amount"}, 
                         {name: '${_("Encumbrance")}', field: "encumbrance"}, 
                         {name: '${_("Debit Type")}', field: "debit_type"}, 
-                        {name: '${_("Transfer Destination")}', field: "xfer_destination"}, 
+                        {name: '${_("Transfer Destination")}', field: "xfer_destination", get:getXferDest}, 
                     ]]
                 }];
             </script>