don't assume order date is set in invoice po_item rendering
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 5 May 2010 17:45:07 +0000 (17:45 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 5 May 2010 17:45:07 +0000 (17:45 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16390 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/ui/default/acq/invoice/view.js

index da87e49..956ec78 100644 (file)
@@ -333,6 +333,8 @@ function addInvoiceItem(item) {
         var po_item = item.po_item();
         var node = nodeByName('inv_item_type', row);
         var itemType = itemTypes.filter(function(t) { return (t.code() == item.inv_item_type()) })[0];
+        orderDate = (!po.order_date()) ? '' : 
+                dojo.date.locale.format(dojo.date.stamp.fromISOString(po.order_date()), {selector:'date'});
 
         node.innerHTML = dojo.string.substitute(
             localeStrings.INVOICE_ITEM_PO_DETAILS, 
@@ -341,7 +343,7 @@ function addInvoiceItem(item) {
                 oilsBasePath, 
                 po.id(), 
                 po.name(), 
-                dojo.date.locale.format(dojo.date.stamp.fromISOString(po.order_date()), {selector:'date'}),
+                orderDate,
                 po_item.estimated_cost() 
             ]
         );